refactor: go module name

This commit is contained in:
liruichen_wsl 2024-11-19 11:32:10 +08:00
parent f0fbcc680a
commit 24e06870bb
33 changed files with 2249 additions and 2217 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
tests/e2e/tmp/*
.goc.kvstore
coverage.txt
.idea
repos

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/build"
"github.com/ar0c/goc/v2/pkg/build"
"github.com/spf13/cobra"
)

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/build"
"github.com/ar0c/goc/v2/pkg/build"
"github.com/spf13/cobra"
)

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/build"
"github.com/ar0c/goc/v2/pkg/build"
"github.com/spf13/cobra"
)

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/spf13/cobra"
"golang.org/x/tools/cover"
"k8s.io/test-infra/gopherage/pkg/cov"

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/client"
"github.com/ar0c/goc/v2/pkg/client"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/spf13/cobra"
)

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/build"
"github.com/ar0c/goc/v2/pkg/build"
"github.com/spf13/cobra"
)

View File

@ -14,9 +14,9 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/RickLeee/goc/v2/pkg/server"
"github.com/RickLeee/goc/v2/pkg/server/store"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/server"
"github.com/ar0c/goc/v2/pkg/server/store"
"github.com/spf13/cobra"
)

30
cmd/server_test.go Normal file
View File

@ -0,0 +1,30 @@
package cmd
import (
"github.com/ar0c/goc/v2/pkg/log"
"github.com/spf13/cobra"
"testing"
)
func Test_serve(t *testing.T) {
type args struct {
cmd *cobra.Command
args []string
}
tests := []struct {
name string
args args
}{
{
name: "",
args: args{},
},
// TODO: Add test cases.
}
for _, tt := range tests {
log.NewLogger(true)
t.Run(tt.name, func(t *testing.T) {
serve(tt.args.cmd, tt.args.args)
})
}
}

View File

@ -14,7 +14,7 @@
package cmd
import (
"github.com/RickLeee/goc/v2/pkg/client"
"github.com/ar0c/goc/v2/pkg/client"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)

View File

@ -14,7 +14,7 @@
package cmd
import (
cli "github.com/RickLeee/goc/v2/pkg/watch"
cli "github.com/ar0c/goc/v2/pkg/watch"
"github.com/spf13/cobra"
)

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/RickLeee/goc/v2
module github.com/ar0c/goc/v2
go 1.22.0

View File

@ -10,7 +10,7 @@ RELEASE_VERSION=$(echo $EVENT_DATA | jq -r .release.tag_name)
PROJECT_NAME=$(basename $GITHUB_REPOSITORY)
NAME="${NAME:-${PROJECT_NAME}-${RELEASE_VERSION}}-${GOOS}-${GOARCH}"
CGO_ENABLED=0 go build -o goc -ldflags "-X 'github.com/RickLeee/goc/v2/cmd.Version=${RELEASE_VERSION}'" .
CGO_ENABLED=0 go build -o goc -ldflags "-X 'github.com/ar0c/goc/v2/cmd.Version=${RELEASE_VERSION}'" .
ARCHIVE=tmp.tar.gz
FILE_LIST=goc

View File

@ -14,7 +14,7 @@
package main
import (
"github.com/RickLeee/goc/v2/cmd"
"github.com/ar0c/goc/v2/cmd"
)
func main() {

View File

@ -18,7 +18,7 @@ import (
"os/exec"
"strings"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/spf13/pflag"
)

View File

@ -20,7 +20,7 @@ import (
"path/filepath"
"strings"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)

View File

@ -23,7 +23,7 @@ import (
"path/filepath"
"strings"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
)
// readProjectMetaInfo reads all meta informations of the corresponding project

View File

@ -21,9 +21,9 @@ import (
"path/filepath"
"strings"
"github.com/RickLeee/goc/v2/pkg/build/internal/tool"
"github.com/RickLeee/goc/v2/pkg/build/internal/websocket"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/build/internal/tool"
"github.com/ar0c/goc/v2/pkg/build/internal/websocket"
"github.com/ar0c/goc/v2/pkg/log"
)
// Inject injects cover variables for all the .go files in the target directory

View File

@ -17,7 +17,7 @@ import (
"os"
"os/exec"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
)
func NewInstall(opts ...gocOption) *Build {

View File

@ -18,7 +18,7 @@ import (
"os"
"sort"
"github.com/RickLeee/goc/v2/pkg/log" // QINIU
"github.com/ar0c/goc/v2/pkg/log" // QINIU
// "cmd/internal/edit"
// "cmd/internal/objabi"
)

View File

@ -21,7 +21,7 @@ import (
"os"
"path/filepath"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
)
//go:embed websocket.tar

View File

@ -18,9 +18,9 @@ import (
"os/exec"
"os/signal"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/RickLeee/goc/v2/pkg/server"
"github.com/RickLeee/goc/v2/pkg/server/store"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/server"
"github.com/ar0c/goc/v2/pkg/server/store"
"github.com/gin-gonic/gin"
)

View File

@ -21,7 +21,7 @@ import (
"path/filepath"
"strings"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/tongjingran/copy"
"golang.org/x/mod/modfile"
)

View File

@ -18,8 +18,8 @@ import (
"fmt"
"os"
"github.com/RickLeee/goc/v2/pkg/client/rest"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/client/rest"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/olekukonko/tablewriter"
)

View File

@ -27,7 +27,7 @@ import (
"golang.org/x/term"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/olekukonko/tablewriter"
)

View File

@ -20,9 +20,9 @@ import (
"os"
"path/filepath"
"github.com/RickLeee/goc/v2/pkg/client/rest"
"github.com/RickLeee/goc/v2/pkg/client/rest/profile"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/client/rest"
"github.com/ar0c/goc/v2/pkg/client/rest/profile"
"github.com/ar0c/goc/v2/pkg/log"
)
func GetProfile(host string, ids []string, skips []string, extra string, output string, need []string) {

View File

@ -14,8 +14,8 @@
package rest
import (
"github.com/RickLeee/goc/v2/pkg/client/rest/agent"
"github.com/RickLeee/goc/v2/pkg/client/rest/profile"
"github.com/ar0c/goc/v2/pkg/client/rest/agent"
"github.com/ar0c/goc/v2/pkg/client/rest/profile"
"github.com/go-resty/resty/v2"
)

View File

@ -22,7 +22,7 @@ import (
"sync"
"time"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/gin-gonic/gin"
"golang.org/x/tools/cover"
"k8s.io/test-infra/gopherage/pkg/cov"

View File

@ -22,7 +22,7 @@ import (
"sync"
"time"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/gin-gonic/gin"
)

View File

@ -25,8 +25,8 @@ import (
"sync/atomic"
"time"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/RickLeee/goc/v2/pkg/server/store"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/server/store"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
)

View File

@ -18,7 +18,7 @@ import (
"sync"
"time"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
)

View File

@ -16,7 +16,7 @@ package watch
import (
"fmt"
"github.com/RickLeee/goc/v2/pkg/log"
"github.com/ar0c/goc/v2/pkg/log"
"github.com/gorilla/websocket"
)