From 770bd687beaa520ef407ce60ca42a8f9bbc814db Mon Sep 17 00:00:00 2001 From: brasse b Date: Fri, 10 Apr 2026 13:18:04 +0200 Subject: [PATCH] fix: missing fmt import in auth.go and writeFile helper in git.go Co-Authored-By: Claude Sonnet 4.6 --- backend/internal/auth/auth.go | 1 + backend/internal/git/git.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/backend/internal/auth/auth.go b/backend/internal/auth/auth.go index 65144e2..3def1ff 100644 --- a/backend/internal/auth/auth.go +++ b/backend/internal/auth/auth.go @@ -4,6 +4,7 @@ import ( "crypto/rand" "encoding/hex" "errors" + "fmt" "sync" "time" diff --git a/backend/internal/git/git.go b/backend/internal/git/git.go index 61f8857..fae7a7a 100644 --- a/backend/internal/git/git.go +++ b/backend/internal/git/git.go @@ -3,6 +3,7 @@ package git import ( "bytes" "fmt" + "os" "os/exec" "path/filepath" "strings" @@ -92,6 +93,13 @@ type LogEntry struct { Subject string } +func writeFile(path, content string) error { + if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil { + return err + } + return os.WriteFile(path, []byte(content), 0644) +} + func (r *Repo) run(args ...string) (string, error) { cmd := exec.Command("git", append([]string{"-C", r.root}, args...)...) var stdout, stderr bytes.Buffer