package main

import "fmt"

var (
	// name of the application
	name = currentFolderName()

	// version of the application
	version = gitVersion()
)

func main() {
	c := defaultConfig()
	readOrSaveConfig(c)

	for _, target := range *c.Targets {
		goos, goarch := target.Parse()

		fmt.Println("Building " + buildName(name, version, goos, goarch) + "...")
		goGenerate()
		goBuild(name, version, goos, goarch)
	}
}

package main

import "fmt"

var (
	// appName is the name of the
	// application to be built.
	appName = currentFolderName()

	// appVersion is the version of
	// the application to be built.
	appVersion = gitVersion()
)

func main() {
	c := defaultConfig()
	readOrSaveConfig(c)

	for _, target := range *c.Targets {
		goos, goarch := target.Parse()

		fmt.Println("Building " + buildName(appName, appVersion, goos, goarch) + "...")
		goGenerate()
		goBuild(appName, appVersion, goos, goarch)
	}
}

Make var for app name and version more explicit
Make var for app name and version more explicit
