Skip to content

Commit 2f6aabc

Browse files
authored
Merge pull request #63 from testwill/string
chore: use strings.Contains instead
2 parents 6df70da + 10bfc22 commit 2f6aabc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/openapi/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (srv *Server) sanitize() *core.Error {
5252
}
5353

5454
k := "{" + key + "}"
55-
if strings.Index(srv.URL, k) < 0 {
55+
if !strings.Contains(srv.URL, k) {
5656
return core.NewError(locale.ErrInvalidValue).WithField("variables[" + key + "]")
5757
}
5858
}

0 commit comments

Comments
 (0)