(ids []string, cfg validator.IDConfig)
| 163 | } |
| 164 | |
| 165 | func generateID(ids []string, cfg validator.IDConfig) (string, error) { |
| 166 | switch cfg.Strategy { |
| 167 | case "prefixed": |
| 168 | return nextid.GeneratePrefixed(ids, cfg.Prefix, cfg.Padding), nil |
| 169 | case "random": |
| 170 | return nextid.GenerateRandom(ids, cfg.Length) |
| 171 | case "ulid": |
| 172 | return nextid.GenerateULID(ids, cfg.Length) |
| 173 | default: |
| 174 | return nextid.Calculate(ids).NextID, nil |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func resolveTaskContent(cmd *cobra.Command, id, title string) (string, error) { |
| 179 | if addTemplate != "" { |
no outgoing calls
no test coverage detected