func (b Build) Tag() (t string) {
	t = b.Version.Version + "-jdk" + b.JDKVersion.JDKVersion
	if b.JDKVersion.Base.Base != b.Base.Base {
		t += "-" + b.Base.Base
	}
	return
}
Tag is build's main tag
package main
import (
	"io/ioutil"
	"os"
	"path/filepath"
	"regexp"
	"strings"
	"text/template"
	"github.com/spf13/viper"
)
type Config struct {
	Versions []Version
}
func (c Config) Builds() (builds []Build) {
	for _, v := range c.Versions {
		builds = append(builds, v.Builds()...)
	}
	return
}
type Version struct {
	Version     string
	CompilerURL string
	JDKVersions []JDKVersion
}
func (v Version) VersionSnakeCased() string {
	return string(regexp.MustCompile("\\W").ReplaceAll(([]byte)(v.Version), ([]byte)("_")))
}
func (v Version) Builds() (builds []Build) {
	for _, jdkVersion := range v.JDKVersions {
		builds = append(builds, Build{v, jdkVersion, jdkVersion.Base})
		for _, variant := range jdkVersion.Variants {
			builds = append(builds, Build{v, jdkVersion, variant})
		}
	}
	return
}
type JDKVersion struct {
	JDKVersion string
	Base
	Variants []Base
}
type Base struct {
	Base                   string
	AdditionalTags         []string
	AdditionalRepositories []AdditionalRepository
}
type AdditionalRepository struct {
	Repository string
	Tags       []string
}
type Build struct {
	Version
	JDKVersion
	Base
}
func (b Build) Name() (n string) {
	n = "build_" + b.Version.VersionSnakeCased() + "_jdk" + b.JDKVersion.JDKVersion
	if b.JDKVersion.Base.Base != b.Base.Base {
		n += "_" + b.Base.Base
	}
	return
}