Skip to content

Commit

Permalink
update version to v4
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Vaumoron <[email protected]>
  • Loading branch information
dvaumoron committed Dec 22, 2024
1 parent a220cb0 commit 34e7d13
Show file tree
Hide file tree
Showing 56 changed files with 184 additions and 184 deletions.
8 changes: 4 additions & 4 deletions TENV_AS_LIB.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
`tenvlib` package is available since tenv v3.2

```console
go get -u github.com/tofuutils/tenv/v3@latest
go get -u github.com/tofuutils/tenv/v4@latest
```

### Basic example
Expand All @@ -23,8 +23,8 @@ import (
"context"
"fmt"

"github.com/tofuutils/tenv/v3/config/cmdconst"
"github.com/tofuutils/tenv/v3/versionmanager/tenvlib"
"github.com/tofuutils/tenv/v4/config/cmdconst"
"github.com/tofuutils/tenv/v4/versionmanager/tenvlib"
)

func main() {
Expand All @@ -43,7 +43,7 @@ func main() {

## Documentation

See the [API documentation on go.dev](https://pkg.go.dev/github.com/tofuutils/tenv/v3/versionmanager/tenvlib) and [examples](https://github.com/tofuutils/tenv/tree/main/versionmanager/tenvlib/examples).
See the [API documentation on go.dev](https://pkg.go.dev/github.com/tofuutils/tenv/v4/versionmanager/tenvlib) and [examples](https://github.com/tofuutils/tenv/tree/main/versionmanager/tenvlib/examples).

### Overview

Expand Down
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/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v4/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v4/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 @@ -30,10 +30,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"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/tofuutils/tenv/v4/config"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
"github.com/tofuutils/tenv/v4/versionmanager"
"github.com/tofuutils/tenv/v4/versionmanager/semantic"
)

func newConstraintCmd(versionManager versionmanager.VersionManager) *cobra.Command {
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/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"
"github.com/tofuutils/tenv/v4/config"
"github.com/tofuutils/tenv/v4/config/cmdconst"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
"github.com/tofuutils/tenv/v4/versionmanager"
"github.com/tofuutils/tenv/v4/versionmanager/builder"
"github.com/tofuutils/tenv/v4/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/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"
"github.com/tofuutils/tenv/v4/config"
"github.com/tofuutils/tenv/v4/config/cmdconst"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
"github.com/tofuutils/tenv/v4/versionmanager"
"github.com/tofuutils/tenv/v4/versionmanager/builder"
"github.com/tofuutils/tenv/v4/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/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v4/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v4/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/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v4/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v4/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/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v4/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v4/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/v3/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/light"
"github.com/tofuutils/tenv/v4/config/cmdconst"
lightproxy "github.com/tofuutils/tenv/v4/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/v3/config/cmdconst"
configutils "github.com/tofuutils/tenv/v3/config/utils"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v4/config/cmdconst"
configutils "github.com/tofuutils/tenv/v4/config/utils"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions config/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"errors"
"strings"

configutils "github.com/tofuutils/tenv/v3/config/utils"
"github.com/tofuutils/tenv/v3/pkg/download"
configutils "github.com/tofuutils/tenv/v4/config/utils"
"github.com/tofuutils/tenv/v4/pkg/download"
)

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/v3
module github.com/tofuutils/tenv/v4

go 1.23.3

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/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v4/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/v3/pkg/check/cosign"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
cosigncheck "github.com/tofuutils/tenv/v4/pkg/check/cosign"
"github.com/tofuutils/tenv/v4/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/v3/pkg/check/pgp"
pgpcheck "github.com/tofuutils/tenv/v4/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 @@ -23,7 +23,7 @@ import (
"errors"
"testing"

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

//go:embed testdata/hello.txt
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmdproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"strconv"
"strings"

"github.com/tofuutils/tenv/v3/config"
configutils "github.com/tofuutils/tenv/v3/config/utils"
"github.com/tofuutils/tenv/v4/config"
configutils "github.com/tofuutils/tenv/v4/config/utils"
)

const rwPerm = 0o600
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/v3/pkg/download"
"github.com/tofuutils/tenv/v4/pkg/download"
)

func TestURLTransformer(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"net/url"
"strconv"

"github.com/tofuutils/tenv/v3/pkg/apimsg"
"github.com/tofuutils/tenv/v3/pkg/download"
versionfinder "github.com/tofuutils/tenv/v3/versionmanager/semantic/finder"
"github.com/tofuutils/tenv/v4/pkg/apimsg"
"github.com/tofuutils/tenv/v4/pkg/download"
versionfinder "github.com/tofuutils/tenv/v4/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 @@ -25,8 +25,8 @@ import (
"slices"
"testing"

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

//go:embed testdata/assets.json
Expand Down
2 changes: 1 addition & 1 deletion pkg/htmlquery/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/PuerkitoBio/goquery"

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

func Request(ctx context.Context, callURL string, selector string, extractor func(*goquery.Selection) string, ro ...download.RequestOption) ([]string, error) {
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/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v4/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/v3/pkg/lockfile"
"github.com/tofuutils/tenv/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v4/pkg/lockfile"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
)

const rwPerm = 0o600
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/v3/pkg/reversecmp"
"github.com/tofuutils/tenv/v4/pkg/reversecmp"
)

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

"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"
asdfparser "github.com/tofuutils/tenv/v3/versionmanager/semantic/parser/asdf"
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"
"github.com/tofuutils/tenv/v4/config"
"github.com/tofuutils/tenv/v4/config/cmdconst"
"github.com/tofuutils/tenv/v4/versionmanager"
atmosretriever "github.com/tofuutils/tenv/v4/versionmanager/retriever/atmos"
terraformretriever "github.com/tofuutils/tenv/v4/versionmanager/retriever/terraform"
terragruntretriever "github.com/tofuutils/tenv/v4/versionmanager/retriever/terragrunt"
tofuretriever "github.com/tofuutils/tenv/v4/versionmanager/retriever/tofu"
asdfparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/asdf"
flatparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/flat"
iacparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/iac"
terragruntparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/terragrunt"
tomlparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/toml"
"github.com/tofuutils/tenv/v4/versionmanager/semantic/types"
)

