cmd: Add a blank line between copyright and license
This commit is contained in:
parent
75c6acfc8f
commit
a1b7d3cc4d
@ -121,7 +121,8 @@ func validateCmdName(source string) string {
|
||||
|
||||
func createCmdFile(license License, path, cmdName string) {
|
||||
template := `{{comment .copyright}}
|
||||
{{comment .license}}
|
||||
{{if .license}}//
|
||||
{{comment .license}}{{end}}
|
||||
|
||||
package {{.cmdPackage}}
|
||||
|
||||
|
@ -107,7 +107,8 @@ func createLicenseFile(license License, path string) {
|
||||
|
||||
func createMainFile(project *Project) {
|
||||
mainTemplate := `{{ comment .copyright }}
|
||||
{{if .license}}{{ comment .license }}{{end}}
|
||||
{{if .license}}//
|
||||
{{ comment .license }}{{end}}
|
||||
|
||||
package main
|
||||
|
||||
@ -135,7 +136,8 @@ func main() {
|
||||
|
||||
func createRootCmdFile(project *Project) {
|
||||
template := `{{comment .copyright}}
|
||||
{{if .license}}{{comment .license}}{{end}}
|
||||
{{if .license}}//
|
||||
{{comment .license}}{{end}}
|
||||
|
||||
package cmd
|
||||
|
||||
|
1
cobra/cmd/testdata/main.go.golden
vendored
1
cobra/cmd/testdata/main.go.golden
vendored
@ -1,4 +1,5 @@
|
||||
// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
1
cobra/cmd/testdata/root.go.golden
vendored
1
cobra/cmd/testdata/root.go.golden
vendored
@ -1,4 +1,5 @@
|
||||
// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
1
cobra/cmd/testdata/test.go.golden
vendored
1
cobra/cmd/testdata/test.go.golden
vendored
@ -1,4 +1,5 @@
|
||||
// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
Loading…
Reference in New Issue
Block a user