()
| 9 | ) |
| 10 | |
| 11 | func RootCmd() *cobra.Command { |
| 12 | command := &cobra.Command{ |
| 13 | Use: "typeid", |
| 14 | Short: "Type-safe, K-sortable, globally unique identifiers", |
| 15 | RunE: func(cmd *cobra.Command, args []string) error { |
| 16 | return cmd.Help() |
| 17 | }, |
| 18 | SilenceErrors: true, |
| 19 | SilenceUsage: true, |
| 20 | } |
| 21 | command.AddCommand(NewCmd()) |
| 22 | command.AddCommand(EncodeCmd()) |
| 23 | command.AddCommand(DecodeCmd()) |
| 24 | |
| 25 | return command |
| 26 | } |
| 27 | |
| 28 | func Execute(ctx context.Context, args []string) int { |
| 29 | cmd := RootCmd() |