diff options
author | 2024-02-19 09:36:50 +0000 | |
---|---|---|
committer | 2024-02-19 09:36:50 +0000 | |
commit | 2db115fa3696f227a88b3afd9a94b0a32fd87935 (patch) | |
tree | 8e31b1b8858b503f1b85d5d74044e2e338168f00 /vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go | |
parent | [chore]: Bump github.com/tdewolff/minify/v2 from 2.20.16 to 2.20.17 (#2661) (diff) | |
download | gotosocial-2db115fa3696f227a88b3afd9a94b0a32fd87935.tar.xz |
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.66 to 7.0.67 (#2662)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.66 to 7.0.67.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.66...v7.0.67)
---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go')
-rw-r--r-- | vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go b/vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go index c35e58e1a..2566a3df7 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/set/stringset.go @@ -149,22 +149,19 @@ func (set StringSet) MarshalJSON() ([]byte, error) { } // UnmarshalJSON - parses JSON data and creates new set with it. -// If 'data' contains JSON string array, the set contains each string. -// If 'data' contains JSON string, the set contains the string as one element. -// If 'data' contains Other JSON types, JSON parse error is returned. func (set *StringSet) UnmarshalJSON(data []byte) error { - sl := []string{} + sl := []interface{}{} var err error if err = json.Unmarshal(data, &sl); err == nil { *set = make(StringSet) for _, s := range sl { - set.Add(s) + set.Add(fmt.Sprintf("%v", s)) } } else { - var s string + var s interface{} if err = json.Unmarshal(data, &s); err == nil { *set = make(StringSet) - set.Add(s) + set.Add(fmt.Sprintf("%v", s)) } } |