()
| 6 | ) |
| 7 | |
| 8 | func EncodeCmd() *cobra.Command { |
| 9 | command := &cobra.Command{ |
| 10 | Use: "encode [<type_prefix>] <uuid>", |
| 11 | Args: cobra.RangeArgs(1, 2), |
| 12 | Short: "Encode the given UUID into a TypeID using the given type prefix", |
| 13 | RunE: encodeCmd, |
| 14 | SilenceErrors: true, |
| 15 | SilenceUsage: true, |
| 16 | } |
| 17 | |
| 18 | return command |
| 19 | } |
| 20 | |
| 21 | func encodeCmd(cmd *cobra.Command, args []string) error { |
| 22 | prefix := "" |