Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
53d0052c
Commit
53d0052c
authored
Jul 17, 2023
by
Michael Yang
Browse files
unavoid unnecessary type conversion
parent
28a136e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server/images.go
server/images.go
+2
-2
No files found.
server/images.go
View file @
53d0052c
...
@@ -634,7 +634,7 @@ func pullModelManifest(registryURL, repoName, tag, username, password string) (*
...
@@ -634,7 +634,7 @@ func pullModelManifest(registryURL, repoName, tag, username, password string) (*
// Check for success: For a successful upload, the Docker registry will respond with a 201 Created
// Check for success: For a successful upload, the Docker registry will respond with a 201 Created
if
resp
.
StatusCode
!=
http
.
StatusOK
{
if
resp
.
StatusCode
!=
http
.
StatusOK
{
body
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
body
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
return
nil
,
fmt
.
Errorf
(
"registry responded with code %d: %
v
"
,
resp
.
StatusCode
,
string
(
body
)
)
return
nil
,
fmt
.
Errorf
(
"registry responded with code %d: %
s
"
,
resp
.
StatusCode
,
body
)
}
}
var
m
*
ManifestV2
var
m
*
ManifestV2
...
@@ -695,7 +695,7 @@ func startUpload(registryURL string, repositoryName string, username string, pas
...
@@ -695,7 +695,7 @@ func startUpload(registryURL string, repositoryName string, username string, pas
// Check for success
// Check for success
if
resp
.
StatusCode
!=
http
.
StatusAccepted
{
if
resp
.
StatusCode
!=
http
.
StatusAccepted
{
body
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
body
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
return
""
,
fmt
.
Errorf
(
"registry responded with code %d: %
v
"
,
resp
.
StatusCode
,
string
(
body
)
)
return
""
,
fmt
.
Errorf
(
"registry responded with code %d: %
s
"
,
resp
.
StatusCode
,
body
)
}
}
// Extract UUID location from header
// Extract UUID location from header
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment