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
99681537
Commit
99681537
authored
Jul 31, 2023
by
Jeffrey Morgan
Browse files
fix Go warnings
parent
7da249fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
server/images.go
server/images.go
+3
-5
No files found.
server/images.go
View file @
99681537
...
...
@@ -635,9 +635,7 @@ func PushModel(name string, regOpts *RegistryOptions, fn func(api.ProgressRespon
}
var
layers
[]
*
Layer
for
_
,
layer
:=
range
manifest
.
Layers
{
layers
=
append
(
layers
,
layer
)
}
layers
=
append
(
layers
,
manifest
.
Layers
...
)
layers
=
append
(
layers
,
&
manifest
.
Config
)
for
_
,
layer
:=
range
layers
{
...
...
@@ -881,7 +879,7 @@ func uploadBlobChunked(mp ModelPath, location string, layer *Layer, regOpts *Reg
// TODO allow cross repo blob mount
// Create URL
url
:=
fmt
.
Sprintf
(
"%s"
,
location
)
url
:=
location
fp
,
err
:=
GetBlobsPath
(
layer
.
Digest
)
if
err
!=
nil
{
...
...
@@ -931,7 +929,7 @@ func uploadBlobChunked(mp ModelPath, location string, layer *Layer, regOpts *Reg
// Check for success: For a successful upload, the Docker registry will respond with a 201 Created
if
resp
.
StatusCode
!=
http
.
StatusAccepted
{
fn
(
api
.
ProgressResponse
{
Status
:
fmt
.
Sprintf
(
"error uploading layer"
)
,
Status
:
"error uploading layer"
,
Digest
:
layer
.
Digest
,
Total
:
int
(
layer
.
Size
),
Completed
:
int
(
totalUploaded
),
...
...
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