diff --git a/README.md b/README.md index 7d4d68b5..202c48e7 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,9 @@ license: master my life. ``` +You can also use built-in licenses. For example, **GPLv2**, **GPLv3**, **LGPL**, +**AGPL**, **MIT**, **2-Clause BSD** or **3-Clause BSD**. + ## Manually implementing Cobra To manually implement cobra you need to create a bare main.go file and a RootCmd file. diff --git a/cobra/cmd/license_gpl_2.go b/cobra/cmd/license_gpl_2.go index b361dd73..1105e35e 100644 --- a/cobra/cmd/license_gpl_2.go +++ b/cobra/cmd/license_gpl_2.go @@ -18,7 +18,7 @@ package cmd func initGpl2() { Licenses["gpl2"] = License{ Name: "GNU General Public License 2.0", - PossibleMatches: []string{"gpl2", "gnu gpl2"}, + PossibleMatches: []string{"gpl2", "gnu gpl2", "gplv2"}, Header: `{{ .copyright }} {{ .appName }} is free software; you can redistribute it and/or diff --git a/cobra/cmd/license_gpl_3.go b/cobra/cmd/license_gpl_3.go index 1e62945d..009df9ff 100644 --- a/cobra/cmd/license_gpl_3.go +++ b/cobra/cmd/license_gpl_3.go @@ -18,7 +18,7 @@ package cmd func initGpl3() { Licenses["gpl3"] = License{ Name: "GNU General Public License 3.0", - PossibleMatches: []string{"gpl3", "gpl", "gnu gpl3", "gnu gpl"}, + PossibleMatches: []string{"gpl3", "gplv3", "gpl", "gnu gpl3", "gnu gpl"}, Header: ` This file is part of {{ .appName }}.