INNER CODE UNIT · Go
init
machinebox/remoto · cmd_generate.go:14
func init() {
var outputFile string
var generateCmd = &cobra.Command{
Use: "generate definition template",
Short: "Generate source code from a template and remoto definition.",
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
definition := args[0]
template := args[1]
f, err := os.Open(definition)
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}
defer f.Close()
def, err := generator.Parse(f)
if err != nil {