mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-21 13:23:09 +01:00
* Check digest from HEAD request * Add FAQ note about Docker Hub rate limits * Compare digest as watch setting Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
17 lines
328 B
Go
17 lines
328 B
Go
package registry
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/containers/image/v5/docker"
|
|
"github.com/containers/image/v5/types"
|
|
)
|
|
|
|
func ParseReference(imageStr string) (types.ImageReference, error) {
|
|
if !strings.HasPrefix(imageStr, "//") {
|
|
imageStr = fmt.Sprintf("//%s", imageStr)
|
|
}
|
|
return docker.ParseReference(imageStr)
|
|
}
|