Skip to content

Commit

Permalink
feat: ID generator uses uuidV7
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Kocman committed Oct 14, 2024
1 parent 23eea15 commit c3cf6b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ How to release a new version:
- Print to stderr on error.
- `gen_id` now includes a comment at the top of the generated file to warn developers that the file is, in fact, generated.

### Changed
- Command for ID generating: uses uuidV7 instead of uuidV4.

### Removed
- `openapi compose`, `repo init`, `repo template` commands.

Expand Down
2 changes: 1 addition & 1 deletion cmd/tea/gen_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func scanUUID(u *uuid.UUID, idTypeName string, data any) error {
}
{{ range .ids }}
func New{{ . }}() {{ . }} {
return {{ . }}(uuid.New())
return {{ . }}(uuid.Must(uuid.NewV7()))
}
func (i {{ . }}) String() string {
Expand Down

0 comments on commit c3cf6b0

Please sign in to comment.