mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 20:17:59 +00:00
backport of commit 3a46ecc389 (#21362)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
committed by
GitHub
parent
2251721aab
commit
0f58c6f3e0
@@ -6,6 +6,8 @@ package pointerutil
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/go-secure-stdlib/parseutil"
|
||||
)
|
||||
|
||||
// StringPtr returns a pointer to a string value
|
||||
@@ -20,7 +22,7 @@ func BoolPtr(b bool) *bool {
|
||||
|
||||
// TimeDurationPtr returns a pointer to a time duration value
|
||||
func TimeDurationPtr(duration string) *time.Duration {
|
||||
d, _ := time.ParseDuration(duration)
|
||||
d, _ := parseutil.ParseDurationSecond(duration)
|
||||
|
||||
return &d
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user