summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-28 16:44:04 +0800
committerUnknwon <u@gogs.io>2015-08-28 16:44:04 +0800
commit46bee50e45ef8f3e9f3727649fa24d50bb2fc782 (patch)
tree3b55f109f957c54890972d533af435d3a3ed8e96 /models/repo.go
parent4cfa2ca40d4f211a124ab9973dfc814190b758b9 (diff)
downloadgitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.tar.gz
gitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.zip
complate list of gitignores and licenses
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go10
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() {