Skip to content

Commit

Permalink
start diverge
Browse files Browse the repository at this point in the history
  • Loading branch information
seemywingz committed Dec 21, 2024
1 parent 26e6fba commit 0581255
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 109 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.github/
helm/
files/
go.work*
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

FROM golang:1.21.5-alpine3.19 AS builder
ENV APP_NAME ponder
ENV WORKDIR /app
FROM golang:1.23.4-alpine3.21 AS builder
ENV APP_NAME=ponder
ENV WORKDIR=/app
WORKDIR $WORKDIR
COPY . .
RUN go mod download
RUN go build -o /$APP_NAME

## Deploy
FROM alpine:3.19.0
ENV APP_NAME ponder
FROM alpine:3.21.0
ENV APP_NAME=ponder
WORKDIR /
COPY --from=builder /$APP_NAME /$APP_NAME
ENTRYPOINT ["/ponder"]
24 changes: 0 additions & 24 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,27 +216,3 @@ func playAudio(audioContent []byte) {
// Wait for the audio to finish playing.
<-done
}

func playMP3File(file string) {
if verbose {
fmt.Println("🔊 Playing audio file:", file)
}

f, err := os.Open(file)
catchErr(err)
defer f.Close()

streamer, format, err := mp3.Decode(f)
catchErr(err)
defer streamer.Close()

err = speaker.Init(format.SampleRate, format.SampleRate.N(time.Second/10))
catchErr(err)

done := make(chan bool)
speaker.Play(beep.Seq(streamer, beep.Callback(func() {
done <- true
})))

<-done
}
44 changes: 21 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module github.com/seemywingz/ponder

go 1.22
go 1.23

require (
github.com/alecthomas/chroma v0.10.0
github.com/bwmarrin/discordgo v0.28.1
github.com/faiface/beep v1.1.0
github.com/pterm/pterm v0.12.79
github.com/pterm/pterm v0.12.80
github.com/seemywingz/goai v0.0.0-20240428060229-cce9aefb4824
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
periph.io/x/conn/v3 v3.7.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
periph.io/x/conn/v3 v3.7.1
periph.io/x/host/v3 v3.8.2
)

Expand All @@ -19,38 +19,36 @@ require (
atomicgo.dev/keyboard v0.2.9 // indirect
atomicgo.dev/schedule v0.1.0 // indirect
github.com/containerd/console v1.0.4 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hajimehoshi/go-mp3 v0.3.4 // indirect
github.com/hajimehoshi/oto v1.0.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/exp/shiny v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/image v0.15.0 // indirect
golang.org/x/mobile v0.0.0-20240404231514-09dbf07665ed // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
golang.org/x/exp/shiny v0.0.0-20241217172543-b2144cdd0a67 // indirect
golang.org/x/image v0.23.0 // indirect
golang.org/x/mobile v0.0.0-20241213221354-a87c1cf6cf46 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 0581255

Please sign in to comment.