diff options
author | Unknwon <u@gogs.io> | 2015-08-28 16:44:04 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-28 16:44:04 +0800 |
commit | 46bee50e45ef8f3e9f3727649fa24d50bb2fc782 (patch) | |
tree | 3b55f109f957c54890972d533af435d3a3ed8e96 /models/repo.go | |
parent | 4cfa2ca40d4f211a124ab9973dfc814190b758b9 (diff) | |
download | gitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.tar.gz gitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.zip |
complate list of gitignores and licenses
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go index 61105d84ac..31f013f02f 100644 --- a/models/repo.go +++ b/models/repo.go @@ -44,7 +44,7 @@ var ( ) var ( - Gitignores, Licenses []string + Gitignores, Licenses, Readmes []string ) var ( @@ -52,9 +52,9 @@ var ( ) func LoadRepoConfig() { - // Load .gitignore and license files. - types := []string{"gitignore", "license"} - typeFiles := make([][]string, 2) + // Load .gitignore and license files and readme templates. + types := []string{"gitignore", "license", "readme"} + typeFiles := make([][]string, 3) for i, t := range types { files, err := bindata.AssetDir("conf/" + t) if err != nil { @@ -78,8 +78,10 @@ func LoadRepoConfig() { Gitignores = typeFiles[0] Licenses = typeFiles[1] + Readmes = typeFiles[2] sort.Strings(Gitignores) sort.Strings(Licenses) + sort.Strings(Readmes) } func NewRepoContext() { |