Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the project to properly use go module versioning #417

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api_tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

opticgo "github.com/ViRb3/optic-go"
"github.com/ViRb3/sling/v2"
"github.com/ViRb3/wgcf/cloudflare"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/wireguard"
"github.com/ViRb3/wgcf/v2/cloudflare"
"github.com/ViRb3/wgcf/v2/util"
"github.com/ViRb3/wgcf/v2/wireguard"
)

var defaultHeaders = map[string]string{}
Expand Down
8 changes: 4 additions & 4 deletions cloudflare/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"
"time"

"github.com/ViRb3/wgcf/config"
"github.com/ViRb3/wgcf/openapi"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/wireguard"
"github.com/ViRb3/wgcf/v2/config"
"github.com/ViRb3/wgcf/v2/openapi"
"github.com/ViRb3/wgcf/v2/util"
"github.com/ViRb3/wgcf/v2/wireguard"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package generate
import (
"log"

"github.com/ViRb3/wgcf/cloudflare"
. "github.com/ViRb3/wgcf/cmd/shared"
"github.com/ViRb3/wgcf/config"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/wireguard"
"github.com/ViRb3/wgcf/v2/cloudflare"
. "github.com/ViRb3/wgcf/v2/cmd/shared"
"github.com/ViRb3/wgcf/v2/config"
"github.com/ViRb3/wgcf/v2/util"
"github.com/ViRb3/wgcf/v2/wireguard"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
10 changes: 5 additions & 5 deletions cmd/register/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"log"

"github.com/ViRb3/wgcf/cloudflare"
. "github.com/ViRb3/wgcf/cmd/shared"
"github.com/ViRb3/wgcf/config"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/wireguard"
"github.com/ViRb3/wgcf/v2/cloudflare"
. "github.com/ViRb3/wgcf/v2/cmd/shared"
"github.com/ViRb3/wgcf/v2/config"
"github.com/ViRb3/wgcf/v2/util"
"github.com/ViRb3/wgcf/v2/wireguard"
"github.com/manifoldco/promptui"
"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down
18 changes: 9 additions & 9 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"errors"
"log"

"github.com/ViRb3/wgcf/cmd/generate"
"github.com/ViRb3/wgcf/cmd/register"
. "github.com/ViRb3/wgcf/cmd/shared"
"github.com/ViRb3/wgcf/cmd/status"
"github.com/ViRb3/wgcf/cmd/trace"
"github.com/ViRb3/wgcf/cmd/update"
"github.com/ViRb3/wgcf/config"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/v2/cmd/generate"
"github.com/ViRb3/wgcf/v2/cmd/register"
. "github.com/ViRb3/wgcf/v2/cmd/shared"
"github.com/ViRb3/wgcf/v2/cmd/status"
"github.com/ViRb3/wgcf/v2/cmd/trace"
"github.com/ViRb3/wgcf/v2/cmd/update"
"github.com/ViRb3/wgcf/v2/config"
"github.com/ViRb3/wgcf/v2/util"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand All @@ -25,7 +25,7 @@ var RootCmd = &cobra.Command{
Long: FormatMessage("", `
wgcf is a utility for Cloudflare Warp that allows you to create and
manage accounts, assign license keys, and generate WireGuard profiles.
Made by Victor (@ViRb3). Project website: https://github.com/ViRb3/wgcf`),
Made by Victor (@ViRb3). Project website: https://github.com/ViRb3/wgcf/v2`),
Run: func(cmd *cobra.Command, args []string) {
if err := cmd.Help(); err != nil {
log.Fatal(util.GetErrorMessage(err))
Expand Down
6 changes: 3 additions & 3 deletions cmd/shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"math"
"strings"

"github.com/ViRb3/wgcf/cloudflare"
"github.com/ViRb3/wgcf/config"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/v2/cloudflare"
"github.com/ViRb3/wgcf/v2/config"
"github.com/ViRb3/wgcf/v2/util"

"github.com/pkg/errors"
"github.com/spf13/viper"
Expand Down
6 changes: 3 additions & 3 deletions cmd/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package status
import (
"log"

"github.com/ViRb3/wgcf/cloudflare"
. "github.com/ViRb3/wgcf/cmd/shared"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/v2/cloudflare"
. "github.com/ViRb3/wgcf/v2/cmd/shared"
"github.com/ViRb3/wgcf/v2/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"strings"

. "github.com/ViRb3/wgcf/cmd/shared"
"github.com/ViRb3/wgcf/util"
. "github.com/ViRb3/wgcf/v2/cmd/shared"
"github.com/ViRb3/wgcf/v2/util"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package update
import (
"log"

"github.com/ViRb3/wgcf/cloudflare"
. "github.com/ViRb3/wgcf/cmd/shared"
"github.com/ViRb3/wgcf/config"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/v2/cloudflare"
. "github.com/ViRb3/wgcf/v2/cmd/shared"
"github.com/ViRb3/wgcf/v2/config"
"github.com/ViRb3/wgcf/v2/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
module github.com/ViRb3/wgcf
module github.com/ViRb3/wgcf/v2

go 1.18

replace github.com/ViRb3/wgcf/openapi => ./openapi

require (
github.com/ViRb3/optic-go v0.0.0-20240309111653-486347a8369d
github.com/ViRb3/sling/v2 v2.0.2
github.com/ViRb3/wgcf/openapi v0.0.0-20240309103509-71e9ce8d36bc
github.com/manifoldco/promptui v0.9.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
golang.org/x/crypto v0.21.0
golang.org/x/oauth2 v0.18.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down Expand Up @@ -43,7 +41,6 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"log"

"github.com/ViRb3/wgcf/cmd"
"github.com/ViRb3/wgcf/util"
"github.com/ViRb3/wgcf/v2/cmd"
"github.com/ViRb3/wgcf/v2/util"
)

func main() {
Expand Down
11 changes: 0 additions & 11 deletions openapi/go.mod

This file was deleted.

39 changes: 0 additions & 39 deletions openapi/go.sum

This file was deleted.