コード例 #1
0
ファイル: helpers.go プロジェクト: antonylewis/eris-cli
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"))
}
コード例 #2
0
ファイル: helpers.go プロジェクト: antonylewis/eris-cli
func copyrightLine() string {
	author := viper.GetString("author")
	year := time.Now().Format("2006")

	return "Copyright © " + year + " " + author
}