github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/generator/templates/cli/main.gotmpl (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 {{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} 4 5 package main 6 7 import ( 8 "fmt" 9 "os" 10 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 fmt.Println("cmd execute error: ", err) 27 os.Exit(1) 28 } 29 }