Skip to content

Commit

Permalink
Clean up genswaggertypedocs.
Browse files Browse the repository at this point in the history
These are based on recommendation from
[staticcheck](http://staticcheck.io/).
  • Loading branch information
bjhaid committed May 1, 2019
1 parent 8f5a62a commit fd5113a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/genswaggertypedocs/swagger_type_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ 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)
}
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)
Expand Down

0 comments on commit fd5113a

Please sign in to comment.