gofmt !116

merged merged by cmc on 2026-08-30 03:27 UTC · krz/gitbay:gofmt into main

3 files changed, +13 −14

Layout: unified · split

cmd/gitbayd/main.go +4 −5
@@ -18,15 +18,15 @@ import (
18 "golang.org/x/crypto/acme/autocert" 18 "golang.org/x/crypto/acme/autocert"
19 "golang.org/x/crypto/ssh" 19 "golang.org/x/crypto/ssh"
20 20
21 "gitbay.org/gitbay/internal/config"
22 "gitbay.org/gitbay/internal/ci" 21 "gitbay.org/gitbay/internal/ci"
22 "gitbay.org/gitbay/internal/config"
23 "gitbay.org/gitbay/internal/control" 23 "gitbay.org/gitbay/internal/control"
24 "gitbay.org/gitbay/internal/mail"
25 "gitbay.org/gitbay/internal/mirror"
26 "gitbay.org/gitbay/internal/notify"
27 "gitbay.org/gitbay/internal/gitd" 24 "gitbay.org/gitbay/internal/gitd"
28 "gitbay.org/gitbay/internal/hookd" 25 "gitbay.org/gitbay/internal/hookd"
29 "gitbay.org/gitbay/internal/httpd" 26 "gitbay.org/gitbay/internal/httpd"
27 "gitbay.org/gitbay/internal/mail"
28 "gitbay.org/gitbay/internal/mirror"
29 "gitbay.org/gitbay/internal/notify"
30 "gitbay.org/gitbay/internal/policy" 30 "gitbay.org/gitbay/internal/policy"
31 "gitbay.org/gitbay/internal/sshd" 31 "gitbay.org/gitbay/internal/sshd"
32 "gitbay.org/gitbay/internal/store" 32 "gitbay.org/gitbay/internal/store"
@@ -179,7 +179,6 @@ func serveCmd() *cobra.Command {
179 slog.Info("ssh handled by host sshd (ssh.mode = system)") 179 slog.Info("ssh handled by host sshd (ssh.mode = system)")
180 } 180 }
181 181
182
183 web := httpd.New(cfg, st) 182 web := httpd.New(cfg, st)
184 hs := &http.Server{Addr: cfg.HTTP.Addr, Handler: web.Handler()} 183 hs := &http.Server{Addr: cfg.HTTP.Addr, Handler: web.Handler()}
185 go func() { 184 go func() {
e2e/design_test.go +8 −8
@@ -43,15 +43,15 @@ func TestReadmeRelativeLinks(t *testing.T) {
43 t.Fatalf("tree: %d", status) 43 t.Fatalf("tree: %d", status)
44 } 44 }
45 for _, want := range []string{ 45 for _, want := range []string{
46 `href="/alice/site/blob/main/docs/guide.md"`, // relative link 46 `href="/alice/site/blob/main/docs/guide.md"`, // relative link
47 `href="/alice/site/blob/main/docs/paper.org"`, // .html mapped to .org source 47 `href="/alice/site/blob/main/docs/paper.org"`, // .html mapped to .org source
48 `src="/alice/site/raw/main/img/logo.png"`, // relative image via raw 48 `src="/alice/site/raw/main/img/logo.png"`, // relative image via raw
49 `src="https://example.org/pic.png"`, // remote image untouched 49 `src="https://example.org/pic.png"`, // remote image untouched
50 `href="https://example.org/x"`, // absolute untouched 50 `href="https://example.org/x"`, // absolute untouched
51 "<table>", "<td>verbose</td>", // GFM table renders 51 "<table>", "<td>verbose</td>", // GFM table renders
52 `<span class="kd">func</span>`, // fenced code highlighted via classes 52 `<span class="kd">func</span>`, // fenced code highlighted via classes
53 `href="/alice/site/blob/main/README.md">README.md</a>`, // clickable card header 53 `href="/alice/site/blob/main/README.md">README.md</a>`, // clickable card header
54 `<th scope="col">name</th>`, // file table column headers 54 `<th scope="col">name</th>`, // file table column headers
55 } { 55 } {
56 if !strings.Contains(body, want) { 56 if !strings.Contains(body, want) {
57 t.Errorf("missing %q", want) 57 t.Errorf("missing %q", want)
e2e/ssh_test.go +1 −1
@@ -54,7 +54,7 @@ func startInstance(t *testing.T) *instance {
54func startInstanceWith(t *testing.T, extra string) *instance { 54func startInstanceWith(t *testing.T, extra string) *instance {
55 t.Helper() 55 t.Helper()
56 inst := &instance{ 56 inst := &instance{
57 gitbayd: buildGitbayd(t), 57 gitbayd: buildGitbayd(t),
58 root: t.TempDir(), 58 root: t.TempDir(),
59 port: freePort(t), 59 port: freePort(t),
60 httpPort: freePort(t), 60 httpPort: freePort(t),