diff --git a/pkg/yqlib/operator_traverse_path.go b/pkg/yqlib/operator_traverse_path.go index d0cb1ec..98ba535 100644 --- a/pkg/yqlib/operator_traverse_path.go +++ b/pkg/yqlib/operator_traverse_path.go @@ -308,6 +308,6 @@ func traverseMergeAnchor(newMatches *orderedmap.OrderedMap, originalCandidate *C func traverseArray(candidate *CandidateNode, operation *Operation, prefs traversePreferences) (*list.List, error) { log.Debug("operation Value %v", operation.Value) - indices := []*yaml.Node{&yaml.Node{Value: operation.StringValue}} + indices := []*yaml.Node{{Value: operation.StringValue}} return traverseArrayWithIndices(candidate, indices, prefs) } diff --git a/scripts/format.sh b/scripts/format.sh index eca4b06..0a11c95 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,5 +1,6 @@ #!/bin/bash find . \( -path ./vendor \) -prune -o -name "*.go" -exec goimports -w {} \; +gofmt -w -s . go mod tidy -go mod vendor \ No newline at end of file +go mod vendor