Skip to content

Commit

Permalink
Cleanup unneeded wrapping of values in aws and stscreds package (#2707)
Browse files Browse the repository at this point in the history
Cleans up unneeded wrapping of values in the aws and stscreds package:
* aws: removes pointer dereference for `IsZero` method call.
* stscreds: removes anonymous function wrapping `time.Now`
  • Loading branch information
muesli authored and jasdel committed Jul 22, 2019
1 parent 5516892 commit fe1e95e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aws/convert_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ func TestTimeValueSlice(t *testing.T) {
}
for i := range out2 {
if in[i] == nil {
if !(*(out2[i])).IsZero() {
if !(out2[i]).IsZero() {
t.Errorf("Unexpected value at idx %d", idx)
}
} else {
Expand Down
4 changes: 1 addition & 3 deletions aws/credentials/stscreds/web_identity_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ const (
// now is used to return a time.Time object representing
// the current time. This can be used to easily test and
// compare test values.
var now = func() time.Time {
return time.Now()
}
var now = time.Now

// WebIdentityRoleProvider is used to retrieve credentials using
// an OIDC token.
Expand Down

0 comments on commit fe1e95e

Please sign in to comment.