From fd5113aec15048bbf905e7d30cf2d67008fea736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80b=C3=A9j=C3=ADd=C3=A9=20=C3=80yod=C3=A9l=C3=A9?= Date: Wed, 1 May 2019 16:32:05 +0000 Subject: [PATCH] Clean up genswaggertypedocs. These are based on recommendation from [staticcheck](http://staticcheck.io/). --- cmd/genswaggertypedocs/swagger_type_docs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/genswaggertypedocs/swagger_type_docs.go b/cmd/genswaggertypedocs/swagger_type_docs.go index 03621f44ed..ffe035005c 100644 --- a/cmd/genswaggertypedocs/swagger_type_docs.go +++ b/cmd/genswaggertypedocs/swagger_type_docs.go @@ -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)