Package: awsutil
Function Summary collapse
-
func Copy(dst, src interface{})
Copy deeply copies a src structure to dst.
-
func CopyOf(src interface{}) (dst interface{})
CopyOf returns a copy of src while also allocating the memory for dst.
-
func DeepEqual(a, b interface{}) bool
DeepEqual returns if the two values are deeply equal like reflect.DeepEqual.
-
func Prettify(i interface{}) string
Prettify returns the string representation of a value.
-
func SetValueAtPath(i interface{}, path string, v interface{})
SetValueAtPath sets a value at the case insensitive lexical path inside of a structure.
-
func StringValue(i interface{}) string
StringValue returns the string representation of a value.
-
func ValuesAtPath(i interface{}, path string) ([]interface{}, error)
ValuesAtPath returns a list of values at the case insensitive lexical path inside of a structure.
Function Details
func Copy(dst, src interface{})
Copy deeply copies a src structure to dst. Useful for copying request and response structures.
Can copy between structs of different type, but will only copy fields which are assignable, and exist in both structs. Fields which are not assignable, or do not exist in both structs are ignored.
14 15 16 17 18 19 20 21 |
// File 'aws/awsutil/copy.go', line 14
|
func CopyOf(src interface{}) (dst interface{})
CopyOf returns a copy of src while also allocating the memory for dst. src must be a pointer type or this operation will fail.
25 26 27 28 29 30 |
// File 'aws/awsutil/copy.go', line 25
|
func DeepEqual(a, b interface{}) bool
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.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
// File 'aws/awsutil/equal.go', line 12
|
func Prettify(i interface{}) string
Prettify returns the string representation of a value.
11 12 13 14 15 |
// File 'aws/awsutil/prettify.go', line 11
|
func SetValueAtPath(i interface{}, path string, v interface{})
SetValueAtPath sets a value at the case insensitive lexical path inside of a structure.
186 187 188 189 190 191 192 193 194 |
// File 'aws/awsutil/path_value.go', line 186
|
func StringValue(i interface{}) string
StringValue returns the string representation of a value.
Deprecated: Use Prettify instead.
12 13 14 15 16 |
// File 'aws/awsutil/string_value.go', line 12
|
func ValuesAtPath(i interface{}, path string) ([]interface{}, error)
ValuesAtPath returns a list of values at the case insensitive lexical path inside of a structure.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
// File 'aws/awsutil/path_value.go', line 157
|