Skip to content

Commit

Permalink
slight doc comment tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jackspirou committed Sep 15, 2024
1 parent c79f378 commit 44a1ee0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type Key string
func Encode(uuid string) (Key, error)
```
Encode will encode a given UUID string into a Key with basic validation.
Encode will encode a given UUID string into a Key with basic length validation.
<a name="FromString"></a>
### func [FromString](<https://github.com/agentstation/uuidkey/blob/master/uuidkey.go#L24>)
Expand Down
2 changes: 1 addition & 1 deletion codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func decode(s string) string {
return (strings.Repeat("0", padding) + decoded)
}

// Encode will encode a given UUID string into a Key with basic validation.
// Encode will encode a given UUID string into a Key with basic length validation.
func Encode(uuid string) (Key, error) {
if len(uuid) != 36 { // check the UUID string has the correct length
return "", fmt.Errorf("invalid UUID length: expected 36 characters, got %d", len(uuid))
Expand Down

0 comments on commit 44a1ee0

Please sign in to comment.