github.com/youyuanwu/go-swagger@v0.19.0/cmd/swagger/commands/generate/contrib.go (about) 1 package generate 2 3 import ( 4 "github.com/go-swagger/go-swagger/generator" 5 ) 6 7 // contribOptionsOverride gives contributed templates the ability to override the options if they need 8 func contribOptionsOverride(opts *generator.GenOpts) { 9 switch opts.Template { 10 case "stratoscale": 11 // Stratoscale template needs to regenerate the configureapi on every run. 12 opts.RegenerateConfigureAPI = true 13 // It also does not use the main.go 14 opts.IncludeMain = false 15 } 16 }