func whichLicense() string { // if explicitly flagged, use that if userLicense != "" { return matchLicense(userLicense) } // if already present in the project, use that // TODO: Inspect project for existing license // default to viper's setting return matchLicense(viper.GetString("license")) }
func copyrightLine() string { author := viper.GetString("author") year := time.Now().Format("2006") return "Copyright © " + year + " " + author }