mirror of
https://github.com/ollama/ollama.git
synced 2026-03-27 02:58:43 +07:00
directly use isvalidpart
This commit is contained in:
@@ -252,13 +252,7 @@ func (n Name) DisplayShortest() string {
|
||||
}
|
||||
|
||||
func IsValidNamespace(namespace string) bool {
|
||||
name := Name{
|
||||
Host: "h",
|
||||
Model: "m",
|
||||
Namespace: namespace,
|
||||
Tag: "t",
|
||||
}
|
||||
return name.IsValid()
|
||||
return isValidPart(kindNamespace, namespace)
|
||||
}
|
||||
|
||||
// IsValid reports whether all parts of the name are present and valid. The
|
||||
|
||||
Reference in New Issue
Block a user