Add all dependency of go-getter

This commit is contained in:
Jingfang Liu
2018-08-15 11:34:38 -07:00
parent c9a8bc1121
commit ec95e5f97e
2894 changed files with 1945864 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
package main
import (
"flag"
"log"
"os"
"github.com/hashicorp/go-getter"
)
func main() {
modeRaw := flag.String("mode", "any", "get mode (any, file, dir)")
flag.Parse()
args := flag.Args()
if len(args) < 2 {
log.Fatalf("Expected two args: URL and dst")
os.Exit(1)
}
// Get the mode
var mode getter.ClientMode
switch *modeRaw {
case "any":
mode = getter.ClientModeAny
case "file":
mode = getter.ClientModeFile
case "dir":
mode = getter.ClientModeDir
default:
log.Fatalf("Invalid client mode, must be 'any', 'file', or 'dir': %s", *modeRaw)
os.Exit(1)
}
// Get the pwd
pwd, err := os.Getwd()
if err != nil {
log.Fatalf("Error getting wd: %s", err)
os.Exit(1)
}
// Build the client
client := &getter.Client{
Src: args[0],
Dst: args[1],
Pwd: pwd,
Mode: mode,
}
if err := client.Get(); err != nil {
log.Fatalf("Error downloading: %s", err)
os.Exit(1)
}
log.Println("Success!")
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
# Hello

View File

@@ -0,0 +1,5 @@
# Hello
module "foo" {
source = "./foo"
}

View File

@@ -0,0 +1,5 @@
# Hello
module "foo" {
source = "./foo"
}

View File

@@ -0,0 +1 @@
Hello

Binary file not shown.

View File

@@ -0,0 +1 @@
default

View File

@@ -0,0 +1,3 @@
992604507bcd66370bf91a0c9d526ccd833412bf 2
992604507bcd66370bf91a0c9d526ccd833412bf o default
c65e998d747ffbb1fe3b1c067a50664bb3fb5da4 o test-branch

View File

@@ -0,0 +1 @@
default

Binary file not shown.

View File

@@ -0,0 +1,2 @@
1 c65e998d747ffbb1fe3b1c067a50664bb3fb5da4

Binary file not shown.

View File

@@ -0,0 +1,2 @@
add file

View File

@@ -0,0 +1,4 @@
dotencode
fncache
revlogv1
store

View File

@@ -0,0 +1,3 @@
data/main.tf.i
data/foo.txt.i
data/main_branch.tf.i

View File

@@ -0,0 +1 @@
1 dcaed7754d58264cb9a5916215a5442377307bd1

Binary file not shown.

View File

@@ -0,0 +1,2 @@
data/main.tf.i
data/main_branch.tf.i

View File

@@ -0,0 +1 @@
1 dcaed7754d58264cb9a5916215a5442377307bd1

View File

@@ -0,0 +1 @@
default

View File

@@ -0,0 +1,2 @@
2
commit

Binary file not shown.

View File

@@ -0,0 +1 @@
Hello

View File

@@ -0,0 +1,5 @@
# Hello
module "foo" {
source = "./foo"
}

View File

@@ -0,0 +1,3 @@
module "b" {
source = "../c"
}

View File

@@ -0,0 +1 @@
# Hello

View File

@@ -0,0 +1,3 @@
module "a" {
source = "./a"
}

View File

@@ -0,0 +1,3 @@
module "bar" {
source = "./baz"
}

View File

@@ -0,0 +1,3 @@
module "foo" {
source = "./foo//sub"
}

View File

@@ -0,0 +1 @@
# Hello

View File

@@ -0,0 +1 @@
# Hello

View File

@@ -0,0 +1,5 @@
# Hello
module "foo" {
source = "./foo"
}

View File

@@ -0,0 +1,2 @@
# Hello

View File

@@ -0,0 +1,5 @@
# Hello
module "bar" {
source = "./bar"
}

View File

@@ -0,0 +1,5 @@
# Hello
module "foo" {
source = "./foo"
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
../real

View File

View File

@@ -0,0 +1,7 @@
module "foo" {
source = "./foo"
}
module "foo" {
source = "./foo"
}

View File

@@ -0,0 +1,3 @@
machine example.com
login foo
password bar

View File

@@ -0,0 +1 @@
variable "memory" { default = "foo" }

View File

@@ -0,0 +1,8 @@
module "child" {
source = "./child"
}
module "child2" {
source = "./child"
memory = "${module.child.memory_max}"
}

View File

@@ -0,0 +1,7 @@
module "child" {
source = "./child"
}
resource "aws_instance" "foo" {
memory = "${module.child.memory}"
}

View File

@@ -0,0 +1,5 @@
module "child" {
source = "./child"
memory = "foo"
}

View File

@@ -0,0 +1,3 @@
# Duplicate resources
resource "aws_instance" "foo" {}
resource "aws_instance" "foo" {}

View File

@@ -0,0 +1,3 @@
module "foo" {
source = "./child"
}

View File

@@ -0,0 +1,3 @@
variable "memory" {}
output "result" {}

View File

@@ -0,0 +1,8 @@
module "child" {
source = "./child"
memory = "1G"
}
resource "aws_instance" "foo" {
memory = "${module.child.result}"
}

View File

@@ -0,0 +1 @@
variable "memory" {}

View File

@@ -0,0 +1,3 @@
module "child" {
source = "./child"
}

View File

@@ -0,0 +1,3 @@
# Duplicate resources
resource "aws_instance" "foo" {}
resource "aws_instance" "foo" {}