Skip to content

Commit

Permalink
Fix uint, uint8, uint16, uint32 and uint64 conversion in ToStringE fu…
Browse files Browse the repository at this point in the history
…nction.
  • Loading branch information
K4rian authored and bep committed Dec 18, 2019
1 parent c01685b commit 1ffadf5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions caste.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,15 +819,15 @@ func ToStringE(i interface{}) (string, error) {
case int8:
return strconv.FormatInt(int64(s), 10), nil
case uint:
return strconv.FormatInt(int64(s), 10), nil
return strconv.FormatUint(uint64(s), 10), nil
case uint64:
return strconv.FormatInt(int64(s), 10), nil
return strconv.FormatUint(uint64(s), 10), nil
case uint32:
return strconv.FormatInt(int64(s), 10), nil
return strconv.FormatUint(uint64(s), 10), nil
case uint16:
return strconv.FormatInt(int64(s), 10), nil
return strconv.FormatUint(uint64(s), 10), nil
case uint8:
return strconv.FormatInt(int64(s), 10), nil
return strconv.FormatUint(uint64(s), 10), nil
case []byte:
return string(s), nil
case template.HTML:
Expand Down

0 comments on commit 1ffadf5

Please sign in to comment.