aboutsummaryrefslogtreecommitdiff
path: root/modules/repository/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/init.go')
-rw-r--r--modules/repository/init.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/repository/init.go b/modules/repository/init.go
index 49c8d2a90..f9a33cd4f 100644
--- a/modules/repository/init.go
+++ b/modules/repository/init.go
@@ -136,7 +136,7 @@ func prepareRepoCommit(ctx context.Context, repo *repo_model.Repository, tmpDir,
}
// README
- data, err := options.GetRepoInitFile("readme", opts.Readme)
+ data, err := options.Readme(opts.Readme)
if err != nil {
return fmt.Errorf("GetRepoInitFile[%s]: %w", opts.Readme, err)
}
@@ -164,7 +164,7 @@ func prepareRepoCommit(ctx context.Context, repo *repo_model.Repository, tmpDir,
var buf bytes.Buffer
names := strings.Split(opts.Gitignores, ",")
for _, name := range names {
- data, err = options.GetRepoInitFile("gitignore", name)
+ data, err = options.Gitignore(name)
if err != nil {
return fmt.Errorf("GetRepoInitFile[%s]: %w", name, err)
}
@@ -182,7 +182,7 @@ func prepareRepoCommit(ctx context.Context, repo *repo_model.Repository, tmpDir,
// LICENSE
if len(opts.License) > 0 {
- data, err = options.GetRepoInitFile("license", opts.License)
+ data, err = options.License(opts.License)
if err != nil {
return fmt.Errorf("GetRepoInitFile[%s]: %w", opts.License, err)
}