Skip to content

Commit 0194eb2

Browse files
authored
Merge pull request #2 from bradrydzewski/bsd
Add bsd license header
2 parents 04bf3e3 + 40c31bd commit 0194eb2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Flags:
4444

4545
var (
4646
holder = flag.String("c", "Google Inc.", "copyright holder")
47-
license = flag.String("l", "apache", "license type: apache, mit")
47+
license = flag.String("l", "apache", "license type: apache, bsd, mit")
4848
year = flag.Int("y", time.Now().Year(), "year")
4949
)
5050

tmpl.go

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var licenseTemplate = make(map[string]*template.Template)
2525
func init() {
2626
licenseTemplate["apache"] = template.Must(template.New("").Parse(tmplApache))
2727
licenseTemplate["mit"] = template.Must(template.New("").Parse(tmplMIT))
28+
licenseTemplate["bsd"] = template.Must(template.New("").Parse(tmplBSD))
2829
}
2930

3031
type copyrightData struct {
@@ -78,6 +79,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7879
See the License for the specific language governing permissions and
7980
limitations under the License.`
8081

82+
const tmplBSD = `Copyright (c) {{.Year}} {{.Holder}} All rights reserved.
83+
Use of this source code is governed by a BSD-style
84+
license that can be found in the LICENSE file.`
85+
8186
const tmplMIT = `Copyright (c) {{.Year}} {{.Holder}}
8287
8388
Permission is hereby granted, free of charge, to any person obtaining a copy of

0 commit comments

Comments
 (0)