6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 13:21:45 +00:00

Update incorrect module name - Go requires a domain-based path for public modules

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-25 20:22:12 +02:00
parent 152e91444b
commit 0df82ba272
13 changed files with 33 additions and 23 deletions

View File

@@ -10,8 +10,8 @@ builds:
binary: git-get binary: git-get
ldflags: ldflags:
- -s -w - -s -w
- -X git-get/pkg/cfg.version={{.Version}} - -X github.com/grdl/git-get/pkg/cfg.version={{.Version}}
- -X git-get/pkg/cfg.commit={{.Commit}} - -X github.com/grdl/git-get/pkg/cfg.commit={{.Commit}}
goos: goos:
- linux - linux
- windows - windows
@@ -26,8 +26,8 @@ builds:
binary: git-get binary: git-get
ldflags: ldflags:
- -s -w - -s -w
- -X git-get/pkg/cfg.version={{.Version}} - -X github.com/grdl/git-get/pkg/cfg.version={{.Version}}
- -X git-get/pkg/cfg.commit={{.Commit}} - -X github.com/grdl/git-get/pkg/cfg.commit={{.Commit}}
goos: goos:
- darwin - darwin
goarch: goarch:

View File

@@ -2,11 +2,12 @@ package main
import ( import (
"fmt" "fmt"
"git-get/pkg"
"git-get/pkg/cfg"
"git-get/pkg/git"
"os" "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/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
) )

View File

@@ -2,12 +2,13 @@ package main
import ( import (
"fmt" "fmt"
"git-get/pkg"
"git-get/pkg/cfg"
"git-get/pkg/git"
"os" "os"
"strings" "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/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
) )

2
go.mod
View File

@@ -1,4 +1,4 @@
module git-get module github.com/grdl/git-get
go 1.24 go 1.24

View File

@@ -3,8 +3,9 @@ package pkg
import ( import (
"errors" "errors"
"fmt" "fmt"
"git-get/pkg/git"
"path/filepath" "path/filepath"
"github.com/grdl/git-get/pkg/git"
) )
var ErrMissingRepoArg = errors.New("missing <REPO> argument or --dump flag") var ErrMissingRepoArg = errors.New("missing <REPO> argument or --dump flag")

View File

@@ -2,7 +2,7 @@
package git package git
import ( import (
"git-get/pkg/run" "github.com/grdl/git-get/pkg/run"
) )
// ConfigGlobal represents a global gitconfig file. // ConfigGlobal represents a global gitconfig file.

View File

@@ -1,9 +1,10 @@
package git package git
import ( import (
"git-get/pkg/git/test"
"git-get/pkg/run"
"testing" "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. // cfgStub represents a gitconfig file but instead of using a global one, it creates a temporary git repo and uses its local gitconfig.

View File

@@ -1,10 +1,11 @@
package git package git
import ( import (
"git-get/pkg/git/test"
"os" "os"
"testing" "testing"
"github.com/grdl/git-get/pkg/git/test"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View File

@@ -2,12 +2,13 @@ package git
import ( import (
"fmt" "fmt"
"git-get/pkg/run"
"net/url" "net/url"
"os" "os"
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings" "strings"
"github.com/grdl/git-get/pkg/run"
) )
const ( const (

View File

@@ -1,13 +1,14 @@
package git package git
import ( import (
"git-get/pkg/git/test"
"os" "os"
"path/filepath" "path/filepath"
"reflect" "reflect"
"strconv" "strconv"
"testing" "testing"
"github.com/grdl/git-get/pkg/git/test"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View File

@@ -3,11 +3,12 @@ package test
import ( import (
"fmt" "fmt"
"git-get/pkg/run"
"os" "os"
"path/filepath" "path/filepath"
"runtime" "runtime"
"testing" "testing"
"github.com/grdl/git-get/pkg/run"
) )
// TempDir creates a temporary directory inside the parent dir. // TempDir creates a temporary directory inside the parent dir.

View File

@@ -3,10 +3,11 @@ package pkg
import ( import (
"errors" "errors"
"fmt" "fmt"
"git-get/pkg/cfg"
"git-get/pkg/git"
"git-get/pkg/out"
"strings" "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") var ErrInvalidOutput = errors.New("invalid output format")

View File

@@ -1,9 +1,10 @@
package pkg package pkg
import ( import (
"git-get/pkg/cfg"
"testing" "testing"
"github.com/grdl/git-get/pkg/cfg"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )