From e986d8884ae7940dbdb7282cdc40f70d010feaac Mon Sep 17 00:00:00 2001 From: maximo tejeda Date: Mon, 2 Dec 2024 20:11:31 -0400 Subject: [PATCH] fix imports --- Dockerfile | 4 +++- cmd/crawler/main.go | 8 ++++---- go.mod | 3 ++- go.sum | 2 ++ internal/adapters/crawler/apap.go | 8 ++++---- internal/adapters/crawler/bcd.go | 8 ++++---- internal/adapters/crawler/bdr.go | 8 ++++---- internal/adapters/crawler/bhd.go | 8 ++++---- internal/adapters/crawler/bnc.go | 8 ++++---- internal/adapters/crawler/bpd.go | 6 +++--- internal/adapters/crawler/crawler.go | 2 +- internal/adapters/crawler/inf.go | 8 ++++---- internal/adapters/crawler/scotia.go | 8 ++++---- internal/adapters/crawler/vimenca.go | 8 ++++---- internal/adapters/dolar/dolar.go | 4 ++-- internal/application/core/api/api.go | 4 ++-- internal/ports/api.go | 2 +- internal/ports/dolar.go | 2 +- 18 files changed, 53 insertions(+), 48 deletions(-) diff --git a/Dockerfile b/Dockerfile index ace329e..446e176 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,10 @@ ARG version=not-set ARG SHORTSHA=not-set WORKDIR /app COPY . . +ENV GOPRIVATE=git.maximotejeda.com/maximo,github.com/maximotejeda +ENV GOPROXY=direct # https://stackoverflow.com/questions/70369368/check-architecture-in-dockerfile-to-get-amd-arm -RUN GOPROXY=direct go build -o bin/crawler \ +RUN go build -o bin/crawler \ -ldflags "-X main.Shortsha=${SHORTSHA} \ -X main.Version=${version} \ -X main.Aarch=${TARGETARCH}" ./cmd diff --git a/cmd/crawler/main.go b/cmd/crawler/main.go index 567ef98..88163fa 100644 --- a/cmd/crawler/main.go +++ b/cmd/crawler/main.go @@ -3,10 +3,10 @@ package main import ( "log/slog" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/internal/adapters/crawler" - dl "github.com/maximotejeda/us_dop_scrapper/internal/adapters/dolar" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/api" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/adapters/crawler" + dl "git.maximotejeda.com/maximo/us_dop_scrapper/internal/adapters/dolar" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/api" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/go.mod b/go.mod index a78ed45..21203f6 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,11 @@ -module github.com/maximotejeda/us_dop_scrapper +module git.maximotejeda.com/maximo/us_dop_scrapper go 1.23 toolchain go1.23.2 require ( + git.maximotejeda.com/maximo/dolar v0.0.1 github.com/nats-io/nats.go v1.34.1 github.com/playwright-community/playwright-go v0.4001.0 golang.org/x/text v0.16.0 diff --git a/go.sum b/go.sum index 7bd2939..9ec0d06 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +git.maximotejeda.com/maximo/dolar v0.0.1 h1:pRO0qHRHzKlTsZtXRM4QT8VjPsS2AwOduOKIISWbXTU= +git.maximotejeda.com/maximo/dolar v0.0.1/go.mod h1:I3q+2GDNEwMSfSLg/7g5lkI+EWPR/90JvMO94KoFKBs= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/adapters/crawler/apap.go b/internal/adapters/crawler/apap.go index f1955df..b0f756d 100644 --- a/internal/adapters/crawler/apap.go +++ b/internal/adapters/crawler/apap.go @@ -6,10 +6,10 @@ import ( "log/slog" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/bcd.go b/internal/adapters/crawler/bcd.go index e44a2a4..158e59a 100644 --- a/internal/adapters/crawler/bcd.go +++ b/internal/adapters/crawler/bcd.go @@ -6,10 +6,10 @@ import ( "log/slog" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/bdr.go b/internal/adapters/crawler/bdr.go index 4d85c80..30b7385 100644 --- a/internal/adapters/crawler/bdr.go +++ b/internal/adapters/crawler/bdr.go @@ -6,10 +6,10 @@ import ( "log/slog" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/bhd.go b/internal/adapters/crawler/bhd.go index 7986728..7aee13d 100644 --- a/internal/adapters/crawler/bhd.go +++ b/internal/adapters/crawler/bhd.go @@ -7,10 +7,10 @@ import ( "strings" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/bnc.go b/internal/adapters/crawler/bnc.go index 732d9ff..3ac274c 100644 --- a/internal/adapters/crawler/bnc.go +++ b/internal/adapters/crawler/bnc.go @@ -6,10 +6,10 @@ import ( "log/slog" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/bpd.go b/internal/adapters/crawler/bpd.go index 8ebef4f..309ad7d 100644 --- a/internal/adapters/crawler/bpd.go +++ b/internal/adapters/crawler/bpd.go @@ -7,9 +7,9 @@ import ( "strconv" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/crawler.go b/internal/adapters/crawler/crawler.go index c4af8cb..b716e76 100644 --- a/internal/adapters/crawler/crawler.go +++ b/internal/adapters/crawler/crawler.go @@ -3,7 +3,7 @@ package crawler import ( "fmt" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" ) func Selector(who string, client ports.DollarPort) (ports.APIPorts, error) { diff --git a/internal/adapters/crawler/inf.go b/internal/adapters/crawler/inf.go index d1a26e4..d0d89b8 100644 --- a/internal/adapters/crawler/inf.go +++ b/internal/adapters/crawler/inf.go @@ -6,10 +6,10 @@ import ( "strings" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/scotia.go b/internal/adapters/crawler/scotia.go index 6f64583..c450dd3 100644 --- a/internal/adapters/crawler/scotia.go +++ b/internal/adapters/crawler/scotia.go @@ -7,10 +7,10 @@ import ( "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/crawler/vimenca.go b/internal/adapters/crawler/vimenca.go index 80ec1e6..bf9b801 100644 --- a/internal/adapters/crawler/vimenca.go +++ b/internal/adapters/crawler/vimenca.go @@ -5,10 +5,10 @@ import ( "log/slog" "time" - "github.com/maximotejeda/us_dop_scrapper/config" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/config" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/adapters/dolar/dolar.go b/internal/adapters/dolar/dolar.go index 8c9bbdc..b473780 100644 --- a/internal/adapters/dolar/dolar.go +++ b/internal/adapters/dolar/dolar.go @@ -4,7 +4,7 @@ import ( "context" dl "git.maximotejeda.com/maximo/dolar/proto/golang/dolar" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" "google.golang.org/grpc" ) @@ -14,7 +14,7 @@ type Adapter struct { } func NewAdapter(conn *grpc.ClientConn) (*Adapter, error) { - client := dolar.NewDollarClient(conn) + client := dl.NewDollarClient(conn) return &Adapter{dolar: client, conn: conn}, nil } diff --git a/internal/application/core/api/api.go b/internal/application/core/api/api.go index c5b706c..e34e92b 100644 --- a/internal/application/core/api/api.go +++ b/internal/application/core/api/api.go @@ -6,8 +6,8 @@ import ( "os" "time" - "github.com/maximotejeda/us_dop_scrapper/helpers" - "github.com/maximotejeda/us_dop_scrapper/internal/ports" + "git.maximotejeda.com/maximo/us_dop_scrapper/helpers" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports" "github.com/playwright-community/playwright-go" ) diff --git a/internal/ports/api.go b/internal/ports/api.go index 6af15f4..1d61c3e 100644 --- a/internal/ports/api.go +++ b/internal/ports/api.go @@ -4,7 +4,7 @@ import ( "context" "log/slog" - "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" + "git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain" "github.com/playwright-community/playwright-go" ) diff --git a/internal/ports/dolar.go b/internal/ports/dolar.go index 5afa696..c13afdd 100644 --- a/internal/ports/dolar.go +++ b/internal/ports/dolar.go @@ -1,6 +1,6 @@ package ports -import "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain" +import "git.maximotejeda.com/maximogo /us_dop_scrapper/internal/application/core/domain" type DollarPort interface { NewHistory(*domain.History) error