From f355b83fe53b7aa5441df16feba8fcdc8ce7eb45 Mon Sep 17 00:00:00 2001 From: mitch Date: Wed, 9 Mar 2022 20:09:31 -0500 Subject: [PATCH] Removed hard coded amd_64 --- darwin_amd64.go | 8 ++++++++ darwin_arm_64.go | 8 ++++++++ freebsd_386.go | 8 ++++++++ freebsd_amd_64.go | 8 ++++++++ freebsd_arm.go | 8 ++++++++ linux_386.go | 8 ++++++++ linux_amd_64.go | 8 ++++++++ linux_arm.go | 8 ++++++++ linux_arm64.go | 8 ++++++++ openbsd_386.go | 8 ++++++++ openbsd_amd64.go | 8 ++++++++ solaris_amd64.go | 8 ++++++++ versionedTerraform.go | 1 - windows_386.go | 8 ++++++++ windows_amd64.go | 8 ++++++++ 15 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 darwin_amd64.go create mode 100644 darwin_arm_64.go create mode 100644 freebsd_386.go create mode 100644 freebsd_amd_64.go create mode 100644 freebsd_arm.go create mode 100644 linux_386.go create mode 100644 linux_amd_64.go create mode 100644 linux_arm.go create mode 100644 linux_arm64.go create mode 100644 openbsd_386.go create mode 100644 openbsd_amd64.go create mode 100644 solaris_amd64.go create mode 100644 windows_386.go create mode 100644 windows_amd64.go diff --git a/darwin_amd64.go b/darwin_amd64.go new file mode 100644 index 0000000..b1984ff --- /dev/null +++ b/darwin_amd64.go @@ -0,0 +1,8 @@ +//go:build darwin && amd64 +// +build darwin,amd64 + +package versionedTerraform + +const ( + fileSuffix = "_darwin_amd64.zip" +) diff --git a/darwin_arm_64.go b/darwin_arm_64.go new file mode 100644 index 0000000..16c18a5 --- /dev/null +++ b/darwin_arm_64.go @@ -0,0 +1,8 @@ +//go:build darwin && arm64 +// +build darwin,arm64 + +package versionedTerraform + +const ( + fileSuffix = "_darwin_arm64.zip" +) diff --git a/freebsd_386.go b/freebsd_386.go new file mode 100644 index 0000000..e0b2411 --- /dev/null +++ b/freebsd_386.go @@ -0,0 +1,8 @@ +//go:build freebsd && 386 +// +build freebsd,386 + +package versionedTerraform + +const ( + fileSuffix = "_freebsd_386.zip" +) diff --git a/freebsd_amd_64.go b/freebsd_amd_64.go new file mode 100644 index 0000000..78547e3 --- /dev/null +++ b/freebsd_amd_64.go @@ -0,0 +1,8 @@ +//go:build freebsd && amd64 +// +build freebsd,amd64 + +package versionedTerraform + +const ( + fileSuffix = "_freebsd_amd64.zip" +) diff --git a/freebsd_arm.go b/freebsd_arm.go new file mode 100644 index 0000000..2676b1e --- /dev/null +++ b/freebsd_arm.go @@ -0,0 +1,8 @@ +//go:build freebsd && arm +// +build freebsd,arm + +package versionedTerraform + +const ( + fileSuffix = "_freebsd_arm.zip" +) diff --git a/linux_386.go b/linux_386.go new file mode 100644 index 0000000..36913f0 --- /dev/null +++ b/linux_386.go @@ -0,0 +1,8 @@ +//go:build linux && 386 +// +build linux,386 + +package versionedTerraform + +const ( + fileSuffix = "_linux_386.zip" +) diff --git a/linux_amd_64.go b/linux_amd_64.go new file mode 100644 index 0000000..9aceb1d --- /dev/null +++ b/linux_amd_64.go @@ -0,0 +1,8 @@ +//go:build linux && amd64 +// +build linux,amd64 + +package versionedTerraform + +const ( + fileSuffix = "_linux_amd64.zip" +) diff --git a/linux_arm.go b/linux_arm.go new file mode 100644 index 0000000..e5512a5 --- /dev/null +++ b/linux_arm.go @@ -0,0 +1,8 @@ +//go:build linux && arm +// +build linux,arm + +package versionedTerraform + +const ( + fileSuffix = "_linux_arm.zip" +) diff --git a/linux_arm64.go b/linux_arm64.go new file mode 100644 index 0000000..3969d64 --- /dev/null +++ b/linux_arm64.go @@ -0,0 +1,8 @@ +//go:build linux && arm64 +// +build linux,arm64 + +package versionedTerraform + +const ( + fileSuffix = "_linux_arm64.zip" +) diff --git a/openbsd_386.go b/openbsd_386.go new file mode 100644 index 0000000..fe61814 --- /dev/null +++ b/openbsd_386.go @@ -0,0 +1,8 @@ +//go:build openbsd && 386 +// +build openbsd,386 + +package versionedTerraform + +const ( + fileSuffix = "_openbsd_386.zip" +) diff --git a/openbsd_amd64.go b/openbsd_amd64.go new file mode 100644 index 0000000..75eee73 --- /dev/null +++ b/openbsd_amd64.go @@ -0,0 +1,8 @@ +//go:build openbsd && amd64 +// +build openbsd,amd64 + +package versionedTerraform + +const ( + fileSuffix = "_openbsd_amd64.zip" +) diff --git a/solaris_amd64.go b/solaris_amd64.go new file mode 100644 index 0000000..75793ef --- /dev/null +++ b/solaris_amd64.go @@ -0,0 +1,8 @@ +//go:build solaris && amd64 +// +build solaris,amd64 + +package versionedTerraform + +const ( + fileSuffix = "_solaris_amd64.zip" +) diff --git a/versionedTerraform.go b/versionedTerraform.go index bb4ad71..49b987a 100644 --- a/versionedTerraform.go +++ b/versionedTerraform.go @@ -30,7 +30,6 @@ type Version struct { const ( hashicorpUrl = "https://releases.hashicorp.com/terraform/" terraformPrefix = "terraform_" - fileSuffix = "_linux_amd64.zip" versionedTerraformFolder = "/.versionedTerraform" ) diff --git a/windows_386.go b/windows_386.go new file mode 100644 index 0000000..75a2eda --- /dev/null +++ b/windows_386.go @@ -0,0 +1,8 @@ +//go:build windows && 386 +// +build windows,386 + +package versionedTerraform + +const ( + fileSuffix = "_windows_386.zip" +) diff --git a/windows_amd64.go b/windows_amd64.go new file mode 100644 index 0000000..dc561d8 --- /dev/null +++ b/windows_amd64.go @@ -0,0 +1,8 @@ +//go:build windows && amd64 +// +build windows,amd64 + +package versionedTerraform + +const ( + fileSuffix = "_windows_amd64.zip" +)