Skip to content

Commit 0581255

Browse files
committed
start diverge
1 parent 26e6fba commit 0581255

File tree

5 files changed

+74
-109
lines changed

5 files changed

+74
-109
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.github/
22
helm/
33
files/
4+
go.work*

Dockerfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
2-
FROM golang:1.21.5-alpine3.19 AS builder
3-
ENV APP_NAME ponder
4-
ENV WORKDIR /app
1+
FROM golang:1.23.4-alpine3.21 AS builder
2+
ENV APP_NAME=ponder
3+
ENV WORKDIR=/app
54
WORKDIR $WORKDIR
65
COPY . .
76
RUN go mod download
87
RUN go build -o /$APP_NAME
98

109
## Deploy
11-
FROM alpine:3.19.0
12-
ENV APP_NAME ponder
10+
FROM alpine:3.21.0
11+
ENV APP_NAME=ponder
1312
WORKDIR /
1413
COPY --from=builder /$APP_NAME /$APP_NAME
1514
ENTRYPOINT ["/ponder"]

cmd/utils.go

-24
Original file line numberDiff line numberDiff line change
@@ -216,27 +216,3 @@ func playAudio(audioContent []byte) {
216216
// Wait for the audio to finish playing.
217217
<-done
218218
}
219-
220-
func playMP3File(file string) {
221-
if verbose {
222-
fmt.Println("🔊 Playing audio file:", file)
223-
}
224-
225-
f, err := os.Open(file)
226-
catchErr(err)
227-
defer f.Close()
228-
229-
streamer, format, err := mp3.Decode(f)
230-
catchErr(err)
231-
defer streamer.Close()
232-
233-
err = speaker.Init(format.SampleRate, format.SampleRate.N(time.Second/10))
234-
catchErr(err)
235-
236-
done := make(chan bool)
237-
speaker.Play(beep.Seq(streamer, beep.Callback(func() {
238-
done <- true
239-
})))
240-
241-
<-done
242-
}

go.mod

+21-23
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/seemywingz/ponder
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/alecthomas/chroma v0.10.0
77
github.com/bwmarrin/discordgo v0.28.1
88
github.com/faiface/beep v1.1.0
9-
github.com/pterm/pterm v0.12.79
9+
github.com/pterm/pterm v0.12.80
1010
github.com/seemywingz/goai v0.0.0-20240428060229-cce9aefb4824
11-
github.com/spf13/cobra v1.8.0
12-
github.com/spf13/viper v1.18.2
13-
periph.io/x/conn/v3 v3.7.0
11+
github.com/spf13/cobra v1.8.1
12+
github.com/spf13/viper v1.19.0
13+
periph.io/x/conn/v3 v3.7.1
1414
periph.io/x/host/v3 v3.8.2
1515
)
1616

@@ -19,38 +19,36 @@ require (
1919
atomicgo.dev/keyboard v0.2.9 // indirect
2020
atomicgo.dev/schedule v0.1.0 // indirect
2121
github.com/containerd/console v1.0.4 // indirect
22-
github.com/dlclark/regexp2 v1.11.0 // indirect
23-
github.com/fsnotify/fsnotify v1.7.0 // indirect
22+
github.com/dlclark/regexp2 v1.11.4 // indirect
23+
github.com/fsnotify/fsnotify v1.8.0 // indirect
2424
github.com/gookit/color v1.5.4 // indirect
25-
github.com/gorilla/websocket v1.4.2 // indirect
26-
github.com/hajimehoshi/go-mp3 v0.3.4 // indirect
27-
github.com/hajimehoshi/oto v1.0.1 // indirect
25+
github.com/gorilla/websocket v1.5.3 // indirect
2826
github.com/hashicorp/hcl v1.0.0 // indirect
2927
github.com/inconshreveable/mousetrap v1.1.0 // indirect
3028
github.com/lithammer/fuzzysearch v1.1.8 // indirect
31-
github.com/magiconair/properties v1.8.7 // indirect
32-
github.com/mattn/go-runewidth v0.0.15 // indirect
29+
github.com/magiconair/properties v1.8.9 // indirect
30+
github.com/mattn/go-runewidth v0.0.16 // indirect
3331
github.com/mitchellh/mapstructure v1.5.0 // indirect
34-
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
32+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
3533
github.com/pkg/errors v0.9.1 // indirect
3634
github.com/rivo/uniseg v0.4.7 // indirect
37-
github.com/sagikazarmark/locafero v0.4.0 // indirect
35+
github.com/sagikazarmark/locafero v0.6.0 // indirect
3836
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
3937
github.com/sourcegraph/conc v0.3.0 // indirect
4038
github.com/spf13/afero v1.11.0 // indirect
41-
github.com/spf13/cast v1.6.0 // indirect
39+
github.com/spf13/cast v1.7.1 // indirect
4240
github.com/spf13/pflag v1.0.5 // indirect
4341
github.com/subosito/gotenv v1.6.0 // indirect
4442
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
4543
go.uber.org/multierr v1.11.0 // indirect
46-
golang.org/x/crypto v0.16.0 // indirect
47-
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
48-
golang.org/x/exp/shiny v0.0.0-20240416160154-fe59bbe5cc7f // indirect
49-
golang.org/x/image v0.15.0 // indirect
50-
golang.org/x/mobile v0.0.0-20240404231514-09dbf07665ed // indirect
51-
golang.org/x/sys v0.19.0 // indirect
52-
golang.org/x/term v0.19.0 // indirect
53-
golang.org/x/text v0.14.0 // indirect
44+
golang.org/x/crypto v0.31.0 // indirect
45+
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
46+
golang.org/x/exp/shiny v0.0.0-20241217172543-b2144cdd0a67 // indirect
47+
golang.org/x/image v0.23.0 // indirect
48+
golang.org/x/mobile v0.0.0-20241213221354-a87c1cf6cf46 // indirect
49+
golang.org/x/sys v0.28.0 // indirect
50+
golang.org/x/term v0.27.0 // indirect
51+
golang.org/x/text v0.21.0 // indirect
5452
gopkg.in/ini.v1 v1.67.0 // indirect
5553
gopkg.in/yaml.v3 v3.0.1 // indirect
5654
)

0 commit comments

Comments
 (0)