mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Clean up genswaggertypedocs.
These are based on recommendation from [staticcheck](http://staticcheck.io/).
This commit is contained in:
parent
8f5a62af48
commit
fd5113aec1
@ -54,7 +54,7 @@ func main() {
|
||||
|
||||
docsForTypes := kruntime.ParseDocumentationFrom(*typeSrc)
|
||||
|
||||
if *verify == true {
|
||||
if *verify {
|
||||
rc, err := kruntime.VerifySwaggerDocsExist(docsForTypes, funcOut)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error in verification process: %s\n", err)
|
||||
@ -62,7 +62,7 @@ func main() {
|
||||
os.Exit(rc)
|
||||
}
|
||||
|
||||
if docsForTypes != nil && len(docsForTypes) > 0 {
|
||||
if len(docsForTypes) > 0 {
|
||||
if err := kruntime.WriteSwaggerDocFunc(docsForTypes, funcOut); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when writing swagger documentation functions: %s\n", err)
|
||||
os.Exit(-1)
|
||||
|
Loading…
Reference in New Issue
Block a user