Skip to content

Commit

Permalink
Merge pull request #11 from testwill/replace-loop
Browse files Browse the repository at this point in the history
chore: slice replace loop
  • Loading branch information
casualjim committed Jun 29, 2023
2 parents 5df0d69 + ff1d154 commit 1539753
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ func (p *Pointer) parse(jsonPointerString string) error {
err = errors.New(invalidStart)
} else {
referenceTokens := strings.Split(jsonPointerString, pointerSeparator)
for _, referenceToken := range referenceTokens[1:] {
p.referenceTokens = append(p.referenceTokens, referenceToken)
}
p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...)
}
}

Expand Down

0 comments on commit 1539753

Please sign in to comment.