INNER CODE UNIT · Go

printVersion

derailed/popeye · cmd/version.go:29

func printVersion() {
	printLogo(report.ColorAqua, report.ColorLighSlate)
	printTuple("Version", version)
	printTuple("Commit", commit)
	printTuple("Date", date)
}

func printTuple(section, value string) {
	const secFmt = "%-10s "
	fmt.Printf("%s", report.Colorize(fmt.Sprintf(secFmt, section+":"), report.ColorAqua))
	fmt.Println(report.Colorize(value, report.ColorWhite))
}

func printLogo(title, logo report.Color) {
	for i, s := range report.Logo {
		if i < len(report.Popeye) {
			fmt.Printf("%s", report.Colorize(report.Popeye[i], title))
			fmt.Printf("%s", strings.Repeat(" ", 22))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…