(path string)
| 24 | var License NewLicense |
| 25 | |
| 26 | func 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 | |
| 38 | func getLicense() string { |
| 39 | req_url := "https://raw.githubusercontent.com/bare-cli/license/main/LICENSE" |
no test coverage detected