diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2021-05-27 07:02:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 07:02:40 +0000 |
commit | 61167834f296a00ab97b954bd63249ab874505c5 (patch) | |
tree | b143d6eb7910c1700789cee7353a3542703c42fd /vendor/github.com/onsi/gomega/internal | |
parent | d9eb1269257490dddfae3fde2fe57c3009f94287 (diff) | |
download | podman-61167834f296a00ab97b954bd63249ab874505c5.tar.gz podman-61167834f296a00ab97b954bd63249ab874505c5.tar.bz2 podman-61167834f296a00ab97b954bd63249ab874505c5.zip |
Bump github.com/onsi/gomega from 1.12.0 to 1.13.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.12.0...v1.13.0)
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/onsi/gomega/internal')
-rw-r--r-- | vendor/github.com/onsi/gomega/internal/defaults/env.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/onsi/gomega/internal/defaults/env.go b/vendor/github.com/onsi/gomega/internal/defaults/env.go new file mode 100644 index 000000000..bc29c63d5 --- /dev/null +++ b/vendor/github.com/onsi/gomega/internal/defaults/env.go @@ -0,0 +1,22 @@ +package defaults + +import ( + "fmt" + "time" +) + +func SetDurationFromEnv(getDurationFromEnv func(string) string, varSetter func(time.Duration), name string) { + durationFromEnv := getDurationFromEnv(name) + + if len(durationFromEnv) == 0 { + return + } + + duration, err := time.ParseDuration(durationFromEnv) + + if err != nil { + panic(fmt.Sprintf("Expected a duration when using %s! Parse error %v", name, err)) + } + + varSetter(duration) +} |