github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/internal/docker/image.go (about)

     1  package docker
     2  
     3  import (
     4  	"github.com/distribution/reference"
     5  )
     6  
     7  const TagLatest = "latest"
     8  
     9  // For use storing reference.NamedTagged as a map key, since we can't rely on the
    10  // two different underlying representations the same name+tag combo being equivalent.
    11  type ImgNameAndTag struct {
    12  	Name string
    13  	Tag  string
    14  }
    15  
    16  func ToImgNameAndTag(nt reference.NamedTagged) ImgNameAndTag {
    17  	return ImgNameAndTag{
    18  		Name: nt.Name(),
    19  		Tag:  nt.Tag(),
    20  	}
    21  }