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

Function AddLicense

utils/git/license.go:26–36  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

24var License NewLicense
25
26func AddLicense(path string) {
27 doAddLicense := ui.PromptString("Add license", []string{"n", "y/N"})
28 if strings.ToLower(doAddLicense) == "n" {
29 return
30 }
31 licName := []string{"Apache Software License 2.0", "MIT", "GNU GPL v3.0"}
32 License.LicName = ui.VarPromptSelect("Select license", licName)
33 License.LicStr = getLicense()
34 License.Path = path
35 executeLicense()
36}
37
38func getLicense() string {
39 req_url := "https://raw.githubusercontent.com/bare-cli/license/main/LICENSE"

Callers 1

useBareFunction · 0.92

Calls 4

PromptStringFunction · 0.92
VarPromptSelectFunction · 0.92
getLicenseFunction · 0.85
executeLicenseFunction · 0.85

Tested by

no test coverage detected