mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
14 lines
236 B
Go
14 lines
236 B
Go
package cautils
|
|
|
|
import (
|
|
"github.com/distribution/reference"
|
|
)
|
|
|
|
func NormalizeImageName(img string) (string, error) {
|
|
name, err := reference.ParseNormalizedNamed(img)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return name.String(), nil
|
|
}
|