style: format code with Go fmt and Gofumpt (#8092)

This commit is contained in:
deepsource-autofix[bot]
2026-01-19 14:54:13 -05:00
committed by GitHub
parent beeeb64969
commit 8e08450182
2 changed files with 1 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)