Fix uint, uint8, uint16, uint32 and uint64 conversion in ToStringE function.

This commit is contained in:
K4rian 2019-12-17 19:07:01 +01:00 committed by Bjørn Erik Pedersen
parent c01685bb84
commit 1ffadf5510

View File

@ -819,15 +819,15 @@ func ToStringE(i interface{}) (string, error) {
case int8: case int8:
return strconv.FormatInt(int64(s), 10), nil return strconv.FormatInt(int64(s), 10), nil
case uint: case uint:
return strconv.FormatInt(int64(s), 10), nil return strconv.FormatUint(uint64(s), 10), nil
case uint64: case uint64:
return strconv.FormatInt(int64(s), 10), nil return strconv.FormatUint(uint64(s), 10), nil
case uint32: case uint32:
return strconv.FormatInt(int64(s), 10), nil return strconv.FormatUint(uint64(s), 10), nil
case uint16: case uint16:
return strconv.FormatInt(int64(s), 10), nil return strconv.FormatUint(uint64(s), 10), nil
case uint8: case uint8:
return strconv.FormatInt(int64(s), 10), nil return strconv.FormatUint(uint64(s), 10), nil
case []byte: case []byte:
return string(s), nil return string(s), nil
case template.HTML: case template.HTML: