github.com/go-swagger/go-swagger@v0.31.0/examples/cli/cmd/todoctl/main.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package main
     4  
     5  import (
     6  	"fmt"
     7  	"os"
     8  
     9  	"github.com/go-swagger/go-swagger/examples/cli/cli"
    10  )
    11  
    12  // This file was generated by the swagger tool.
    13  // Editing this file might prove futile when you re-run the swagger generate command
    14  
    15  func main() {
    16  	rootCmd, err := cli.MakeRootCmd()
    17  	if err != nil {
    18  		fmt.Println("cmd construction error: ", err)
    19  		os.Exit(1)
    20  	}
    21  
    22  	if err = rootCmd.Execute(); err != nil {
    23  		fmt.Println("cmd execute error: ", err)
    24  		os.Exit(1)
    25  	}
    26  }