mirror of
https://github.com/lyx0/ollama-twitch-bot.git
synced 2024-11-06 18:52:03 +01:00
cleanup
This commit is contained in:
parent
6f81209e91
commit
15ac5f523a
6 changed files with 10 additions and 27 deletions
|
@ -17,7 +17,7 @@ COPY .env .
|
|||
RUN go get -d -v ./...
|
||||
|
||||
# Build the Go app
|
||||
RUN go build ./cmd/nourybot
|
||||
RUN go build -o Nourybot.out .
|
||||
|
||||
# Run the executable
|
||||
CMD [ "./nourybot"]
|
||||
CMD [ "./Nourybot.out"]
|
||||
|
|
17
Makefile
17
Makefile
|
@ -1,18 +1,17 @@
|
|||
BINARY_NAME=Nourybot.out
|
||||
BINARY_NAME_API=NourybotApi.out
|
||||
build:
|
||||
go get -d -v ./...
|
||||
go build -o Nourybot.out .
|
||||
|
||||
run:
|
||||
./Nourybot.out
|
||||
|
||||
up:
|
||||
docker compose up
|
||||
|
||||
down:
|
||||
docker compose down
|
||||
docker compose build
|
||||
docker compose up
|
||||
|
||||
rebuild:
|
||||
docker compose down
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
|
||||
xd:
|
||||
docker compose down
|
||||
docker compose build
|
||||
docker compose up
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"github.com/gempir/go-twitch-irc/v4"
|
||||
"github.com/joho/godotenv"
|
||||
|
@ -28,16 +24,6 @@ type application struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)
|
||||
defer cancel()
|
||||
if err := run(ctx, os.Stdout, os.Args); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func run(ctx context.Context, w io.Writer, args []string) error {
|
||||
var cfg config
|
||||
|
||||
logger := zap.NewExample()
|
||||
|
@ -106,6 +92,4 @@ func run(ctx context.Context, w io.Writer, args []string) error {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
Loading…
Reference in a new issue