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