From 0df82ba272948fb676445ac7184991429cb025b6 Mon Sep 17 00:00:00 2001 From: Grzegorz Dlugoszewski Date: Mon, 25 Aug 2025 20:22:12 +0200 Subject: [PATCH] Update incorrect module name - Go requires a domain-based path for public modules --- .goreleaser.yml | 8 ++++---- cmd/get.go | 7 ++++--- cmd/list.go | 7 ++++--- go.mod | 2 +- pkg/get.go | 3 ++- pkg/git/config.go | 2 +- pkg/git/config_test.go | 5 +++-- pkg/git/finder_test.go | 3 ++- pkg/git/repo.go | 3 ++- pkg/git/repo_test.go | 3 ++- pkg/git/test/helpers.go | 3 ++- pkg/list.go | 7 ++++--- pkg/url_test.go | 3 ++- 13 files changed, 33 insertions(+), 23 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index dfe9b07..fc0a2af 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,8 +10,8 @@ builds: binary: git-get ldflags: - -s -w - - -X git-get/pkg/cfg.version={{.Version}} - - -X git-get/pkg/cfg.commit={{.Commit}} + - -X github.com/grdl/git-get/pkg/cfg.version={{.Version}} + - -X github.com/grdl/git-get/pkg/cfg.commit={{.Commit}} goos: - linux - windows @@ -26,8 +26,8 @@ builds: binary: git-get ldflags: - -s -w - - -X git-get/pkg/cfg.version={{.Version}} - - -X git-get/pkg/cfg.commit={{.Commit}} + - -X github.com/grdl/git-get/pkg/cfg.version={{.Version}} + - -X github.com/grdl/git-get/pkg/cfg.commit={{.Commit}} goos: - darwin goarch: diff --git a/cmd/get.go b/cmd/get.go index b54f73e..9fc255d 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -2,11 +2,12 @@ package main import ( "fmt" - "git-get/pkg" - "git-get/pkg/cfg" - "git-get/pkg/git" "os" + "github.com/grdl/git-get/pkg" + "github.com/grdl/git-get/pkg/cfg" + "github.com/grdl/git-get/pkg/git" + "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/list.go b/cmd/list.go index 3011cc8..1621cf9 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -2,12 +2,13 @@ package main import ( "fmt" - "git-get/pkg" - "git-get/pkg/cfg" - "git-get/pkg/git" "os" "strings" + "github.com/grdl/git-get/pkg" + "github.com/grdl/git-get/pkg/cfg" + "github.com/grdl/git-get/pkg/git" + "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/go.mod b/go.mod index 38eda42..34b902c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git-get +module github.com/grdl/git-get go 1.24 diff --git a/pkg/get.go b/pkg/get.go index 6878ebb..7133b3e 100644 --- a/pkg/get.go +++ b/pkg/get.go @@ -3,8 +3,9 @@ package pkg import ( "errors" "fmt" - "git-get/pkg/git" "path/filepath" + + "github.com/grdl/git-get/pkg/git" ) var ErrMissingRepoArg = errors.New("missing argument or --dump flag") diff --git a/pkg/git/config.go b/pkg/git/config.go index 7d29556..601f140 100644 --- a/pkg/git/config.go +++ b/pkg/git/config.go @@ -2,7 +2,7 @@ package git import ( - "git-get/pkg/run" + "github.com/grdl/git-get/pkg/run" ) // ConfigGlobal represents a global gitconfig file. diff --git a/pkg/git/config_test.go b/pkg/git/config_test.go index 1ac112f..364ee5e 100644 --- a/pkg/git/config_test.go +++ b/pkg/git/config_test.go @@ -1,9 +1,10 @@ package git import ( - "git-get/pkg/git/test" - "git-get/pkg/run" "testing" + + "github.com/grdl/git-get/pkg/git/test" + "github.com/grdl/git-get/pkg/run" ) // cfgStub represents a gitconfig file but instead of using a global one, it creates a temporary git repo and uses its local gitconfig. diff --git a/pkg/git/finder_test.go b/pkg/git/finder_test.go index 9a91872..eeadf9e 100644 --- a/pkg/git/finder_test.go +++ b/pkg/git/finder_test.go @@ -1,10 +1,11 @@ package git import ( - "git-get/pkg/git/test" "os" "testing" + "github.com/grdl/git-get/pkg/git/test" + "github.com/stretchr/testify/assert" ) diff --git a/pkg/git/repo.go b/pkg/git/repo.go index 055192e..d6a72a5 100644 --- a/pkg/git/repo.go +++ b/pkg/git/repo.go @@ -2,12 +2,13 @@ package git import ( "fmt" - "git-get/pkg/run" "net/url" "os" "path/filepath" "strconv" "strings" + + "github.com/grdl/git-get/pkg/run" ) const ( diff --git a/pkg/git/repo_test.go b/pkg/git/repo_test.go index 23f1985..322076b 100644 --- a/pkg/git/repo_test.go +++ b/pkg/git/repo_test.go @@ -1,13 +1,14 @@ package git import ( - "git-get/pkg/git/test" "os" "path/filepath" "reflect" "strconv" "testing" + "github.com/grdl/git-get/pkg/git/test" + "github.com/stretchr/testify/assert" ) diff --git a/pkg/git/test/helpers.go b/pkg/git/test/helpers.go index 582666c..958c576 100644 --- a/pkg/git/test/helpers.go +++ b/pkg/git/test/helpers.go @@ -3,11 +3,12 @@ package test import ( "fmt" - "git-get/pkg/run" "os" "path/filepath" "runtime" "testing" + + "github.com/grdl/git-get/pkg/run" ) // TempDir creates a temporary directory inside the parent dir. diff --git a/pkg/list.go b/pkg/list.go index 9037978..21b30f9 100644 --- a/pkg/list.go +++ b/pkg/list.go @@ -3,10 +3,11 @@ package pkg import ( "errors" "fmt" - "git-get/pkg/cfg" - "git-get/pkg/git" - "git-get/pkg/out" "strings" + + "github.com/grdl/git-get/pkg/cfg" + "github.com/grdl/git-get/pkg/git" + "github.com/grdl/git-get/pkg/out" ) var ErrInvalidOutput = errors.New("invalid output format") diff --git a/pkg/url_test.go b/pkg/url_test.go index af65680..8805a84 100644 --- a/pkg/url_test.go +++ b/pkg/url_test.go @@ -1,9 +1,10 @@ package pkg import ( - "git-get/pkg/cfg" "testing" + "github.com/grdl/git-get/pkg/cfg" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )