Skip to content

Commit

Permalink
chore: drop superfluous var
Browse files Browse the repository at this point in the history
  • Loading branch information
superlinkx committed Nov 6, 2023
1 parent 073c0e6 commit f6f3821
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/api/src/config/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,11 @@ func SetValue(target any, path, value string) error {
break
}

base := idx
lookahead := base
lookahead := idx

for lookahead < len(pathParts) {
// Make sure to add one to lookahead, as we want to get the range starting at base and going 1 or more indexes beyond it
remainingFullPath := strings.Join(pathParts[base:lookahead+1], "_")
remainingFullPath := strings.Join(pathParts[idx:lookahead+1], "_")

if taggedFieldName == remainingFullPath {
cursor = cursor.Field(taggedField.Field)
Expand Down

0 comments on commit f6f3821

Please sign in to comment.