var Builders = map[string]Func{ //nolint
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/v3/pkg/loghelper"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
)

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

"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"
"github.com/tofuutils/tenv/v4/config"
"github.com/tofuutils/tenv/v4/pkg/lockfile"
"github.com/tofuutils/tenv/v4/pkg/loghelper"
"github.com/tofuutils/tenv/v4/pkg/reversecmp"
"github.com/tofuutils/tenv/v4/versionmanager/lastuse"
"github.com/tofuutils/tenv/v4/versionmanager/semantic"
flatparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/flat"
iacparser "github.com/tofuutils/tenv/v4/versionmanager/semantic/parser/iac"
"github.com/tofuutils/tenv/v4/versionmanager/semantic/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion versionmanager/prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package versionmanager

import "github.com/tofuutils/tenv/v3/config"
import "github.com/tofuutils/tenv/v4/config"

type EnvPrefix string

Expand Down
10 changes: 5 additions & 5 deletions versionmanager/proxy/agnostic.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/v3/config"
"github.com/tofuutils/tenv/v3/config/cmdconst"
cmdproxy "github.com/tofuutils/tenv/v3/pkg/cmdproxy"
"github.com/tofuutils/tenv/v3/versionmanager/builder"
detachproxy "github.com/tofuutils/tenv/v3/versionmanager/proxy/detach"
"github.com/tofuutils/tenv/v4/config"
"github.com/tofuutils/tenv/v4/config/cmdconst"
cmdproxy "github.com/tofuutils/tenv/v4/pkg/cmdproxy"
"github.com/tofuutils/tenv/v4/versionmanager/builder"
detachproxy "github.com/tofuutils/tenv/v4/versionmanager/proxy/detach"
)

// Always call os.Exit.
Expand Down
4 changes: 2 additions & 2 deletions versionmanager/proxy/detach/detached_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"os/exec"
"syscall"

"github.com/tofuutils/tenv/v3/config"
configutils "github.com/tofuutils/tenv/v3/config/utils"
"github.com/tofuutils/tenv/v4/config"
configutils "github.com/tofuutils/tenv/v4/config/utils"
)

const msgErr = "Failed to read " + config.TenvDetachedProxyEnvName + " environment variable, disable behavior :"
Expand Down
Loading

0 comments on commit 34e7d13

Please sign in to comment.