Merge pull request #77307 from bjhaid/cleanup_genswaggertypedocs

Clean up genswaggertypedocs.
This commit is contained in:
Kubernetes Prow Robot 2019-05-01 23:29:08 -07:00 committed by GitHub
commit 6d691c9985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ func main() {
docsForTypes := kruntime.ParseDocumentationFrom(*typeSrc) docsForTypes := kruntime.ParseDocumentationFrom(*typeSrc)
if *verify == true { if *verify {
rc, err := kruntime.VerifySwaggerDocsExist(docsForTypes, funcOut) rc, err := kruntime.VerifySwaggerDocsExist(docsForTypes, funcOut)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error in verification process: %s\n", err) fmt.Fprintf(os.Stderr, "Error in verification process: %s\n", err)
@ -62,7 +62,7 @@ func main() {
os.Exit(rc) os.Exit(rc)
} }
if docsForTypes != nil && len(docsForTypes) > 0 { if len(docsForTypes) > 0 {
if err := kruntime.WriteSwaggerDocFunc(docsForTypes, funcOut); err != nil { if err := kruntime.WriteSwaggerDocFunc(docsForTypes, funcOut); err != nil {
fmt.Fprintf(os.Stderr, "Error when writing swagger documentation functions: %s\n", err) fmt.Fprintf(os.Stderr, "Error when writing swagger documentation functions: %s\n", err)
os.Exit(-1) os.Exit(-1)