github.com/AngusLu/go-swagger@v0.28.0/generator/templates/cli/main.gotmpl (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 4 {{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} 5 6 7 package main 8 9 import ( 10 "encoding/json" 11 {{ imports .DefaultImports }} 12 {{ imports .Imports }} 13 ) 14 15 // This file was generated by the swagger tool. 16 // Editing this file might prove futile when you re-run the swagger generate command 17 18 func main() { 19 rootCmd,err := cli.MakeRootCmd() 20 if err != nil { 21 fmt.Println("Cmd construction error: ", err) 22 os.Exit(1) 23 } 24 25 if err := rootCmd.Execute(); err != nil { 26 os.Exit(1) 27 } 28 }