mirror of
https://github.com/gogs/gogs.git
synced 2026-05-06 05:07:19 +02:00
style: format code with Go fmt and Gofumpt (#8092)
This commit is contained in:
committed by
GitHub
parent
beeeb64969
commit
8e08450182
@@ -1037,7 +1037,6 @@ func prepareRepoCommit(repo *Repository, tmpDir, repoPath string, opts CreateRep
|
||||
|
||||
// initRepository performs initial commit with chosen setup files on behave of doer.
|
||||
func initRepository(e Engine, repoPath string, doer *User, repo *Repository, opts CreateRepoOptionsLegacy) (err error) {
|
||||
|
||||
// Init bare new repository.
|
||||
if err = git.Init(repoPath, git.InitOptions{Bare: true}); err != nil {
|
||||
return fmt.Errorf("init repository: %v", err)
|
||||
|
||||
@@ -64,7 +64,7 @@ func Test_CreateRepository_PreventDeletion(t *testing.T) {
|
||||
require.NoError(t, os.MkdirAll(repoPath, os.ModePerm))
|
||||
|
||||
canary := filepath.Join(repoPath, "canary.txt")
|
||||
require.NoError(t, os.WriteFile(canary, []byte("should survive"), 0644))
|
||||
require.NoError(t, os.WriteFile(canary, []byte("should survive"), 0o644))
|
||||
|
||||
_, err := CreateRepository(owner, owner, opts)
|
||||
require.Error(t, err)
|
||||
|
||||
Reference in New Issue
Block a user