File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
distribution/distribution Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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.
3025type HTTPHandler struct {
3126 // log is the associated logger.
You can’t perform that action at this time.
0 commit comments