@@ -20,13 +20,13 @@ type InitOptions struct {
2020}
2121
2222func addToFlags (flags * pflag.FlagSet , opts * InitOptions ) {
23- flags .StringVarP (& opts .Language , "languague " , "l" , "" , "Language to use for the bpf program" )
23+ flags .StringVarP (& opts .Language , "language " , "l" , "" , "Language to use for the bpf program" )
2424 flags .StringVarP (& opts .MapType , "map" , "m" , "" , "Map type to initialize" )
2525 flags .StringVarP (& opts .FilePath , "file" , "f" , "" , "File to create skeleton in" )
2626 flags .StringVarP (& opts .OutputType , "output-type" , "o" , "" , "The output type for your map" )
27- flags .StringVar (& opts .OutputType , "program-type" , "" , "The type of program to create (e.g. network, file-system)" )
28-
27+ flags .StringVar (& opts .ProgramType , "program-type" , "" , "The type of program to create (e.g. network, file-system)" )
2928}
29+
3030func Command () * cobra.Command {
3131 opts := & InitOptions {}
3232
@@ -53,13 +53,14 @@ func initialize(opts *InitOptions) error {
5353 }
5454
5555 programType := opts .ProgramType
56- var mapTemplate * templateData
5756 if programType == "" {
5857 programType , err = selectProgramType ()
5958 if err != nil {
6059 return err
6160 }
6261 }
62+
63+ var mapTemplate * templateData
6364 if programType == network {
6465 mapTemplate , err = handleNetworkProgram (opts )
6566 if err != nil {
0 commit comments