fix: missing fmt import in auth.go and writeFile helper in git.go
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package git
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -92,6 +93,13 @@ type LogEntry struct {
|
|||||||
Subject string
|
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) {
|
func (r *Repo) run(args ...string) (string, error) {
|
||||||
cmd := exec.Command("git", append([]string{"-C", r.root}, args...)...)
|
cmd := exec.Command("git", append([]string{"-C", r.root}, args...)...)
|
||||||
var stdout, stderr bytes.Buffer
|
var stdout, stderr bytes.Buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user