From 33a20029046eb84a719b63ee4466f15755dcd9f5 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Mon, 17 Jun 2024 17:19:26 +0300 Subject: [PATCH 1/2] Change all the imports to github.com/tofuutils/tenv/v2 module path Signed-off-by: Artiom Diomin --- cmd/atmos/atmos.go | 6 ++--- cmd/tenv/subcmd.go | 8 +++---- cmd/tenv/tenv.go | 10 ++++----- cmd/terraform/terraform.go | 6 ++--- cmd/terragrunt/terragrunt.go | 6 ++--- cmd/tf/tf.go | 8 +++---- cmd/tofu/tofu.go | 6 ++--- config/config.go | 2 +- pkg/check/binary/check_test.go | 2 +- pkg/check/cosign/check.go | 4 ++-- pkg/check/cosign/check_test.go | 4 ++-- pkg/check/pgp/check_test.go | 2 +- pkg/check/sha256/check_test.go | 2 +- pkg/download/download_test.go | 2 +- pkg/github/github.go | 4 ++-- pkg/github/github_test.go | 4 ++-- pkg/lockfile/lockfile.go | 4 ++-- pkg/lockfile/lockfile_test.go | 8 +++---- pkg/reversecmp/reverse_test.go | 2 +- pkg/zip/zip.go | 6 ++--- versionmanager/builder/builder.go | 22 +++++++++---------- versionmanager/manager.go | 19 ++++++++-------- versionmanager/proxy/proxy.go | 8 +++---- .../retriever/atmos/atmosretriever.go | 18 +++++++-------- .../retriever/html/htmlretriever.go | 8 +++---- .../retriever/terraform/terraformretriever.go | 14 ++++++------ .../terraform/terraformretriever_test.go | 2 +- .../terragrunt/terragruntretriever.go | 18 +++++++-------- .../retriever/tofu/tofuretriever.go | 18 +++++++-------- versionmanager/semantic/finder/finder_test.go | 2 +- .../semantic/parser/flat/flatparser.go | 6 ++--- .../semantic/parser/terragrunt/gruntparser.go | 6 ++--- versionmanager/semantic/parser/tf/tfparser.go | 4 ++-- .../semantic/parser/toml/tomlparser.go | 6 ++--- versionmanager/semantic/semantic.go | 8 +++---- versionmanager/semantic/semantic_test.go | 2 +- versionmanager/semantic/types/types.go | 4 ++-- versionmanager/semantic/walker.go | 4 ++-- 38 files changed, 132 insertions(+), 133 deletions(-) diff --git a/cmd/atmos/atmos.go b/cmd/atmos/atmos.go index cda4bae3..7ab854b3 100644 --- a/cmd/atmos/atmos.go +++ b/cmd/atmos/atmos.go @@ -19,9 +19,9 @@ package main import ( - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager/builder" - "github.com/tofuutils/tenv/versionmanager/proxy" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager/builder" + "github.com/tofuutils/tenv/v2/versionmanager/proxy" ) func main() { diff --git a/cmd/tenv/subcmd.go b/cmd/tenv/subcmd.go index 1c50687c..2ef0a081 100644 --- a/cmd/tenv/subcmd.go +++ b/cmd/tenv/subcmd.go @@ -26,10 +26,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" - "github.com/tofuutils/tenv/versionmanager" - "github.com/tofuutils/tenv/versionmanager/semantic" + "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" ) const deprecationMsg = "Direct usage of this subcommand on tenv is deprecated, you should use tofu subcommand instead.\n\n" diff --git a/cmd/tenv/tenv.go b/cmd/tenv/tenv.go index 8f4a4b05..5945acb4 100644 --- a/cmd/tenv/tenv.go +++ b/cmd/tenv/tenv.go @@ -25,10 +25,10 @@ import ( "strings" "github.com/spf13/cobra" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager" - "github.com/tofuutils/tenv/versionmanager/builder" - terragruntparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/terragrunt" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager" + "github.com/tofuutils/tenv/v2/versionmanager/builder" + terragruntparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/terragrunt" ) const ( @@ -182,7 +182,7 @@ func newUpdatePathCmd() *cobra.Command { if gha { pathfilePath := os.Getenv("GITHUB_PATH") if pathfilePath != "" { - pathfile, err := os.OpenFile(pathfilePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + pathfile, err := os.OpenFile(pathfilePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return err } diff --git a/cmd/terraform/terraform.go b/cmd/terraform/terraform.go index 765e9b6b..8647d837 100644 --- a/cmd/terraform/terraform.go +++ b/cmd/terraform/terraform.go @@ -19,9 +19,9 @@ package main import ( - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager/builder" - "github.com/tofuutils/tenv/versionmanager/proxy" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager/builder" + "github.com/tofuutils/tenv/v2/versionmanager/proxy" ) func main() { diff --git a/cmd/terragrunt/terragrunt.go b/cmd/terragrunt/terragrunt.go index 7dbef383..b1921fbe 100644 --- a/cmd/terragrunt/terragrunt.go +++ b/cmd/terragrunt/terragrunt.go @@ -19,9 +19,9 @@ package main import ( - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager/builder" - "github.com/tofuutils/tenv/versionmanager/proxy" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager/builder" + "github.com/tofuutils/tenv/v2/versionmanager/proxy" ) func main() { diff --git a/cmd/tf/tf.go b/cmd/tf/tf.go index e7cefd08..89f11a0e 100644 --- a/cmd/tf/tf.go +++ b/cmd/tf/tf.go @@ -22,10 +22,10 @@ import ( "fmt" "os" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager/builder" - "github.com/tofuutils/tenv/versionmanager/proxy" - terragruntparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/terragrunt" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager/builder" + "github.com/tofuutils/tenv/v2/versionmanager/proxy" + terragruntparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/terragrunt" ) func main() { diff --git a/cmd/tofu/tofu.go b/cmd/tofu/tofu.go index 525ad774..cf13337d 100644 --- a/cmd/tofu/tofu.go +++ b/cmd/tofu/tofu.go @@ -19,9 +19,9 @@ package main import ( - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager/builder" - "github.com/tofuutils/tenv/versionmanager/proxy" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager/builder" + "github.com/tofuutils/tenv/v2/versionmanager/proxy" ) func main() { diff --git a/config/config.go b/config/config.go index 77e8b158..8d0ad08c 100644 --- a/config/config.go +++ b/config/config.go @@ -28,7 +28,7 @@ import ( "github.com/fatih/color" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/pkg/loghelper" + "github.com/tofuutils/tenv/v2/pkg/loghelper" "gopkg.in/yaml.v3" ) diff --git a/pkg/check/binary/check_test.go b/pkg/check/binary/check_test.go index 78be7b4f..303254b1 100644 --- a/pkg/check/binary/check_test.go +++ b/pkg/check/binary/check_test.go @@ -21,7 +21,7 @@ package bincheck_test import ( "testing" - bincheck "github.com/tofuutils/tenv/pkg/check/binary" + bincheck "github.com/tofuutils/tenv/v2/pkg/check/binary" ) func TestTextFileCheck(t *testing.T) { diff --git a/pkg/check/cosign/check.go b/pkg/check/cosign/check.go index 14a5fd24..773f01b6 100644 --- a/pkg/check/cosign/check.go +++ b/pkg/check/cosign/check.go @@ -25,7 +25,7 @@ import ( "strings" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/pkg/loghelper" + "github.com/tofuutils/tenv/v2/pkg/loghelper" ) const ( @@ -92,7 +92,7 @@ func tempFile(name string, data []byte) (string, func(), error) { } tmpFileName := tmpFile.Name() - if err = os.WriteFile(tmpFileName, data, 0600); err != nil { + if err = os.WriteFile(tmpFileName, data, 0o600); err != nil { return "", nil, err } diff --git a/pkg/check/cosign/check_test.go b/pkg/check/cosign/check_test.go index fc526715..88ac80e0 100644 --- a/pkg/check/cosign/check_test.go +++ b/pkg/check/cosign/check_test.go @@ -22,8 +22,8 @@ import ( _ "embed" "testing" - cosigncheck "github.com/tofuutils/tenv/pkg/check/cosign" - "github.com/tofuutils/tenv/pkg/loghelper" + cosigncheck "github.com/tofuutils/tenv/v2/pkg/check/cosign" + "github.com/tofuutils/tenv/v2/pkg/loghelper" ) const ( diff --git a/pkg/check/pgp/check_test.go b/pkg/check/pgp/check_test.go index 2a9c9832..89161931 100644 --- a/pkg/check/pgp/check_test.go +++ b/pkg/check/pgp/check_test.go @@ -22,7 +22,7 @@ import ( _ "embed" "testing" - pgpcheck "github.com/tofuutils/tenv/pkg/check/pgp" + pgpcheck "github.com/tofuutils/tenv/v2/pkg/check/pgp" ) //go:embed testdata/terraform_1.6.6_SHA256SUMS diff --git a/pkg/check/sha256/check_test.go b/pkg/check/sha256/check_test.go index 1c751b3c..0f936401 100644 --- a/pkg/check/sha256/check_test.go +++ b/pkg/check/sha256/check_test.go @@ -22,7 +22,7 @@ import ( _ "embed" "testing" - sha256check "github.com/tofuutils/tenv/pkg/check/sha256" + sha256check "github.com/tofuutils/tenv/v2/pkg/check/sha256" ) //go:embed testdata/hello.txt diff --git a/pkg/download/download_test.go b/pkg/download/download_test.go index 8c615328..4a9c93b2 100644 --- a/pkg/download/download_test.go +++ b/pkg/download/download_test.go @@ -21,7 +21,7 @@ package download_test import ( "testing" - "github.com/tofuutils/tenv/pkg/download" + "github.com/tofuutils/tenv/v2/pkg/download" ) func TestUrlTransformer(t *testing.T) { diff --git a/pkg/github/github.go b/pkg/github/github.go index c306fbfc..94d5f506 100644 --- a/pkg/github/github.go +++ b/pkg/github/github.go @@ -26,8 +26,8 @@ import ( "net/url" "strconv" - "github.com/tofuutils/tenv/pkg/apimsg" - versionfinder "github.com/tofuutils/tenv/versionmanager/semantic/finder" + "github.com/tofuutils/tenv/v2/pkg/apimsg" + versionfinder "github.com/tofuutils/tenv/v2/versionmanager/semantic/finder" ) const ( diff --git a/pkg/github/github_test.go b/pkg/github/github_test.go index 05efb9af..70d30880 100644 --- a/pkg/github/github_test.go +++ b/pkg/github/github_test.go @@ -24,8 +24,8 @@ import ( "slices" "testing" - "github.com/tofuutils/tenv/pkg/apimsg" - "github.com/tofuutils/tenv/versionmanager/semantic" + "github.com/tofuutils/tenv/v2/pkg/apimsg" + "github.com/tofuutils/tenv/v2/versionmanager/semantic" ) // empty marker. diff --git a/pkg/lockfile/lockfile.go b/pkg/lockfile/lockfile.go index 65001672..becaec74 100644 --- a/pkg/lockfile/lockfile.go +++ b/pkg/lockfile/lockfile.go @@ -26,7 +26,7 @@ import ( "time" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/pkg/loghelper" + "github.com/tofuutils/tenv/v2/pkg/loghelper" ) const ( @@ -39,7 +39,7 @@ const ( func Write(dirPath string, displayer loghelper.Displayer) func() { lockPath := filepath.Join(dirPath, ".lock") for logLevel := hclog.Warn; true; logLevel = hclog.Info { - f, err := os.OpenFile(lockPath, os.O_CREATE|os.O_EXCL, 0644) //nolint + f, err := os.OpenFile(lockPath, os.O_CREATE|os.O_EXCL, 0o644) //nolint if err == nil { f.Close() break diff --git a/pkg/lockfile/lockfile_test.go b/pkg/lockfile/lockfile_test.go index f4148acf..4d45cd40 100644 --- a/pkg/lockfile/lockfile_test.go +++ b/pkg/lockfile/lockfile_test.go @@ -26,8 +26,8 @@ import ( "testing" "time" - "github.com/tofuutils/tenv/pkg/lockfile" - "github.com/tofuutils/tenv/pkg/loghelper" + "github.com/tofuutils/tenv/v2/pkg/lockfile" + "github.com/tofuutils/tenv/v2/pkg/loghelper" ) //go:embed testdata/data1.txt @@ -52,7 +52,7 @@ func TestParallelWriteRead(t *testing.T) { os.RemoveAll(parallelDirPath) }() - if err = os.MkdirAll(parallelDirPath, 0755); err != nil { + if err = os.MkdirAll(parallelDirPath, 0o755); err != nil { t.Fatal("Unexpected error during test init (2) :", err) } @@ -95,7 +95,7 @@ func writeReadFile(dirPath string, filePath string, data []byte, displayer loghe deleteLock := lockfile.Write(dirPath, displayer) defer deleteLock() - if err := os.WriteFile(filePath, data, 0644); err != nil { + if err := os.WriteFile(filePath, data, 0o644); err != nil { return nil, err } diff --git a/pkg/reversecmp/reverse_test.go b/pkg/reversecmp/reverse_test.go index b6817fd3..9246b4d1 100644 --- a/pkg/reversecmp/reverse_test.go +++ b/pkg/reversecmp/reverse_test.go @@ -22,7 +22,7 @@ import ( "cmp" "testing" - "github.com/tofuutils/tenv/pkg/reversecmp" + "github.com/tofuutils/tenv/v2/pkg/reversecmp" ) func TestReverserFalse(t *testing.T) { diff --git a/pkg/zip/zip.go b/pkg/zip/zip.go index 40b75c72..33179853 100644 --- a/pkg/zip/zip.go +++ b/pkg/zip/zip.go @@ -27,12 +27,12 @@ import ( "path/filepath" "strings" - bincheck "github.com/tofuutils/tenv/pkg/check/binary" + bincheck "github.com/tofuutils/tenv/v2/pkg/check/binary" ) // ensure the directory exists with a MkdirAll call. func UnzipToDir(dataZip []byte, dirPath string) error { - err := os.MkdirAll(dirPath, 0755) + err := os.MkdirAll(dirPath, 0o755) if err != nil { return err } @@ -81,7 +81,7 @@ func copyZipFileToDir(zipFile *zip.File, dirPath string) error { if destPath[len(destPath)-1] == '/' { // trailing slash indicates a directory - return os.MkdirAll(destPath, 0755) + return os.MkdirAll(destPath, 0o755) } reader, err := zipFile.Open() diff --git a/versionmanager/builder/builder.go b/versionmanager/builder/builder.go index d399e534..74b91bc2 100644 --- a/versionmanager/builder/builder.go +++ b/versionmanager/builder/builder.go @@ -19,17 +19,17 @@ package builder import ( - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager" - atmosretriever "github.com/tofuutils/tenv/versionmanager/retriever/atmos" - terraformretriever "github.com/tofuutils/tenv/versionmanager/retriever/terraform" - terragruntretriever "github.com/tofuutils/tenv/versionmanager/retriever/terragrunt" - tofuretriever "github.com/tofuutils/tenv/versionmanager/retriever/tofu" - "github.com/tofuutils/tenv/versionmanager/semantic" - flatparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/flat" - terragruntparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/terragrunt" - tomlparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/toml" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "github.com/tofuutils/tenv/v2/config" + "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" + "github.com/tofuutils/tenv/v2/versionmanager/semantic" + flatparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/flat" + 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" ) func BuildAtmosManager(conf *config.Config, gruntParser terragruntparser.TerragruntParser) versionmanager.VersionManager { diff --git a/versionmanager/manager.go b/versionmanager/manager.go index bca1a966..63c07ebc 100644 --- a/versionmanager/manager.go +++ b/versionmanager/manager.go @@ -29,13 +29,13 @@ import ( "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-version" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/lockfile" - "github.com/tofuutils/tenv/pkg/loghelper" - "github.com/tofuutils/tenv/pkg/reversecmp" - "github.com/tofuutils/tenv/versionmanager/semantic" - flatparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/flat" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "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/semantic" + flatparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/flat" + "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" ) var ( @@ -117,7 +117,6 @@ func (m VersionManager) Evaluate(requestedVersion string, proxyCall bool) (strin m.conf.Displayer.Display("No compatible version found locally, search a remote one...") if m.conf.NoInstall { version, err := m.searchInstallRemote(predicateInfo, m.conf.NoInstall, proxyCall) - if err != nil { m.conf.Displayer.Flush(proxyCall) return "", errNoCompatibleLocally @@ -157,7 +156,7 @@ func (m VersionManager) Install(requestedVersion string) error { func (m VersionManager) InstallPath() (string, error) { dir := filepath.Join(m.conf.RootPath, m.FolderName) - return dir, os.MkdirAll(dir, 0755) + return dir, os.MkdirAll(dir, 0o755) } func (m VersionManager) ListLocal(reverseOrder bool) ([]string, error) { @@ -413,7 +412,7 @@ func removeFile(filePath string, conf *config.Config) error { } func writeFile(filePath string, content string, conf *config.Config) error { - err := os.WriteFile(filePath, []byte(content), 0644) + err := os.WriteFile(filePath, []byte(content), 0o644) if err == nil { conf.Displayer.Display(loghelper.Concat("Written ", content, " in ", filePath)) } diff --git a/versionmanager/proxy/proxy.go b/versionmanager/proxy/proxy.go index df2c360b..548ea66d 100644 --- a/versionmanager/proxy/proxy.go +++ b/versionmanager/proxy/proxy.go @@ -30,9 +30,9 @@ import ( "strconv" "strings" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager" - terragruntparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/terragrunt" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager" + terragruntparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/terragrunt" ) var errDelimiter = errors.New("key and value should not contains delimiter") @@ -126,7 +126,7 @@ func initIO(cmd *exec.Cmd, execName string, pExitCode *int) (func(int), error) { } outputPath := os.Getenv("GITHUB_OUTPUT") - outputFile, err := os.OpenFile(outputPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + outputFile, err := os.OpenFile(outputPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return nil, err } diff --git a/versionmanager/retriever/atmos/atmosretriever.go b/versionmanager/retriever/atmos/atmosretriever.go index 0b0439da..e3b4dee7 100644 --- a/versionmanager/retriever/atmos/atmosretriever.go +++ b/versionmanager/retriever/atmos/atmosretriever.go @@ -26,13 +26,13 @@ import ( "strings" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/apimsg" - sha256check "github.com/tofuutils/tenv/pkg/check/sha256" - "github.com/tofuutils/tenv/pkg/download" - "github.com/tofuutils/tenv/pkg/github" - "github.com/tofuutils/tenv/pkg/winbin" - htmlretriever "github.com/tofuutils/tenv/versionmanager/retriever/html" + "github.com/tofuutils/tenv/v2/config" + "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" ) const ( @@ -106,12 +106,12 @@ func (r AtmosRetriever) InstallRelease(versionStr string, targetPath string) err return err } - err = os.MkdirAll(targetPath, 0755) + err = os.MkdirAll(targetPath, 0o755) if err != nil { return err } - return os.WriteFile(filepath.Join(targetPath, winbin.GetBinaryName(config.AtmosName)), data, 0755) + return os.WriteFile(filepath.Join(targetPath, winbin.GetBinaryName(config.AtmosName)), data, 0o755) } func (r AtmosRetriever) ListReleases() ([]string, error) { diff --git a/versionmanager/retriever/html/htmlretriever.go b/versionmanager/retriever/html/htmlretriever.go index 7bed24b5..db08edda 100644 --- a/versionmanager/retriever/html/htmlretriever.go +++ b/versionmanager/retriever/html/htmlretriever.go @@ -22,10 +22,10 @@ import ( "net/url" "github.com/PuerkitoBio/goquery" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/download" - "github.com/tofuutils/tenv/pkg/htmlquery" - versionfinder "github.com/tofuutils/tenv/versionmanager/semantic/finder" + "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" ) func BuildAssetURLs(baseAssetURL string, assetNames ...string) ([]string, error) { diff --git a/versionmanager/retriever/terraform/terraformretriever.go b/versionmanager/retriever/terraform/terraformretriever.go index d9a9c68c..d77f9e11 100644 --- a/versionmanager/retriever/terraform/terraformretriever.go +++ b/versionmanager/retriever/terraform/terraformretriever.go @@ -28,13 +28,13 @@ import ( "strings" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/apimsg" - pgpcheck "github.com/tofuutils/tenv/pkg/check/pgp" - sha256check "github.com/tofuutils/tenv/pkg/check/sha256" - "github.com/tofuutils/tenv/pkg/download" - "github.com/tofuutils/tenv/pkg/zip" - htmlretriever "github.com/tofuutils/tenv/versionmanager/retriever/html" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/apimsg" + pgpcheck "github.com/tofuutils/tenv/v2/pkg/check/pgp" + sha256check "github.com/tofuutils/tenv/v2/pkg/check/sha256" + "github.com/tofuutils/tenv/v2/pkg/download" + "github.com/tofuutils/tenv/v2/pkg/zip" + htmlretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/html" ) const ( diff --git a/versionmanager/retriever/terraform/terraformretriever_test.go b/versionmanager/retriever/terraform/terraformretriever_test.go index cade1494..2285a82a 100644 --- a/versionmanager/retriever/terraform/terraformretriever_test.go +++ b/versionmanager/retriever/terraform/terraformretriever_test.go @@ -24,7 +24,7 @@ import ( "slices" "testing" - "github.com/tofuutils/tenv/versionmanager/semantic" + "github.com/tofuutils/tenv/v2/versionmanager/semantic" ) //go:embed testdata/release.json diff --git a/versionmanager/retriever/terragrunt/terragruntretriever.go b/versionmanager/retriever/terragrunt/terragruntretriever.go index 4fb34784..76357e4a 100644 --- a/versionmanager/retriever/terragrunt/terragruntretriever.go +++ b/versionmanager/retriever/terragrunt/terragruntretriever.go @@ -26,13 +26,13 @@ import ( "strings" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/apimsg" - sha256check "github.com/tofuutils/tenv/pkg/check/sha256" - "github.com/tofuutils/tenv/pkg/download" - "github.com/tofuutils/tenv/pkg/github" - "github.com/tofuutils/tenv/pkg/winbin" - htmlretriever "github.com/tofuutils/tenv/versionmanager/retriever/html" + "github.com/tofuutils/tenv/v2/config" + "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" ) const ( @@ -103,12 +103,12 @@ func (r TerragruntRetriever) InstallRelease(versionStr string, targetPath string return err } - err = os.MkdirAll(targetPath, 0755) + err = os.MkdirAll(targetPath, 0o755) if err != nil { return err } - return os.WriteFile(filepath.Join(targetPath, winbin.GetBinaryName(config.TerragruntName)), data, 0755) + return os.WriteFile(filepath.Join(targetPath, winbin.GetBinaryName(config.TerragruntName)), data, 0o755) } func (r TerragruntRetriever) ListReleases() ([]string, error) { diff --git a/versionmanager/retriever/tofu/tofuretriever.go b/versionmanager/retriever/tofu/tofuretriever.go index 561ca4a5..b3e66483 100644 --- a/versionmanager/retriever/tofu/tofuretriever.go +++ b/versionmanager/retriever/tofu/tofuretriever.go @@ -26,15 +26,15 @@ import ( "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-version" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/apimsg" - cosigncheck "github.com/tofuutils/tenv/pkg/check/cosign" - pgpcheck "github.com/tofuutils/tenv/pkg/check/pgp" - sha256check "github.com/tofuutils/tenv/pkg/check/sha256" - "github.com/tofuutils/tenv/pkg/download" - "github.com/tofuutils/tenv/pkg/github" - "github.com/tofuutils/tenv/pkg/zip" - htmlretriever "github.com/tofuutils/tenv/versionmanager/retriever/html" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/apimsg" + cosigncheck "github.com/tofuutils/tenv/v2/pkg/check/cosign" + pgpcheck "github.com/tofuutils/tenv/v2/pkg/check/pgp" + 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/zip" + htmlretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/html" ) const ( diff --git a/versionmanager/semantic/finder/finder_test.go b/versionmanager/semantic/finder/finder_test.go index 088016a6..9cc6c4ee 100644 --- a/versionmanager/semantic/finder/finder_test.go +++ b/versionmanager/semantic/finder/finder_test.go @@ -21,7 +21,7 @@ package versionfinder_test import ( "testing" - versionfinder "github.com/tofuutils/tenv/versionmanager/semantic/finder" + versionfinder "github.com/tofuutils/tenv/v2/versionmanager/semantic/finder" ) func TestFindVersionAlphaSlash(t *testing.T) { diff --git a/versionmanager/semantic/parser/flat/flatparser.go b/versionmanager/semantic/parser/flat/flatparser.go index b98c2213..9c80a883 100644 --- a/versionmanager/semantic/parser/flat/flatparser.go +++ b/versionmanager/semantic/parser/flat/flatparser.go @@ -24,9 +24,9 @@ import ( "io/fs" "os" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" + "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" ) func RetrieveVersion(filePath string, conf *config.Config) (string, error) { diff --git a/versionmanager/semantic/parser/terragrunt/gruntparser.go b/versionmanager/semantic/parser/terragrunt/gruntparser.go index cae24581..555f1859 100644 --- a/versionmanager/semantic/parser/terragrunt/gruntparser.go +++ b/versionmanager/semantic/parser/terragrunt/gruntparser.go @@ -26,9 +26,9 @@ import ( "github.com/hashicorp/go-hclog" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" + "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/versionmanager/semantic/parser/tf/tfparser.go b/versionmanager/semantic/parser/tf/tfparser.go index 60c13c21..3b69e5ff 100644 --- a/versionmanager/semantic/parser/tf/tfparser.go +++ b/versionmanager/semantic/parser/tf/tfparser.go @@ -25,8 +25,8 @@ import ( "github.com/hashicorp/go-hclog" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/versionmanager/semantic/parser/toml/tomlparser.go b/versionmanager/semantic/parser/toml/tomlparser.go index 339ab2ef..c5d6509c 100644 --- a/versionmanager/semantic/parser/toml/tomlparser.go +++ b/versionmanager/semantic/parser/toml/tomlparser.go @@ -24,9 +24,9 @@ import ( "os" "github.com/BurntSushi/toml" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" + "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" ) const versionName = "version" diff --git a/versionmanager/semantic/semantic.go b/versionmanager/semantic/semantic.go index b17d68c0..5046076a 100644 --- a/versionmanager/semantic/semantic.go +++ b/versionmanager/semantic/semantic.go @@ -24,10 +24,10 @@ import ( "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-version" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" - tfparser "github.com/tofuutils/tenv/versionmanager/semantic/parser/tf" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" + tfparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/tf" + "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" ) const ( diff --git a/versionmanager/semantic/semantic_test.go b/versionmanager/semantic/semantic_test.go index e2f2ca25..8ed98a95 100644 --- a/versionmanager/semantic/semantic_test.go +++ b/versionmanager/semantic/semantic_test.go @@ -22,7 +22,7 @@ import ( "slices" "testing" - "github.com/tofuutils/tenv/versionmanager/semantic" + "github.com/tofuutils/tenv/v2/versionmanager/semantic" ) func TestCmpVersion(t *testing.T) { diff --git a/versionmanager/semantic/types/types.go b/versionmanager/semantic/types/types.go index bd10a0a6..590cabd7 100644 --- a/versionmanager/semantic/types/types.go +++ b/versionmanager/semantic/types/types.go @@ -19,8 +19,8 @@ package types import ( - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/pkg/loghelper" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" ) type ConstraintInfo interface { diff --git a/versionmanager/semantic/walker.go b/versionmanager/semantic/walker.go index 305a004f..9047992c 100644 --- a/versionmanager/semantic/walker.go +++ b/versionmanager/semantic/walker.go @@ -22,8 +22,8 @@ import ( "os" "path/filepath" - "github.com/tofuutils/tenv/config" - "github.com/tofuutils/tenv/versionmanager/semantic/types" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" ) func RetrieveVersion(versionFiles []types.VersionFile, conf *config.Config) (string, error) { From 7430dd307fa0f6453bd9bdcb7256abd52cd86253 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Mon, 17 Jun 2024 17:22:21 +0300 Subject: [PATCH 2/2] Regroup project imports Signed-off-by: Artiom Diomin --- cmd/tenv/subcmd.go | 5 +++-- cmd/tenv/tenv.go | 3 ++- config/config.go | 3 ++- pkg/check/cosign/check.go | 3 ++- pkg/lockfile/lockfile.go | 3 ++- versionmanager/manager.go | 5 +++-- versionmanager/retriever/atmos/atmosretriever.go | 3 ++- versionmanager/retriever/html/htmlretriever.go | 3 ++- versionmanager/retriever/terraform/terraformretriever.go | 3 ++- versionmanager/retriever/terragrunt/terragruntretriever.go | 3 ++- versionmanager/retriever/tofu/tofuretriever.go | 5 +++-- versionmanager/semantic/parser/terragrunt/gruntparser.go | 7 ++++--- versionmanager/semantic/parser/tf/tfparser.go | 5 +++-- versionmanager/semantic/parser/toml/tomlparser.go | 3 ++- versionmanager/semantic/semantic.go | 5 +++-- 15 files changed, 37 insertions(+), 22 deletions(-) diff --git a/cmd/tenv/subcmd.go b/cmd/tenv/subcmd.go index 2ef0a081..a613e6cf 100644 --- a/cmd/tenv/subcmd.go +++ b/cmd/tenv/subcmd.go @@ -24,12 +24,13 @@ import ( "strconv" "strings" - "github.com/spf13/cobra" - "github.com/spf13/pflag" "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/spf13/cobra" + "github.com/spf13/pflag" ) const deprecationMsg = "Direct usage of this subcommand on tenv is deprecated, you should use tofu subcommand instead.\n\n" diff --git a/cmd/tenv/tenv.go b/cmd/tenv/tenv.go index 5945acb4..ee41be6d 100644 --- a/cmd/tenv/tenv.go +++ b/cmd/tenv/tenv.go @@ -24,11 +24,12 @@ import ( "path/filepath" "strings" - "github.com/spf13/cobra" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/versionmanager" "github.com/tofuutils/tenv/v2/versionmanager/builder" terragruntparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/terragrunt" + + "github.com/spf13/cobra" ) const ( diff --git a/config/config.go b/config/config.go index 8d0ad08c..161fbb10 100644 --- a/config/config.go +++ b/config/config.go @@ -26,9 +26,10 @@ import ( "runtime" "strconv" + "github.com/tofuutils/tenv/v2/pkg/loghelper" + "github.com/fatih/color" "github.com/hashicorp/go-hclog" - "github.com/tofuutils/tenv/v2/pkg/loghelper" "gopkg.in/yaml.v3" ) diff --git a/pkg/check/cosign/check.go b/pkg/check/cosign/check.go index 773f01b6..18610054 100644 --- a/pkg/check/cosign/check.go +++ b/pkg/check/cosign/check.go @@ -24,8 +24,9 @@ import ( "os/exec" "strings" - "github.com/hashicorp/go-hclog" "github.com/tofuutils/tenv/v2/pkg/loghelper" + + "github.com/hashicorp/go-hclog" ) const ( diff --git a/pkg/lockfile/lockfile.go b/pkg/lockfile/lockfile.go index becaec74..4db557ae 100644 --- a/pkg/lockfile/lockfile.go +++ b/pkg/lockfile/lockfile.go @@ -25,8 +25,9 @@ import ( "sync" "time" - "github.com/hashicorp/go-hclog" "github.com/tofuutils/tenv/v2/pkg/loghelper" + + "github.com/hashicorp/go-hclog" ) const ( diff --git a/versionmanager/manager.go b/versionmanager/manager.go index 63c07ebc..bb687a1a 100644 --- a/versionmanager/manager.go +++ b/versionmanager/manager.go @@ -27,8 +27,6 @@ import ( "slices" "strings" - "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" @@ -36,6 +34,9 @@ import ( "github.com/tofuutils/tenv/v2/versionmanager/semantic" flatparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/flat" "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-version" ) var ( diff --git a/versionmanager/retriever/atmos/atmosretriever.go b/versionmanager/retriever/atmos/atmosretriever.go index e3b4dee7..09d4d2cd 100644 --- a/versionmanager/retriever/atmos/atmosretriever.go +++ b/versionmanager/retriever/atmos/atmosretriever.go @@ -25,7 +25,6 @@ import ( "runtime" "strings" - "github.com/hashicorp/go-hclog" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/apimsg" sha256check "github.com/tofuutils/tenv/v2/pkg/check/sha256" @@ -33,6 +32,8 @@ import ( "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/hashicorp/go-hclog" ) const ( diff --git a/versionmanager/retriever/html/htmlretriever.go b/versionmanager/retriever/html/htmlretriever.go index db08edda..268f1892 100644 --- a/versionmanager/retriever/html/htmlretriever.go +++ b/versionmanager/retriever/html/htmlretriever.go @@ -21,11 +21,12 @@ package htmlretriever import ( "net/url" - "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/PuerkitoBio/goquery" ) func BuildAssetURLs(baseAssetURL string, assetNames ...string) ([]string, error) { diff --git a/versionmanager/retriever/terraform/terraformretriever.go b/versionmanager/retriever/terraform/terraformretriever.go index d77f9e11..7535f1a8 100644 --- a/versionmanager/retriever/terraform/terraformretriever.go +++ b/versionmanager/retriever/terraform/terraformretriever.go @@ -27,7 +27,6 @@ import ( "runtime" "strings" - "github.com/hashicorp/go-hclog" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/apimsg" pgpcheck "github.com/tofuutils/tenv/v2/pkg/check/pgp" @@ -35,6 +34,8 @@ import ( "github.com/tofuutils/tenv/v2/pkg/download" "github.com/tofuutils/tenv/v2/pkg/zip" htmlretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/html" + + "github.com/hashicorp/go-hclog" ) const ( diff --git a/versionmanager/retriever/terragrunt/terragruntretriever.go b/versionmanager/retriever/terragrunt/terragruntretriever.go index 76357e4a..b613797a 100644 --- a/versionmanager/retriever/terragrunt/terragruntretriever.go +++ b/versionmanager/retriever/terragrunt/terragruntretriever.go @@ -25,7 +25,6 @@ import ( "runtime" "strings" - "github.com/hashicorp/go-hclog" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/apimsg" sha256check "github.com/tofuutils/tenv/v2/pkg/check/sha256" @@ -33,6 +32,8 @@ import ( "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/hashicorp/go-hclog" ) const ( diff --git a/versionmanager/retriever/tofu/tofuretriever.go b/versionmanager/retriever/tofu/tofuretriever.go index b3e66483..4c36e2ea 100644 --- a/versionmanager/retriever/tofu/tofuretriever.go +++ b/versionmanager/retriever/tofu/tofuretriever.go @@ -24,8 +24,6 @@ import ( "runtime" "strings" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-version" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/apimsg" cosigncheck "github.com/tofuutils/tenv/v2/pkg/check/cosign" @@ -35,6 +33,9 @@ import ( "github.com/tofuutils/tenv/v2/pkg/github" "github.com/tofuutils/tenv/v2/pkg/zip" htmlretriever "github.com/tofuutils/tenv/v2/versionmanager/retriever/html" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-version" ) const ( diff --git a/versionmanager/semantic/parser/terragrunt/gruntparser.go b/versionmanager/semantic/parser/terragrunt/gruntparser.go index 555f1859..4e0740e9 100644 --- a/versionmanager/semantic/parser/terragrunt/gruntparser.go +++ b/versionmanager/semantic/parser/terragrunt/gruntparser.go @@ -23,12 +23,13 @@ import ( "io/fs" "os" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/hcl/v2" - "github.com/hashicorp/hcl/v2/hclparse" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/loghelper" "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/hcl/v2" + "github.com/hashicorp/hcl/v2/hclparse" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/versionmanager/semantic/parser/tf/tfparser.go b/versionmanager/semantic/parser/tf/tfparser.go index 3b69e5ff..fdc33bb6 100644 --- a/versionmanager/semantic/parser/tf/tfparser.go +++ b/versionmanager/semantic/parser/tf/tfparser.go @@ -22,11 +22,12 @@ import ( "os" "strings" + "github.com/tofuutils/tenv/v2/config" + "github.com/tofuutils/tenv/v2/pkg/loghelper" + "github.com/hashicorp/go-hclog" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" - "github.com/tofuutils/tenv/v2/config" - "github.com/tofuutils/tenv/v2/pkg/loghelper" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/versionmanager/semantic/parser/toml/tomlparser.go b/versionmanager/semantic/parser/toml/tomlparser.go index c5d6509c..40ee499d 100644 --- a/versionmanager/semantic/parser/toml/tomlparser.go +++ b/versionmanager/semantic/parser/toml/tomlparser.go @@ -23,10 +23,11 @@ import ( "io/fs" "os" - "github.com/BurntSushi/toml" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/loghelper" "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" + + "github.com/BurntSushi/toml" ) const versionName = "version" diff --git a/versionmanager/semantic/semantic.go b/versionmanager/semantic/semantic.go index 5046076a..661a911d 100644 --- a/versionmanager/semantic/semantic.go +++ b/versionmanager/semantic/semantic.go @@ -22,12 +22,13 @@ import ( "regexp" "strings" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-version" "github.com/tofuutils/tenv/v2/config" "github.com/tofuutils/tenv/v2/pkg/loghelper" tfparser "github.com/tofuutils/tenv/v2/versionmanager/semantic/parser/tf" "github.com/tofuutils/tenv/v2/versionmanager/semantic/types" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-version" ) const (