From 14c609a6682179e292e548252ebd5089ebbd60b2 Mon Sep 17 00:00:00 2001 From: Arran Hobson Sayers Date: Tue, 30 Apr 2024 12:08:40 +0100 Subject: [PATCH] Rename all abs-goodreads to abs-tract --- Dockerfile | 8 ++++---- Taskfile.yml | 8 ++++---- docker-compose.yaml | 6 +++--- go.mod | 2 +- goodreads/book.go | 2 +- goodreads/book_test.go | 2 +- goodreads/goodreads.go | 2 +- goodreads/goodreads_test.go | 2 +- goodreads/new.go | 2 +- goodreads/new_test.go | 2 +- kindle/book.go | 2 +- kindle/kindle.go | 2 +- kindle/kindle_test.go | 2 +- kindle/new.go | 2 +- kindle/new_test.go | 2 +- main.go | 2 +- server/book.go | 4 ++-- server/router.go | 2 +- utils/url_test.go | 2 +- 19 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e5e0ce..50dcbdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ # Builder Image FROM golang:1.21 as builder -WORKDIR /abs-goodreads +WORKDIR /abs-tract COPY . . RUN go mod download -RUN go build -v -o bin/abs-goodreads +RUN go build -v -o bin/abs-tract # Ditribution Image FROM alpine:latest RUN apk add --no-cache libc6-compat -COPY --from=builder /abs-goodreads/bin/abs-goodreads /abs-goodreads +COPY --from=builder /abs-tract/bin/abs-tract /abs-tract EXPOSE 5555 -ENTRYPOINT ["/abs-goodreads"] +ENTRYPOINT ["/abs-tract"] diff --git a/Taskfile.yml b/Taskfile.yml index 4a0b980..84c522c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,11 +22,11 @@ tasks: build: cmds: - - go build -v -o bin/abs-goodreads + - go build -v -o bin/abs-tract build:docker: cmds: - - docker build . -t arranhs/abs-goodreads + - docker build . -t arranhs/abs-tract run: cmds: @@ -37,6 +37,6 @@ tasks: cmds: - | docker run --rm \ - --name abs-goodreads \ + --name abs-tract \ -p 5555:5555 \ - arranhs/abs-goodreads + arranhs/abs-tract diff --git a/docker-compose.yaml b/docker-compose.yaml index 1a67a82..97ced28 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,10 +1,10 @@ version: "3.8" services: - abs-goodreads: - image: arranhs/abs-goodreads + abs-tract: + image: arranhs/abs-tract build: context: . - container_name: abs-goodreads + container_name: abs-tract ports: - "5555:5555" restart: unless-stopped diff --git a/go.mod b/go.mod index b6e08f6..e9c572b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ahobsonsayers/abs-goodreads +module github.com/ahobsonsayers/abs-tract go 1.21 diff --git a/goodreads/book.go b/goodreads/book.go index 946e7b6..ae25da6 100644 --- a/goodreads/book.go +++ b/goodreads/book.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" "github.com/k3a/html2text" "golang.org/x/text/language" "golang.org/x/text/language/display" diff --git a/goodreads/book_test.go b/goodreads/book_test.go index 4177403..aed5d4d 100644 --- a/goodreads/book_test.go +++ b/goodreads/book_test.go @@ -4,7 +4,7 @@ import ( "encoding/xml" "testing" - "github.com/ahobsonsayers/abs-goodreads/goodreads" + "github.com/ahobsonsayers/abs-tract/goodreads" "github.com/stretchr/testify/require" ) diff --git a/goodreads/goodreads.go b/goodreads/goodreads.go index 30dcef0..f6b6f2e 100644 --- a/goodreads/goodreads.go +++ b/goodreads/goodreads.go @@ -13,7 +13,7 @@ import ( "strings" "sync" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" "github.com/lithammer/fuzzysearch/fuzzy" "github.com/orsinium-labs/enum" "github.com/samber/lo" diff --git a/goodreads/goodreads_test.go b/goodreads/goodreads_test.go index 4541fde..0277880 100644 --- a/goodreads/goodreads_test.go +++ b/goodreads/goodreads_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/ahobsonsayers/abs-goodreads/goodreads" + "github.com/ahobsonsayers/abs-tract/goodreads" "github.com/samber/lo" "github.com/stretchr/testify/require" ) diff --git a/goodreads/new.go b/goodreads/new.go index 674d119..d0afa9c 100644 --- a/goodreads/new.go +++ b/goodreads/new.go @@ -6,7 +6,7 @@ import ( "net/url" "strings" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" ) // NewClient creates a new goodreads client. diff --git a/goodreads/new_test.go b/goodreads/new_test.go index 561aeed..c2d0158 100644 --- a/goodreads/new_test.go +++ b/goodreads/new_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - "github.com/ahobsonsayers/abs-goodreads/goodreads" + "github.com/ahobsonsayers/abs-tract/goodreads" "github.com/stretchr/testify/require" ) diff --git a/kindle/book.go b/kindle/book.go index 296ef9c..5f0d349 100644 --- a/kindle/book.go +++ b/kindle/book.go @@ -4,7 +4,7 @@ import ( "strings" "time" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" "github.com/antchfx/htmlquery" "github.com/antchfx/xpath" "golang.org/x/net/html" diff --git a/kindle/kindle.go b/kindle/kindle.go index a06b9a8..77ce70b 100644 --- a/kindle/kindle.go +++ b/kindle/kindle.go @@ -5,7 +5,7 @@ import ( "net/http" "net/url" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" "github.com/samber/lo" "golang.org/x/net/html" ) diff --git a/kindle/kindle_test.go b/kindle/kindle_test.go index de3526f..7cb61ef 100644 --- a/kindle/kindle_test.go +++ b/kindle/kindle_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/ahobsonsayers/abs-goodreads/kindle" + "github.com/ahobsonsayers/abs-tract/kindle" "github.com/samber/lo" "github.com/stretchr/testify/require" ) diff --git a/kindle/new.go b/kindle/new.go index c1312ec..92dee81 100644 --- a/kindle/new.go +++ b/kindle/new.go @@ -6,7 +6,7 @@ import ( "net/url" "strings" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" "github.com/samber/lo" ) diff --git a/kindle/new_test.go b/kindle/new_test.go index 725527b..36ebd11 100644 --- a/kindle/new_test.go +++ b/kindle/new_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - "github.com/ahobsonsayers/abs-goodreads/kindle" + "github.com/ahobsonsayers/abs-tract/kindle" "github.com/stretchr/testify/require" ) diff --git a/main.go b/main.go index d41a333..c739306 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ import ( "log" "net/http" - "github.com/ahobsonsayers/abs-goodreads/server" + "github.com/ahobsonsayers/abs-tract/server" ) //go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen -config .oapigen.yaml schema/openapi.yaml diff --git a/server/book.go b/server/book.go index c5d36d3..4d2380f 100644 --- a/server/book.go +++ b/server/book.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/ahobsonsayers/abs-goodreads/goodreads" - "github.com/ahobsonsayers/abs-goodreads/kindle" + "github.com/ahobsonsayers/abs-tract/goodreads" + "github.com/ahobsonsayers/abs-tract/kindle" "github.com/samber/lo" ) diff --git a/server/router.go b/server/router.go index 1f9229f..2591cc1 100644 --- a/server/router.go +++ b/server/router.go @@ -35,7 +35,7 @@ func NewRouter() (http.Handler, error) { // Includes recoverer middleware httplog.RequestLogger( httplog.NewLogger( - "abs-goodreads", + "abs-tract", httplog.Options{ LogLevel: slog.LevelDebug, RequestHeaders: true, diff --git a/utils/url_test.go b/utils/url_test.go index 7e521f2..4ed7d17 100644 --- a/utils/url_test.go +++ b/utils/url_test.go @@ -3,7 +3,7 @@ package utils_test import ( "testing" - "github.com/ahobsonsayers/abs-goodreads/utils" + "github.com/ahobsonsayers/abs-tract/utils" "github.com/stretchr/testify/require" )