From ae28ce34f793877241380ba3571664c03bb67705 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 20:26:24 +0400 Subject: [PATCH] chore(deps): update golang docker tag to v1.20 (#190) * chore(deps): update golang docker tag to v1.20 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com> --- .github/actions/newman/action.yml | 6 +- .github/workflows/release.yml | 38 +++++-------- .github/workflows/tests.yml | 55 ++++++------------- CHANGELOG.md | 3 +- Dockerfile | 4 +- Makefile | 2 +- cmd/mikrotik-hosts-parser/main.go | 3 +- docker-compose.yml | 2 +- go.mod | 4 +- internal/pkg/cli/healthcheck/command.go | 2 +- internal/pkg/cli/root.go | 13 +++-- internal/pkg/cli/serve/command.go | 9 +-- internal/pkg/cli/serve/flags.go | 2 +- .../pkg/http/handlers/api/settings/handler.go | 5 +- .../handlers/api/settings/handler_test.go | 6 +- .../pkg/http/handlers/generate/handler.go | 10 ++-- .../http/handlers/generate/handler_test.go | 4 +- .../pkg/http/handlers/metrics/handler_test.go | 3 +- internal/pkg/http/routes.go | 21 +++---- internal/pkg/http/server.go | 10 ++-- internal/pkg/http/server_test.go | 5 +- internal/pkg/metrics/generator_test.go | 6 +- internal/pkg/metrics/metrics_test.go | 3 +- 23 files changed, 95 insertions(+), 121 deletions(-) diff --git a/.github/actions/newman/action.yml b/.github/actions/newman/action.yml index af3c66cd..0e0e85a3 100644 --- a/.github/actions/newman/action.yml +++ b/.github/actions/newman/action.yml @@ -22,8 +22,8 @@ runs: - name: Pull newman docker image shell: bash run: | - if [[ "$(docker images -q postman/newman:5.2-alpine 2> /dev/null)" == "" ]]; then - docker pull postman/newman:5.2-alpine 1>/dev/null + if [[ "$(docker images -q postman/newman:5.3-alpine 2> /dev/null)" == "" ]]; then + docker pull postman/newman:5.3-alpine 1>/dev/null fi # Image page: , @@ -37,7 +37,7 @@ runs: --net host \ --volume "$(pwd):/rootfs:ro" \ --workdir "/rootfs" \ - postman/newman:5.2-alpine run "${{ inputs.collection }}" \ + postman/newman:5.3-alpine run "${{ inputs.collection }}" \ --environment "${{ inputs.environment }}" \ --env-var "base_url=${{ inputs.baseurl }}" \ --color on diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 362f6cfe..3f523d03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: build: name: Build for ${{ matrix.os }} (${{ matrix.arch }}) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -19,30 +19,24 @@ jobs: - os: windows arch: 386 steps: - - name: Set up Go - uses: actions/setup-go@v3 - with: {go-version: 1.19} + - uses: actions/checkout@v3 - - name: Check out code - uses: actions/checkout@v3 + - uses: gacts/setup-go-with-cache@v1 + with: {go-version-file: go.mod} - - uses: gacts/github-slug@v1 - id: slug + - {uses: gacts/github-slug@v1, id: slug} - name: Generate builder values id: values run: | echo "::set-output name=binary-name::mikrotik-hosts-parser-${{ matrix.os }}-${{ matrix.arch }}`[ ${{ matrix.os }} = 'windows' ] && echo '.exe'`" - - name: Install Go dependencies - run: go mod download - - name: Build application env: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} CGO_ENABLED: 0 - LDFLAGS: -s -w -X github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version.version=${{ steps.slug.outputs.version }} + LDFLAGS: -s -w -X gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version.version=${{ steps.slug.outputs.version }} run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/mikrotik-hosts-parser/ - name: Upload binaries to release @@ -55,28 +49,22 @@ jobs: docker-image: name: Build docker image - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 # Action page: + - {uses: gacts/github-slug@v1, id: slug} - - uses: gacts/github-slug@v1 - id: slug + - uses: docker/setup-qemu-action@v2 # Action page: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 # Action page: + - uses: docker/setup-buildx-action@v2 # Action page: - - name: Login to default Container Registry - uses: docker/login-action@v2 # Action page: + - uses: docker/login-action@v2 # Action page: with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 # Action page: + - uses: docker/login-action@v2 # Action page: with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c47c4b2e..d622d346 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ concurrency: jobs: gitleaks: name: Gitleaks - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: {fetch-depth: 0} @@ -25,18 +25,18 @@ jobs: golangci-lint: name: Golang-CI (lint) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: gacts/setup-go-with-cache@v1 with: {go-version: 1.19} - uses: golangci/golangci-lint-action@v3 # Action page: goreportcard: name: Update state on goreportcard.com - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' # only for `master` branch steps: - name: Send update request @@ -45,23 +45,13 @@ jobs: go-test: name: Unit tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 - with: {go-version: 1.19} - - uses: actions/checkout@v3 - with: - fetch-depth: 2 # Fixes codecov error 'Issue detecting commit SHA' - - - name: Go modules Cache # Docs: - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- + with: {fetch-depth: 2} # Fixes codecov error 'Issue detecting commit SHA' - - run: go mod download + - uses: gacts/setup-go-with-cache@v1 + with: {go-version-file: go.mod} - run: go test -race -covermode=atomic -coverprofile /tmp/coverage.txt ./... @@ -74,7 +64,7 @@ jobs: build: name: Build for ${{ matrix.os }} (${{ matrix.arch }}) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -87,28 +77,18 @@ jobs: arch: 386 needs: [golangci-lint, go-test] steps: - - uses: actions/setup-go@v3 - with: {go-version: 1.19} - - uses: actions/checkout@v3 - - uses: gacts/github-slug@v1 - id: slug - - - name: Go modules Cache # Docs: - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- + - uses: gacts/setup-go-with-cache@v1 + with: {go-version-file: go.mod} - - run: go mod download + - {uses: gacts/github-slug@v1, id: slug} - env: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} CGO_ENABLED: 0 - LDFLAGS: -s -w -X github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version.version=${{ steps.slug.outputs.branch-name-slug }}@${{ steps.slug.outputs.commit-hash-short }} + LDFLAGS: -s -w -X gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version.version=${{ steps.slug.outputs.branch-name-slug }}@${{ steps.slug.outputs.commit-hash-short }} run: go build -trimpath -ldflags "$LDFLAGS" -o /tmp/mikrotik-hosts-parser ./cmd/mikrotik-hosts-parser/ - name: Try to execute @@ -125,7 +105,7 @@ jobs: e2e: name: End-to-End tests (cache in ${{ matrix.caching-engine }}) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -158,13 +138,12 @@ jobs: docker-image: name: Build docker image - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [golangci-lint, go-test] steps: - uses: actions/checkout@v3 - - uses: gacts/github-slug@v1 - id: slug + - {uses: gacts/github-slug@v1, id: slug} - name: Build image run: | @@ -194,7 +173,7 @@ jobs: docker-image-e2e: name: Docker image End-to-End tests (cache in ${{ matrix.caching-engine }}) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md index 933711b3..9fef7f9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ The format is based on [Keep a Changelog][keepachangelog] and this project adher ### Changed -- Go version updated from `1.17.2` up to `1.19` +- Go version updated from `1.17.2` up to `1.20` +- Module name changed from `github.com/tarampampam/mikrotik-hosts-parser/v4` to `gh.tarampamp.am/mikrotik-hosts-parser/v4` ## v4.4.0 diff --git a/Dockerfile b/Dockerfile index 520434c3..09be99ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1.2 # Image page: -FROM golang:1.19-alpine as builder +FROM golang:1.20-alpine as builder # can be passed with any prefix (like `v1.2.3@GITHASH`) # e.g.: `docker build --build-arg "APP_VERSION=v1.2.3@GITHASH" .` @@ -19,7 +19,7 @@ WORKDIR /src COPY . . # arguments to pass on each go tool link invocation -ENV LDFLAGS="-s -w -X github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version.version=$APP_VERSION" +ENV LDFLAGS="-s -w -X gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version.version=$APP_VERSION" RUN set -x \ && go version \ diff --git a/Makefile b/Makefile index c705c9d3..daf3f934 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Makefile readme (en): SHELL = /bin/sh -LDFLAGS = "-s -w -X github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version.version=$(shell git rev-parse HEAD)" +LDFLAGS = "-s -w -X gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version.version=$(shell git rev-parse HEAD)" DC_RUN_ARGS = --rm --user "$(shell id -u):$(shell id -g)" APP_NAME = $(notdir $(CURDIR)) diff --git a/cmd/mikrotik-hosts-parser/main.go b/cmd/mikrotik-hosts-parser/main.go index 14465613..bf51dbdf 100644 --- a/cmd/mikrotik-hosts-parser/main.go +++ b/cmd/mikrotik-hosts-parser/main.go @@ -6,7 +6,8 @@ import ( "path/filepath" "github.com/fatih/color" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cli" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cli" ) // exitFn is a function for application exiting. diff --git a/docker-compose.yml b/docker-compose.yml index e18b7c47..3ea855f7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ volumes: services: app: &app-service - image: golang:1.19-buster # Image page: + image: golang:1.20-buster # Image page: working_dir: /src environment: HOME: /tmp diff --git a/go.mod b/go.mod index 9ef5f3fb..79210f62 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/tarampampam/mikrotik-hosts-parser/v4 +module gh.tarampamp.am/mikrotik-hosts-parser/v4 -go 1.19 +go 1.20 require ( github.com/a8m/envsubst v1.3.0 diff --git a/internal/pkg/cli/healthcheck/command.go b/internal/pkg/cli/healthcheck/command.go index 8f616806..76b119e9 100644 --- a/internal/pkg/cli/healthcheck/command.go +++ b/internal/pkg/cli/healthcheck/command.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/env" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/env" ) type checker interface { diff --git a/internal/pkg/cli/root.go b/internal/pkg/cli/root.go index d52aa62f..25f57170 100644 --- a/internal/pkg/cli/root.go +++ b/internal/pkg/cli/root.go @@ -5,12 +5,13 @@ import ( "context" "github.com/spf13/cobra" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/checkers" - healthcheckCmd "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cli/healthcheck" - serveCmd "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cli/serve" - versionCmd "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cli/version" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/logger" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/checkers" + healthcheckCmd "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cli/healthcheck" + serveCmd "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cli/serve" + versionCmd "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cli/version" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/logger" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version" ) // NewCommand creates root command. diff --git a/internal/pkg/cli/serve/command.go b/internal/pkg/cli/serve/command.go index 316ce553..fcca4b93 100644 --- a/internal/pkg/cli/serve/command.go +++ b/internal/pkg/cli/serve/command.go @@ -11,11 +11,12 @@ import ( "github.com/go-redis/redis/v8" "github.com/spf13/cobra" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/breaker" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" - appHttp "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http" "go.uber.org/zap" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/breaker" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" + appHttp "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http" ) const cachingEngineMemory, cachingEngineRedis = "memory", "redis" diff --git a/internal/pkg/cli/serve/flags.go b/internal/pkg/cli/serve/flags.go index 878cfe4b..0f5a03a1 100644 --- a/internal/pkg/cli/serve/flags.go +++ b/internal/pkg/cli/serve/flags.go @@ -12,7 +12,7 @@ import ( "github.com/go-redis/redis/v8" "github.com/spf13/pflag" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/env" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/env" ) type flags struct { diff --git a/internal/pkg/http/handlers/api/settings/handler.go b/internal/pkg/http/handlers/api/settings/handler.go index af2d91b9..9ed49010 100644 --- a/internal/pkg/http/handlers/api/settings/handler.go +++ b/internal/pkg/http/handlers/api/settings/handler.go @@ -5,9 +5,8 @@ import ( "encoding/json" "net/http" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" ) type ( diff --git a/internal/pkg/http/handlers/api/settings/handler_test.go b/internal/pkg/http/handlers/api/settings/handler_test.go index 18cd03ac..40f0fe52 100644 --- a/internal/pkg/http/handlers/api/settings/handler_test.go +++ b/internal/pkg/http/handlers/api/settings/handler_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - "github.com/stretchr/testify/assert" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" ) func TestNewHandler(t *testing.T) { diff --git a/internal/pkg/http/handlers/generate/handler.go b/internal/pkg/http/handlers/generate/handler.go index 4ba8b101..602ddced 100644 --- a/internal/pkg/http/handlers/generate/handler.go +++ b/internal/pkg/http/handlers/generate/handler.go @@ -19,11 +19,11 @@ import ( "go.uber.org/zap" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version" - "github.com/tarampampam/mikrotik-hosts-parser/v4/pkg/hostsfile" - "github.com/tarampampam/mikrotik-hosts-parser/v4/pkg/mikrotik" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/pkg/hostsfile" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/pkg/mikrotik" ) type metrics interface { diff --git a/internal/pkg/http/handlers/generate/handler_test.go b/internal/pkg/http/handlers/generate/handler_test.go index 663408f6..deb97363 100644 --- a/internal/pkg/http/handlers/generate/handler_test.go +++ b/internal/pkg/http/handlers/generate/handler_test.go @@ -17,8 +17,8 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" ) type fakeHTTPClientFunc func(*http.Request) (*http.Response, error) diff --git a/internal/pkg/http/handlers/metrics/handler_test.go b/internal/pkg/http/handlers/metrics/handler_test.go index 6abf1029..a6e7cfa8 100644 --- a/internal/pkg/http/handlers/metrics/handler_test.go +++ b/internal/pkg/http/handlers/metrics/handler_test.go @@ -7,7 +7,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/metrics" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/metrics" ) func TestNewHandlerError(t *testing.T) { diff --git a/internal/pkg/http/routes.go b/internal/pkg/http/routes.go index cfe78e13..8be1109a 100644 --- a/internal/pkg/http/routes.go +++ b/internal/pkg/http/routes.go @@ -4,16 +4,17 @@ import ( "net/http" "github.com/prometheus/client_golang/prometheus" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/checkers" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/fileserver" - apiSettings "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/api/settings" - apiVersion "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/api/version" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/generate" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/healthz" - metricsHandler "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/metrics" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/middlewares/nocache" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/metrics" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/version" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/checkers" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/fileserver" + apiSettings "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/api/settings" + apiVersion "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/api/version" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/generate" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/healthz" + metricsHandler "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/handlers/metrics" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/middlewares/nocache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/metrics" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/version" ) func (s *Server) registerScriptGeneratorHandlers(registerer prometheus.Registerer) error { diff --git a/internal/pkg/http/server.go b/internal/pkg/http/server.go index 4a655daf..7f15783f 100644 --- a/internal/pkg/http/server.go +++ b/internal/pkg/http/server.go @@ -13,11 +13,11 @@ import ( "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/middlewares/logreq" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/http/middlewares/panic" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/metrics" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/middlewares/logreq" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/http/middlewares/panic" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/metrics" ) type ( diff --git a/internal/pkg/http/server_test.go b/internal/pkg/http/server_test.go index eaa3bd42..ac5f26bd 100644 --- a/internal/pkg/http/server_test.go +++ b/internal/pkg/http/server_test.go @@ -11,9 +11,10 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/cache" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/config" "go.uber.org/zap" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/cache" + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/config" ) func getRandomTCPPort(t *testing.T) (int, error) { diff --git a/internal/pkg/metrics/generator_test.go b/internal/pkg/metrics/generator_test.go index 24c8889e..5a4800a0 100644 --- a/internal/pkg/metrics/generator_test.go +++ b/internal/pkg/metrics/generator_test.go @@ -4,12 +4,12 @@ import ( "testing" "time" - dto "github.com/prometheus/client_model/go" - "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" + dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/metrics" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/metrics" ) func TestGenerator_Register(t *testing.T) { diff --git a/internal/pkg/metrics/metrics_test.go b/internal/pkg/metrics/metrics_test.go index b3dd98d4..5dcf405c 100644 --- a/internal/pkg/metrics/metrics_test.go +++ b/internal/pkg/metrics/metrics_test.go @@ -5,7 +5,8 @@ import ( "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" - "github.com/tarampampam/mikrotik-hosts-parser/v4/internal/pkg/metrics" + + "gh.tarampamp.am/mikrotik-hosts-parser/v4/internal/pkg/metrics" ) func TestNewRegistry(t *testing.T) {