diff --git a/README.md b/README.md index 0d5bbfb1..5eb21671 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Many of the most widely used Go projects are built using Cobra including: [![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra) [![CircleCI status](https://circleci.com/gh/spf13/cobra.png?circle-token=:circle-token "CircleCI status")](https://circleci.com/gh/spf13/cobra) -[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) +[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) ![cobra](https://cloud.githubusercontent.com/assets/173412/10911369/84832a8e-8212-11e5-9f82-cc96660a4794.gif) @@ -257,9 +257,12 @@ license: This is my license. There are many like it, but this one is mine. My license is my best friend. It is my life. I must master it as I must - master my life. + 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 }}.