MCPcopy Create free account
hub / github.com/bare-cli/bare / executeLicense

Function executeLicense

utils/git/license.go:52–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52func executeLicense() {
53
54 f, err := os.OpenFile(License.Path, os.O_CREATE|os.O_WRONLY, 0666)
55 if err != nil {
56 log.Fatal(err)
57 }
58 defer f.Close()
59 fileTemplateName := filepath.Base(License.Path)
60 licTempl := template.Must(template.New(fileTemplateName).Parse(License.LicStr))
61
62 licData := LicenseTempl{
63 License: License.LicName,
64 }
65 err = licTempl.ExecuteTemplate(f, fileTemplateName, licData)
66 if err != nil {
67 log.Fatal(err)
68 }
69}

Callers 1

AddLicenseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected