func (v Provenance) Print(w io.Writer) {
	if _, err := fmt.Fprintf(w, "%s\n", v.Version); err != nil {
		logrus.WithError(err).Errorln("error printing ocictl version")
	}
}
Print prints the provenance of the ocibuilder
package provenance
import (
	"fmt"
	"io"
	"runtime"
	"github.com/sirupsen/logrus"
)
var (
	version = "v0.1.0"
	gitCommit = "$Format:%H$"
	buildDate = "1970-01-01T00:00:00Z"
	gitTag = "v0.1.0"
	gitTreeState = ""
)
type Provenance struct {
	Version string `json:"version"`
	GitCommit string `json:"gitCommit"`
	BuildDate string `json:"buildDate"`
	OS string `json:"goOs"`
	Platform string `json:"goArch"`
	GitTag string `json:"gitTag"`
	GitTreeState string `json:"gitTreeState"`
	Compiler string `json:"compiler"`
	GoVersion string
}
func (v Provenance) String() string {
	return v.Version
}
func GetProvenance() Provenance {
	var versionStr string
	if gitCommit != "" && gitTag != "" && gitTreeState == "clean" {
		versionStr = gitTag
	} else {
		versionStr = "v" + version
		if len(gitCommit) >= 7 {
			versionStr += "+" + gitCommit[0:7]
			if gitTreeState != "clean" {
				versionStr += ".dirty"
			}
		} else {
			versionStr += "+unknown"
		}
	}
	return Provenance{
		Version:      versionStr,
		BuildDate:    buildDate,
		OS:           runtime.GOOS,
		GitCommit:    gitCommit,
		GitTag:       gitTag,
		GitTreeState: gitTreeState,
		GoVersion:    runtime.Version(),
		Compiler:     runtime.Compiler,
		Platform:     fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH),
	}
}