Skip to content

Commit abe997e

Browse files
committed
fix lint
1 parent d418fb5 commit abe997e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pkg/distribution/distribution/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func (c *Client) looksLikeID(s string) bool {
203203
}
204204
for i := 0; i < n; i++ {
205205
ch := s[i]
206-
if !((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f')) {
206+
if (ch < '0' || ch > '9') && (ch < 'a' || ch > 'f') {
207207
return false
208208
}
209209
}
@@ -223,7 +223,7 @@ func (c *Client) looksLikeDigest(s string) bool {
223223
}
224224
for i := 0; i < 64; i++ {
225225
ch := hashPart[i]
226-
if !((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f')) {
226+
if (ch < '0' || ch > '9') && (ch < 'a' || ch > 'f') {
227227
return false
228228
}
229229
}

pkg/inference/models/http_handler.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ import (
2121
"github.com/sirupsen/logrus"
2222
)
2323

24-
const (
25-
defaultOrg = "ai"
26-
defaultTag = "latest"
27-
)
28-
2924
// HTTPHandler manages inference model pulls and storage.
3025
type HTTPHandler struct {
3126
// log is the associated logger.

0 commit comments

Comments
 (0)