Skip to content

Commit

Permalink
prepare v3
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Vaumoron <dvaumoron@gmail.com>
  • Loading branch information
dvaumoron committed Aug 4, 2024
1 parent 0d316ae commit 39c2c8d
Show file tree
Hide file tree
Showing 44 changed files with 149 additions and 149 deletions.
4 changes: 2 additions & 2 deletions cmd/atmos/atmos.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package main

import (
"github.com/tofuutils/tenv/v2/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v2/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions cmd/tenv/subcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"strings"
"time"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v2/versionmanager"
"github.com/tofuutils/tenv/v2/versionmanager/semantic"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v3/versionmanager"
"github.com/tofuutils/tenv/v3/versionmanager/semantic"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand Down
12 changes: 6 additions & 6 deletions cmd/tenv/tenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
"github.com/hashicorp/hcl/v2/hclparse"
"github.com/spf13/cobra"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/config/cmdconst"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v2/versionmanager"
"github.com/tofuutils/tenv/v2/versionmanager/builder"
"github.com/tofuutils/tenv/v2/versionmanager/proxy"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/config/cmdconst"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v3/versionmanager"
"github.com/tofuutils/tenv/v3/versionmanager/builder"
"github.com/tofuutils/tenv/v3/versionmanager/proxy"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions cmd/tenv/textui.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import (
"github.com/charmbracelet/lipgloss"
"github.com/hashicorp/hcl/v2/hclparse"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/config/cmdconst"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v2/versionmanager"
"github.com/tofuutils/tenv/v2/versionmanager/builder"
"github.com/tofuutils/tenv/v2/versionmanager/semantic"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/config/cmdconst"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v3/versionmanager"
"github.com/tofuutils/tenv/v3/versionmanager/builder"
"github.com/tofuutils/tenv/v3/versionmanager/semantic"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions cmd/terraform/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package main

import (
"github.com/tofuutils/tenv/v2/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v2/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/terragrunt/terragrunt.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package main

import (
"github.com/tofuutils/tenv/v2/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v2/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/tf/tf.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package main

import (
"github.com/tofuutils/tenv/v2/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v2/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/tofu/tofu.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package main

import (
"github.com/tofuutils/tenv/v2/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v2/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"github.com/hashicorp/go-hclog"
"gopkg.in/yaml.v3"

"github.com/tofuutils/tenv/v2/config/cmdconst"
configutils "github.com/tofuutils/tenv/v2/config/utils"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v3/config/cmdconst"
configutils "github.com/tofuutils/tenv/v3/config/utils"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/tofuutils/tenv/v2
module github.com/tofuutils/tenv/v3

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion pkg/check/cosign/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/hashicorp/go-hclog"

"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/check/cosign/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
_ "embed"
"testing"

cosigncheck "github.com/tofuutils/tenv/v2/pkg/check/cosign"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
cosigncheck "github.com/tofuutils/tenv/v3/pkg/check/cosign"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/check/pgp/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
_ "embed"
"testing"

pgpcheck "github.com/tofuutils/tenv/v2/pkg/check/pgp"
pgpcheck "github.com/tofuutils/tenv/v3/pkg/check/pgp"
)

//go:embed testdata/terraform_1.6.6_SHA256SUMS
Expand Down
2 changes: 1 addition & 1 deletion pkg/check/sha256/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
_ "embed"
"testing"

sha256check "github.com/tofuutils/tenv/v2/pkg/check/sha256"
sha256check "github.com/tofuutils/tenv/v3/pkg/check/sha256"
)

//go:embed testdata/hello.txt
Expand Down
2 changes: 1 addition & 1 deletion pkg/download/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package download_test
import (
"testing"

"github.com/tofuutils/tenv/v2/pkg/download"
"github.com/tofuutils/tenv/v3/pkg/download"
)

func TestUrlTransformer(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"net/url"
"strconv"

"github.com/tofuutils/tenv/v2/pkg/apimsg"
versionfinder "github.com/tofuutils/tenv/v2/versionmanager/semantic/finder"
"github.com/tofuutils/tenv/v3/pkg/apimsg"
versionfinder "github.com/tofuutils/tenv/v3/versionmanager/semantic/finder"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"slices"
"testing"

"github.com/tofuutils/tenv/v2/pkg/apimsg"
"github.com/tofuutils/tenv/v2/versionmanager/semantic"
"github.com/tofuutils/tenv/v3/pkg/apimsg"
"github.com/tofuutils/tenv/v3/versionmanager/semantic"
)

// empty marker.
Expand Down
2 changes: 1 addition & 1 deletion pkg/lockfile/lockfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/hashicorp/go-hclog"

"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/lockfile/lockfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"testing"
"time"

"github.com/tofuutils/tenv/v2/pkg/lockfile"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v3/pkg/lockfile"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
)

//go:embed testdata/data1.txt
Expand Down
2 changes: 1 addition & 1 deletion pkg/reversecmp/reverse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"cmp"
"testing"

"github.com/tofuutils/tenv/v2/pkg/reversecmp"
"github.com/tofuutils/tenv/v3/pkg/reversecmp"
)

func TestReverserFalse(t *testing.T) {
Expand Down
24 changes: 12 additions & 12 deletions versionmanager/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ package builder
import (
"github.com/hashicorp/hcl/v2/hclparse"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/config/cmdconst"
"github.com/tofuutils/tenv/v2/versionmanager"
atmosretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/atmos"
terraformretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/terraform"
terragruntretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/terragrunt"
tofuretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/tofu"
flatparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/flat"
iacparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/iac"
terragruntparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/terragrunt"
tomlparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/toml"
"github.com/tofuutils/tenv/v2/versionmanager/semantic/types"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/config/cmdconst"
"github.com/tofuutils/tenv/v3/versionmanager"
atmosretriever "github.com/tofuutils/tenv/v3/versionmanager/retriever/atmos"
terraformretriever "github.com/tofuutils/tenv/v3/versionmanager/retriever/terraform"
terragruntretriever "github.com/tofuutils/tenv/v3/versionmanager/retriever/terragrunt"
tofuretriever "github.com/tofuutils/tenv/v3/versionmanager/retriever/tofu"
flatparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/flat"
iacparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/iac"
terragruntparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/terragrunt"
tomlparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/toml"
"github.com/tofuutils/tenv/v3/versionmanager/semantic/types"
)

var Builders = map[string]BuilderFunc{
Expand Down
2 changes: 1 addition & 1 deletion versionmanager/lastuse/last.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/hashicorp/go-hclog"

"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
)

const fileName = "last-use.txt"
Expand Down
18 changes: 9 additions & 9 deletions versionmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import (
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-version"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/pkg/lockfile"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v2/pkg/reversecmp"
"github.com/tofuutils/tenv/v2/versionmanager/lastuse"
"github.com/tofuutils/tenv/v2/versionmanager/semantic"
flatparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/flat"
iacparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/iac"
"github.com/tofuutils/tenv/v2/versionmanager/semantic/types"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/pkg/lockfile"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v3/pkg/reversecmp"
"github.com/tofuutils/tenv/v3/versionmanager/lastuse"
"github.com/tofuutils/tenv/v3/versionmanager/semantic"
flatparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/flat"
iacparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/iac"
"github.com/tofuutils/tenv/v3/versionmanager/semantic/types"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions versionmanager/proxy/agnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (

"github.com/hashicorp/hcl/v2/hclparse"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/config/cmdconst"
"github.com/tofuutils/tenv/v2/versionmanager/builder"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/config/cmdconst"
"github.com/tofuutils/tenv/v3/versionmanager/builder"
)

func ExecAgnostic(conf *config.Config, hclParser *hclparse.Parser, cmdArgs []string) {
Expand Down
2 changes: 1 addition & 1 deletion versionmanager/proxy/light/light.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"os/exec"
"os/signal"

"github.com/tofuutils/tenv/v2/config/cmdconst"
"github.com/tofuutils/tenv/v3/config/cmdconst"
)

func Exec(execName string) {
Expand Down
10 changes: 5 additions & 5 deletions versionmanager/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (

"github.com/hashicorp/hcl/v2/hclparse"

"github.com/tofuutils/tenv/v2/config"
cmdproxy "github.com/tofuutils/tenv/v2/pkg/cmdproxy"
"github.com/tofuutils/tenv/v2/pkg/loghelper"
"github.com/tofuutils/tenv/v2/versionmanager/builder"
"github.com/tofuutils/tenv/v2/versionmanager/lastuse"
"github.com/tofuutils/tenv/v3/config"
cmdproxy "github.com/tofuutils/tenv/v3/pkg/cmdproxy"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v3/versionmanager/builder"
"github.com/tofuutils/tenv/v3/versionmanager/lastuse"
)

var errDelimiter = errors.New("key and value should not contains delimiter")
Expand Down
16 changes: 8 additions & 8 deletions versionmanager/retriever/atmos/atmosretriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"runtime"
"strings"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/config/cmdconst"
"github.com/tofuutils/tenv/v2/pkg/apimsg"
sha256check "github.com/tofuutils/tenv/v2/pkg/check/sha256"
"github.com/tofuutils/tenv/v2/pkg/download"
"github.com/tofuutils/tenv/v2/pkg/github"
"github.com/tofuutils/tenv/v2/pkg/winbin"
htmlretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/html"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/config/cmdconst"
"github.com/tofuutils/tenv/v3/pkg/apimsg"
sha256check "github.com/tofuutils/tenv/v3/pkg/check/sha256"
"github.com/tofuutils/tenv/v3/pkg/download"
"github.com/tofuutils/tenv/v3/pkg/github"
"github.com/tofuutils/tenv/v3/pkg/winbin"
htmlretriever "github.com/tofuutils/tenv/v3/versionmanager/retriever/html"

"github.com/hashicorp/go-hclog"
)
Expand Down
8 changes: 4 additions & 4 deletions versionmanager/retriever/html/htmlretriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (

"github.com/PuerkitoBio/goquery"

"github.com/tofuutils/tenv/v2/config"
"github.com/tofuutils/tenv/v2/pkg/download"
"github.com/tofuutils/tenv/v2/pkg/htmlquery"
versionfinder "github.com/tofuutils/tenv/v2/versionmanager/semantic/finder"
"github.com/tofuutils/tenv/v3/config"
"github.com/tofuutils/tenv/v3/pkg/download"
"github.com/tofuutils/tenv/v3/pkg/htmlquery"
versionfinder "github.com/tofuutils/tenv/v3/versionmanager/semantic/finder"
)

func BuildAssetURLs(baseAssetURL string, assetNames ...string) ([]string, error) {
Expand Down
2 changes: 1 addition & 1 deletion versionmanager/retriever/terraform/api/releaseapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package releaseapi

import "github.com/tofuutils/tenv/v2/pkg/apimsg"
import "github.com/tofuutils/tenv/v3/pkg/apimsg"

func ExtractAssetUrls(searchedOs string, searchedArch string, value any) (string, string, string, string, error) {
object, _ := value.(map[string]any)
Expand Down
4 changes: 2 additions & 2 deletions versionmanager/retriever/terraform/api/releaseapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"slices"
"testing"

releaseapi "github.com/tofuutils/tenv/v2/versionmanager/retriever/terraform/api"
"github.com/tofuutils/tenv/v2/versionmanager/semantic"
releaseapi "github.com/tofuutils/tenv/v3/versionmanager/retriever/terraform/api"
"github.com/tofuutils/tenv/v3/versionmanager/semantic"
)

//go:embed testdata/release.json
Expand Down
Loading

0 comments on commit 39c2c8d

Please sign in to comment.