We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e9c7a8 commit 7fb7062Copy full SHA for 7fb7062
1 file changed
trashid/hashid.go
@@ -17,6 +17,9 @@ func init() {
17
}
18
19
func DecodeHashId(id string) (int, error) {
20
+ if val, err := strconv.Atoi(id); err == nil {
21
+ return val, nil
22
+ }
23
ids, err := hashIdUtil.DecodeWithError(id)
24
if err != nil {
25
return 0, err
0 commit comments