aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repository/license.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/license.go')
-rw-r--r--modules/repository/license.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/repository/license.go b/modules/repository/license.go
index 5b188a041e..6ac3547e7b 100644
--- a/modules/repository/license.go
+++ b/modules/repository/license.go
@@ -13,14 +13,14 @@ import (
"code.gitea.io/gitea/modules/options"
)
-type licenseValues struct {
+type LicenseValues struct {
Owner string
Email string
Repo string
Year string
}
-func getLicense(name string, values *licenseValues) ([]byte, error) {
+func GetLicense(name string, values *LicenseValues) ([]byte, error) {
data, err := options.License(name)
if err != nil {
return nil, fmt.Errorf("GetRepoInitFile[%s]: %w", name, err)
@@ -28,7 +28,7 @@ func getLicense(name string, values *licenseValues) ([]byte, error) {
return fillLicensePlaceholder(name, values, data), nil
}
-func fillLicensePlaceholder(name string, values *licenseValues, origin []byte) []byte {
+func fillLicensePlaceholder(name string, values *LicenseValues, origin []byte) []byte {
placeholder := getLicensePlaceholder(name)
scanner := bufio.NewScanner(bytes.NewReader(origin))