Clean up genswaggertypedocs.

These are based on recommendation from
[staticcheck](http://staticcheck.io/).
k3s-v1.15.3
Àbéjídé Àyodélé 2019-05-01 16:32:05 +00:00
parent 8f5a62af48
commit fd5113aec1
1 changed files with 2 additions and 2 deletions

View File

@ -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)