Skip to content

Commit

Permalink
Merge pull request #63 from testwill/string
Browse files Browse the repository at this point in the history
chore: use strings.Contains instead
  • Loading branch information
caixw authored Jul 26, 2023
2 parents 6df70da + 10bfc22 commit 2f6aabc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/openapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (srv *Server) sanitize() *core.Error {
}

k := "{" + key + "}"
if strings.Index(srv.URL, k) < 0 {
if !strings.Contains(srv.URL, k) {
return core.NewError(locale.ErrInvalidValue).WithField("variables[" + key + "]")
}
}
Expand Down

0 comments on commit 2f6aabc

Please sign in to comment.