diff options
| author | Alex Flint <[email protected]> | 2022-10-29 15:21:21 -0400 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2022-10-29 15:21:21 -0400 |
| commit | 763072452fe0127e2002e12418d3e9c10ae1b8c0 (patch) | |
| tree | 62738486fe1ac93827d79ae04a7ebfa8982ffb53 | |
| parent | 3d95a706a6a1cc80d62f403778c5d160698003b0 (diff) | |
use reflect.Ptr not reflect.Pointer since the latter was added in Go 1.18
| -rw-r--r-- | parse.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -416,7 +416,7 @@ func cmdFromStruct(name string, dest path, t reflect.Type) (*command, error) { // parse the default value spec.defaultString = defaultString - if field.Type.Kind() == reflect.Pointer { + if field.Type.Kind() == reflect.Ptr { // here we have a field of type *T and we create a new T, no need to dereference // in order for the value to be settable spec.defaultValue = reflect.New(field.Type.Elem()) |
