chore: upgrade dependencies
This commit is contained in:
35
vendor/github.com/aws/smithy-go/ptr/from_ptr.go
generated
vendored
35
vendor/github.com/aws/smithy-go/ptr/from_ptr.go
generated
vendored
@@ -564,3 +564,38 @@ func ToTimeMap(vs map[string]*time.Time) map[string]time.Time {
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
// ToDuration returns time.Duration value dereferenced if the passed
|
||||
// in pointer was not nil. Returns a time.Duration zero value if the
|
||||
// pointer was nil.
|
||||
func ToDuration(p *time.Duration) (v time.Duration) {
|
||||
if p == nil {
|
||||
return v
|
||||
}
|
||||
|
||||
return *p
|
||||
}
|
||||
|
||||
// ToDurationSlice returns a slice of time.Duration values, that are
|
||||
// dereferenced if the passed in pointer was not nil. Returns a time.Duration
|
||||
// zero value if the pointer was nil.
|
||||
func ToDurationSlice(vs []*time.Duration) []time.Duration {
|
||||
ps := make([]time.Duration, len(vs))
|
||||
for i, v := range vs {
|
||||
ps[i] = ToDuration(v)
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
// ToDurationMap returns a map of time.Duration values, that are
|
||||
// dereferenced if the passed in pointer was not nil. The time.Duration
|
||||
// zero value is used if the pointer was nil.
|
||||
func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration {
|
||||
ps := make(map[string]time.Duration, len(vs))
|
||||
for k, v := range vs {
|
||||
ps[k] = ToDuration(v)
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
1
vendor/github.com/aws/smithy-go/ptr/gen_scalars.go
generated
vendored
1
vendor/github.com/aws/smithy-go/ptr/gen_scalars.go
generated
vendored
@@ -23,6 +23,7 @@ func GetScalars() Scalars {
|
||||
{Type: "float32"},
|
||||
{Type: "float64"},
|
||||
{Type: "Time", Import: &Import{Path: "time"}},
|
||||
{Type: "Duration", Import: &Import{Path: "time"}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
29
vendor/github.com/aws/smithy-go/ptr/to_ptr.go
generated
vendored
29
vendor/github.com/aws/smithy-go/ptr/to_ptr.go
generated
vendored
@@ -468,3 +468,32 @@ func TimeMap(vs map[string]time.Time) map[string]*time.Time {
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
// Duration returns a pointer value for the time.Duration value passed in.
|
||||
func Duration(v time.Duration) *time.Duration {
|
||||
return &v
|
||||
}
|
||||
|
||||
// DurationSlice returns a slice of time.Duration pointers from the values
|
||||
// passed in.
|
||||
func DurationSlice(vs []time.Duration) []*time.Duration {
|
||||
ps := make([]*time.Duration, len(vs))
|
||||
for i, v := range vs {
|
||||
vv := v
|
||||
ps[i] = &vv
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
// DurationMap returns a map of time.Duration pointers from the values
|
||||
// passed in.
|
||||
func DurationMap(vs map[string]time.Duration) map[string]*time.Duration {
|
||||
ps := make(map[string]*time.Duration, len(vs))
|
||||
for k, v := range vs {
|
||||
vv := v
|
||||
ps[k] = &vv
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user