Add built-in licenses info to README

This commit is contained in:
Albert Nigmatzianov 2017-04-20 21:07:48 +02:00
parent 164be37318
commit c68a90d2e8
3 changed files with 5 additions and 2 deletions

View file

@ -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.

View file

@ -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

View file

@ -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 }}.