fmt
This commit is contained in:
parent
18203bf8d8
commit
86a874fceb
@ -139,7 +139,7 @@ func ParseFile(r io.Reader) (*File, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
} else if isSpace(r){
|
} else if isSpace(r) {
|
||||||
return nil, errInvalidVersion
|
return nil, errInvalidVersion
|
||||||
} else if _, err := semver.NewVersion(s); err != nil {
|
} else if _, err := semver.NewVersion(s); err != nil {
|
||||||
return nil, errInvalidVersion
|
return nil, errInvalidVersion
|
||||||
|
@ -18,7 +18,7 @@ type Manifest struct {
|
|||||||
MediaType string `json:"mediaType"`
|
MediaType string `json:"mediaType"`
|
||||||
Config *Layer `json:"config"`
|
Config *Layer `json:"config"`
|
||||||
Layers []*Layer `json:"layers"`
|
Layers []*Layer `json:"layers"`
|
||||||
Ollama string `json:"ollama"`
|
Ollama string `json:"ollama"`
|
||||||
|
|
||||||
filepath string
|
filepath string
|
||||||
fi os.FileInfo
|
fi os.FileInfo
|
||||||
@ -116,7 +116,7 @@ func WriteManifest(name model.Name, config *Layer, layers []*Layer, ollama strin
|
|||||||
MediaType: "application/vnd.docker.distribution.manifest.v2+json",
|
MediaType: "application/vnd.docker.distribution.manifest.v2+json",
|
||||||
Config: config,
|
Config: config,
|
||||||
Layers: layers,
|
Layers: layers,
|
||||||
Ollama: ollama,
|
Ollama: ollama,
|
||||||
}
|
}
|
||||||
|
|
||||||
return json.NewEncoder(f).Encode(m)
|
return json.NewEncoder(f).Encode(m)
|
||||||
|
@ -624,7 +624,7 @@ func TestCreateDetectTemplate(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCreateVersion(t *testing.T){
|
func TestCreateVersion(t *testing.T) {
|
||||||
gin.SetMode(gin.TestMode)
|
gin.SetMode(gin.TestMode)
|
||||||
|
|
||||||
p := t.TempDir()
|
p := t.TempDir()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user