Skip to content

Commit 2f8c881

Browse files
chore: drop unused modules; use nix for tests
1 parent 56d8f82 commit 2f8c881

File tree

9 files changed

+16
-167
lines changed

9 files changed

+16
-167
lines changed

.envrc.local

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if use flake; then
2+
use flake
3+
fi

.github/workflows/test.yaml

+8-20
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
go-version: ["1.22.x"]
11+
permissions:
12+
id-token: "write"
13+
contents: "read"
1414

1515
services:
1616
postgres:
@@ -29,20 +29,8 @@ jobs:
2929

3030
steps:
3131
- uses: actions/checkout@v4
32-
- name: Setup Go ${{ matrix.go-version }}
33-
uses: actions/setup-go@v5
34-
with:
35-
go-version: ${{ matrix.go-version }}
36-
37-
- name: Restore Cache
38-
uses: actions/cache@v4
39-
with:
40-
path: |
41-
~/.cache/go-build
42-
~/go/pkg/mod
43-
key: ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }}
44-
restore-keys: |
45-
${{ runner.os }}-go-
46-
47-
- name: Run Tests
48-
run: go test -v ./...
32+
- uses: DeterminateSystems/nix-installer-action@main
33+
- uses: DeterminateSystems/magic-nix-cache-action@main
34+
- uses: DeterminateSystems/flake-checker-action@main
35+
- name: Test
36+
run: nix develop --command go test -count=1 -race -v ./...

http/htmx/incoming_message.go

-54
This file was deleted.

http/htmx/outgoing_message.go

-48
This file was deleted.

http/httpresponse/templ.go

-23
This file was deleted.

http/httpserver/server.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ var _ startstop.Starter = (*Server)(nil)
1919

2020
type Server struct {
2121
log *slog.Logger
22-
config *ServerConfig
22+
config *Config
2323
servers []*http.Server
2424
launched bool
2525
}
2626

27-
type ServerConfig struct {
27+
type Config struct {
2828
Handler http.Handler
2929

3030
// If EnableACME flag is this option is ignored.
@@ -35,8 +35,8 @@ type ServerConfig struct {
3535
ACMEHosts []string
3636
}
3737

38-
// NewServer creates a new HTTP server using the provded config.
39-
func NewServer(config *ServerConfig) *Server {
38+
// New creates a new HTTP server using the provded config.
39+
func New(config *Config) *Server {
4040
debug.Assert(config.Handler != nil, "expected Handler to be configured")
4141

4242
return &Server{

template/htmltemplate/render.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// Renderer renders a template using provided underlying engine.
1010
type Renderer interface {
1111
// Render renders a template with the given name and data.
12-
Render(w io.Writer, name string, data any) error
12+
Render(io.Writer, string, any) error
1313
}
1414

1515
type renderer struct {

template/templcomponent/component.go

-2
This file was deleted.

template/templcomponent/empty.go

-15
This file was deleted.

0 commit comments

Comments
 (0)