aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/mitchellh/mapstructure
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-03 14:16:52 +0100
committerGitHub <noreply@github.com>2021-12-03 14:16:52 +0100
commit0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1 (patch)
tree1b651ab8c67e8e9f4ad8da27a879c19ee3b6b237 /vendor/github.com/mitchellh/mapstructure
parenta6d1220ac08456dcc075b85b168def3ffeadb58d (diff)
parentbd9f8815e1fc56c188668509025741a93649ca05 (diff)
downloadpodman-0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1.tar.gz
podman-0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1.tar.bz2
podman-0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1.zip
Merge pull request #12486 from giuseppe/use-configured-compression-format
cmd, push: use the configured compression format
Diffstat (limited to 'vendor/github.com/mitchellh/mapstructure')
-rw-r--r--vendor/github.com/mitchellh/mapstructure/CHANGELOG.md4
-rw-r--r--vendor/github.com/mitchellh/mapstructure/mapstructure.go8
2 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
index 9fe803a5e..38a099162 100644
--- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
+++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.4.3
+
+* Fix cases where `json.Number` didn't decode properly [GH-261]
+
## 1.4.2
* Custom name matchers to support any sort of casing, formatting, etc. for
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
index dcee0f2d6..6b81b0067 100644
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go
+++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
@@ -684,16 +684,12 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e
}
case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number":
jn := data.(json.Number)
- i, err := jn.Int64()
+ i, err := strconv.ParseUint(string(jn), 0, 64)
if err != nil {
return fmt.Errorf(
"error decoding json.Number into %s: %s", name, err)
}
- if i < 0 && !d.config.WeaklyTypedInput {
- return fmt.Errorf("cannot parse '%s', %d overflows uint",
- name, i)
- }
- val.SetUint(uint64(i))
+ val.SetUint(i)
default:
return fmt.Errorf(
"'%s' expected type '%s', got unconvertible type '%s', value: '%v'",