Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
goccy committed Nov 28, 2022
1 parent b55a676 commit fcb21f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -22,7 +22,7 @@ cover-html: cover

.PHONY: lint
lint: golangci-lint
golangci-lint run
$(BIN_DIR)/golangci-lint run

golangci-lint: | $(BIN_DIR)
@{ \
Expand Down
2 changes: 1 addition & 1 deletion internal/decoder/interface.go
Expand Up @@ -458,7 +458,7 @@ func (d *interfaceDecoder) decodeEmptyInterface(ctx *RuntimeContext, cursor, dep
return cursor, errors.ErrInvalidBeginningOfValue(buf[cursor], cursor)
}

func NewPathDecoder() *interfaceDecoder {
func NewPathDecoder() Decoder {
ifaceDecoder := &interfaceDecoder{
typ: emptyInterfaceType,
structName: "",
Expand Down
10 changes: 3 additions & 7 deletions internal/decoder/path.go
Expand Up @@ -345,10 +345,6 @@ type BasePathNode struct {
child PathNode
}

func (n *BasePathNode) allRead() bool {
return true
}

func (n *BasePathNode) chain(node PathNode) PathNode {
n.child = node
return node
Expand Down Expand Up @@ -611,7 +607,7 @@ func (n *PathRecursiveNode) Get(src, dst reflect.Value) error {
}
}
}
AssignValue(reflect.ValueOf(arr), dst)
_ = AssignValue(reflect.ValueOf(arr), dst)
return nil
case reflect.Struct:
typ := src.Type()
Expand All @@ -635,7 +631,7 @@ func (n *PathRecursiveNode) Get(src, dst reflect.Value) error {
}
}
}
AssignValue(reflect.ValueOf(arr), dst)
_ = AssignValue(reflect.ValueOf(arr), dst)
return nil
case reflect.Array, reflect.Slice:
for i := 0; i < src.Len(); i++ {
Expand All @@ -646,7 +642,7 @@ func (n *PathRecursiveNode) Get(src, dst reflect.Value) error {
arr = append(arr, valueToSliceValue(v)...)
}
}
AssignValue(reflect.ValueOf(arr), dst)
_ = AssignValue(reflect.ValueOf(arr), dst)
return nil
case reflect.Ptr:
return n.Get(src.Elem(), dst)
Expand Down

0 comments on commit fcb21f9

Please sign in to comment.