INNER CODE UNIT · Go

validateTag

genuinetools/img · build.go:106

func validateTag(repo string) (string, error) {
	named, err := reference.ParseNormalizedNamed(repo)
	if err != nil {
		return "", err
	}

	// Add the latest tag if they did not provide one.
	repo = reference.TagNameOnly(named).String()

	return repo, nil
}

func (cmd *buildCommand) ValidateArgs(c *cobra.Command, args []string) error {
	if len(args) < 1 {
		return fmt.Errorf("must pass a path to build")
	}

	if c.Flag("output").Changed {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…