MCPcopy
hub / github.com/jetify-com/typeid / newCmd

Function newCmd

cli/new.go:23–34  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

21}
22
23func newCmd(cmd *cobra.Command, args []string) error {
24 prefix := ""
25 if len(args) > 0 {
26 prefix = strings.ToLower(args[0])
27 }
28 tid, err := typeid.New(prefix)
29 if err != nil {
30 return err
31 }
32 cmd.Println(tid)
33 return nil
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected