backport of commit 3a46ecc389 (#21362)

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
hc-github-team-secure-vault-core
2023-06-21 10:01:13 -04:00
committed by GitHub
parent 2251721aab
commit 0f58c6f3e0
20 changed files with 68 additions and 79 deletions

View File

@@ -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
}