mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update packages in go.mod to latest releases
updated few packages in go.mod to latest available release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
0f44c6acb7
commit
fb7dc13dfe
22
vendor/github.com/onsi/gomega/internal/defaults/env.go
generated
vendored
Normal file
22
vendor/github.com/onsi/gomega/internal/defaults/env.go
generated
vendored
Normal file
@ -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)
|
||||
}
|
Reference in New Issue
Block a user