mirror of https://github.com/portainer/portainer
				
				
				
			
		
			
				
	
	
		
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Go
		
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Go
		
	
	
package images
 | 
						|
 | 
						|
import (
 | 
						|
	"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 = "//" + imageStr
 | 
						|
	}
 | 
						|
	return docker.ParseReference(imageStr)
 | 
						|
}
 |