Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 1d32e91

Browse files
committed
Prefer []string{} to []string(nil)
1 parent 6e6258e commit 1d32e91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ func unmarshalNode(data *Node, model reflect.Value, included *map[string]*Node)
306306
continue
307307
}
308308

309-
if fieldValue.Type() == reflect.TypeOf([]string(nil)) {
309+
if fieldValue.Type() == reflect.TypeOf([]string{}) {
310310
values := make([]string, v.Len())
311311
for i := 0; i < v.Len(); i++ {
312312
values[i] = v.Index(i).Interface().(string)

0 commit comments

Comments
 (0)