Skip to content

Commit 2c71f6f

Browse files
authored
fix broken cli flags (#33)
1 parent cd7c6ae commit 2c71f6f

File tree

1 file changed

+5
-4
lines changed
  • pkg/cli/internal/commands/initialize

1 file changed

+5
-4
lines changed

pkg/cli/internal/commands/initialize/init.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ type InitOptions struct {
2020
}
2121

2222
func 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+
3030
func 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

Comments
 (0)