mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
fix lint
This commit is contained in:
@@ -138,7 +138,7 @@ func (b *blobDownload) run(ctx context.Context, requestURL *url.URL, opts *Regis
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
file.Truncate(b.Total)
|
||||
_ = file.Truncate(b.Total)
|
||||
|
||||
g, inner := errgroup.WithContext(ctx)
|
||||
g.SetLimit(numDownloadParts)
|
||||
@@ -340,6 +340,7 @@ func downloadBlob(ctx context.Context, opts downloadOpts) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// nolint: contextcheck
|
||||
go download.Run(context.Background(), requestURL, opts.regOpts)
|
||||
}
|
||||
|
||||
|
||||
@@ -747,6 +747,7 @@ func deleteUnusedLayers(skipModelPath *ModelPath, deleteMap map[string]struct{},
|
||||
// save (i.e. delete from the deleteMap) any files used in other manifests
|
||||
manifest, _, err := GetManifest(fmp)
|
||||
if err != nil {
|
||||
// nolint: nilerr
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -748,6 +748,7 @@ func ListModelsHandler(c *gin.Context) {
|
||||
resp, err := modelResponse(tag)
|
||||
if err != nil {
|
||||
log.Printf("skipping file: %s", fp)
|
||||
// nolint: nilerr
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -193,8 +193,8 @@ func Test_Routes(t *testing.T) {
|
||||
}
|
||||
|
||||
resp, err := httpSrv.Client().Do(req)
|
||||
defer resp.Body.Close()
|
||||
assert.Nil(t, err)
|
||||
defer resp.Body.Close()
|
||||
|
||||
if tc.Expected != nil {
|
||||
tc.Expected(t, resp)
|
||||
|
||||
@@ -395,6 +395,7 @@ func uploadBlob(ctx context.Context, mp ModelPath, layer *Layer, opts *RegistryO
|
||||
return err
|
||||
}
|
||||
|
||||
// nolint: contextcheck
|
||||
go upload.Run(context.Background(), opts)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user