-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request moby#23063 from yongtang/22961-aws-sdk-go
Update aws-sdk-go to v1.1.30
- Loading branch information
Showing
83 changed files
with
9,027 additions
and
1,669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package awsutil | ||
|
||
import ( | ||
"reflect" | ||
) | ||
|
||
// DeepEqual returns if the two values are deeply equal like reflect.DeepEqual. | ||
// In addition to this, this method will also dereference the input values if | ||
// possible so the DeepEqual performed will not fail if one parameter is a | ||
// pointer and the other is not. | ||
// | ||
// DeepEqual will not perform indirection of nested values of the input parameters. | ||
func DeepEqual(a, b interface{}) bool { | ||
ra := reflect.Indirect(reflect.ValueOf(a)) | ||
rb := reflect.Indirect(reflect.ValueOf(b)) | ||
|
||
if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid { | ||
// If the elements are both nil, and of the same type the are equal | ||
// If they are of different types they are not equal | ||
return reflect.TypeOf(a) == reflect.TypeOf(b) | ||
} else if raValid != rbValid { | ||
// Both values must be valid to be equal | ||
return false | ||
} | ||
|
||
return reflect.DeepEqual(ra.Interface(), rb.Interface()) | ||
} |
Oops, something went wrong.