MCPcopy Create free account
hub / github.com/codeedu/fc2-arquitetura-hexagonal / init

Function init

cmd/cli.go:48–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func init() {
49 rootCmd.AddCommand(cliCmd)
50 cliCmd.Flags().StringVarP(&action, "action", "a", "enable", "Enable / Disable a product")
51 cliCmd.Flags().StringVarP(&productId, "id", "i", "", "Product ID")
52 cliCmd.Flags().StringVarP(&productName, "product", "n", "", "Product name")
53 cliCmd.Flags().Float64VarP(&productPrice, "price", "p", 0, "Product price")
54
55 // Here you will define your flags and configuration settings.
56
57 // Cobra supports Persistent Flags which will work for this command
58 // and all subcommands, e.g.:
59 // cliCmd.PersistentFlags().String("foo", "", "A help for foo")
60
61 // Cobra supports local flags which will only run when this command
62 // is called directly, e.g.:
63 // cliCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
64}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected