mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Fix use of reflect.Ptr
Apparently Ptr is a deprecated name; with the new golangci-lint version this would cause inline: Constant reflect.Ptr should be inlined
This commit is contained in:
parent
4820241caf
commit
a26899f5ab
|
|
@ -144,7 +144,7 @@ func setDefaultVals(rootSchema, schema *jsonschema.Schema, defaults any) {
|
|||
t := reflect.TypeOf(defaults)
|
||||
v := reflect.ValueOf(defaults)
|
||||
|
||||
if t.Kind() == reflect.Ptr || t.Kind() == reflect.Interface {
|
||||
if t.Kind() == reflect.Pointer || t.Kind() == reflect.Interface {
|
||||
t = t.Elem()
|
||||
v = v.Elem()
|
||||
}
|
||||
|
|
@ -202,7 +202,7 @@ func isZeroValue(v any) bool {
|
|||
switch rv.Kind() {
|
||||
case reflect.Slice, reflect.Map:
|
||||
return rv.Len() == 0
|
||||
case reflect.Ptr, reflect.Interface:
|
||||
case reflect.Pointer, reflect.Interface:
|
||||
return rv.IsNil()
|
||||
case reflect.Struct:
|
||||
for i := range rv.NumField() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue