diff --git a/.travis.yml b/.travis.yml
index b0bedcad23..f2a1fcca10 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,8 +9,9 @@ install:
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- bash scripts/gogetcookie.sh
+- go get github.com/kardianos/govendor
script:
-- make test vet
+- make vendor-status vet test
- GOOS=windows go build
branches:
only:
diff --git a/Makefile b/Makefile
index c4e6b5ff69..76aca228cc 100644
--- a/Makefile
+++ b/Makefile
@@ -99,4 +99,7 @@ fmtcheck:
errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
-.PHONY: bin default generate test vet fmt fmtcheck tools
+vendor-status:
+ @govendor status
+
+.PHONY: bin core-dev core-test cover default dev errcheck fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status vet
diff --git a/deps/v0-4-0.json b/deps/v0-4-0.json
deleted file mode 100644
index 1dcbc7356e..0000000000
--- a/deps/v0-4-0.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Deps": [
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-55-g8663626",
- "Rev": "86636264d03bc142dcd136d02811c469ba542444"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-55-g8663626",
- "Rev": "86636264d03bc142dcd136d02811c469ba542444"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.0-127-g8724845",
- "Rev": "872484596472df47b95128f5996776fd73eda26c"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "fcdddc395df1ddf4247c69bd436e84cfa0733f7e"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "bb92dddfa9792e738a631f04ada52858a139bcf7"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "513e04c400ee2e81e97f5e011c08fb42c6f69b84"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "b4f943b3f25da97dec8e26bee1c3269019de070d"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "afc399c273e70173826fb6f518a48edff23fe897"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "c101d94abf8cd5c6213c8300d0aed6368f2d6ede"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "7d2d8c8a4e078ce3c58736ab521a40b37a504c52"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "442e588f213303bec7936deba67901f8fc8f18b1"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "9cdd861463675960a0a0083a7e2023e7b0c994d7"
- }
- ]
-}
diff --git a/deps/v0-4-1.json b/deps/v0-4-1.json
deleted file mode 100644
index c7c82e5595..0000000000
--- a/deps/v0-4-1.json
+++ /dev/null
@@ -1,286 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "code.google.com/p/go-uuid/uuid",
- "Comment": "null-15",
- "Rev": "35bc42037350f0078e3c974c6ea690f1926603ab"
- },
- {
- "ImportPath": "github.com/Sirupsen/logrus",
- "Comment": "v0.7.2-4-gcdd90c3",
- "Rev": "cdd90c38c6e3718c731b555b9c3ed1becebec3ba"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/endpoints",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/ec2query",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/query/queryutil",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/signer/v4",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/service/ec2",
- "Rev": "a79c7d95c012010822e27aaa5551927f5e8a6ab6"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "594d483b9b6a8ddc7cd2f1e3e7d1de92fa2de665"
- },
- {
- "ImportPath": "github.com/docker/docker/pkg/archive",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/docker/docker/pkg/fileutils",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/docker/docker/pkg/ioutils",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/docker/docker/pkg/pools",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/docker/docker/pkg/promise",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/docker/docker/pkg/system",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar",
- "Comment": "v1.4.1-2478-gdd4389f",
- "Rev": "dd4389fb19e442d386c3106545f04387c08e6a91"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "fb0e9fb80f074795d7c11eba700eb33058b14bfb"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-57-g90aad8f",
- "Rev": "90aad8fc22a107db14dd80efdc131a197f7234e6"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-57-g90aad8f",
- "Rev": "90aad8fc22a107db14dd80efdc131a197f7234e6"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/aws",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/autoscaling",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/ec2",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/elb",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/endpoints",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/iam",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/rds",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/route53",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/s3",
- "Comment": "tf0.4.0",
- "Rev": "1d5c8f6b881ab3e2e0c3e737886732bbfd1ced27"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.0-134-ge5797d9",
- "Rev": "e5797d9a86b025d009809199146747384ad34db7"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "fcdddc395df1ddf4247c69bd436e84cfa0733f7e"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "bb92dddfa9792e738a631f04ada52858a139bcf7"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "513e04c400ee2e81e97f5e011c08fb42c6f69b84"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "b2e55852ddaf823a85c67f798080eb7d08acd71d"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-3-g2fcac99",
- "Rev": "2fcac9923693d66dc0e03988a31b21da05cdea84"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "afc399c273e70173826fb6f518a48edff23fe897"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "c101d94abf8cd5c6213c8300d0aed6368f2d6ede"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "7d2d8c8a4e078ce3c58736ab521a40b37a504c52"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "442e588f213303bec7936deba67901f8fc8f18b1"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "9cdd861463675960a0a0083a7e2023e7b0c994d7"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "1e0c2b0eb33ca7b5632a130d6d34376a1ea46c84"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-558-gce0f487",
- "Rev": "ce0f487f6747ab43c4e4404722df25349385bebd"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-5-gf73f6ff",
- "Rev": "f73f6ff1b843dbdac0a01da7b7f39883adfe2bdb"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "c57d4a71915a248dbad846d60825145062b4c18e"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "84ba27dd5b2d8135e9da1395277f2c9333a2ffda"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "ce5ea7da934b76b1066c527632359e2b8f65db97"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "2f6114897375589857c508d7392e55d5e7580db8"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "2f6114897375589857c508d7392e55d5e7580db8"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "c97f5f9979a8582f3ab72873a51979619801248b"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "c97f5f9979a8582f3ab72873a51979619801248b"
- }
- ]
-}
diff --git a/deps/v0-5-0.json b/deps/v0-5-0.json
deleted file mode 100644
index b743d5855a..0000000000
--- a/deps/v0-5-0.json
+++ /dev/null
@@ -1,121 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Deps": [
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/endpoints",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/query",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/rest",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/restxml",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/signer/v4",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/service/s3",
- "Rev": "9214b8dd48ef351976b0af5de3eacfa8ba052177"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-60-g6a87d5f",
- "Rev": "6a87d5f443991e9916104392cd5fc77678843e1d"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-60-g6a87d5f",
- "Rev": "6a87d5f443991e9916104392cd5fc77678843e1d"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.0-199-g205af6b",
- "Rev": "205af6ba750b88863e6ee50c7c3d19edc180a6f6"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "fcdddc395df1ddf4247c69bd436e84cfa0733f7e"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "bb92dddfa9792e738a631f04ada52858a139bcf7"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "513e04c400ee2e81e97f5e011c08fb42c6f69b84"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "b2e55852ddaf823a85c67f798080eb7d08acd71d"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "6cc8bc522243675a2882b81662b0b0d2e04b99c9"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "442e588f213303bec7936deba67901f8fc8f18b1"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "242be0c275dedfba00a616563e6db75ab8f279ec"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh/terminal",
- "Rev": "c84e1f8e3a7e322d497cd16c0e8a13c7e127baf3"
- }
- ]
-}
diff --git a/deps/v0-5-3.json b/deps/v0-5-3.json
deleted file mode 100644
index 09fe5c60ff..0000000000
--- a/deps/v0-5-3.json
+++ /dev/null
@@ -1,301 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Deps": [
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/apierr",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/endpoints",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/query",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/rest",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/restxml",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/internal/signer/v4",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/service/s3",
- "Rev": "43d7c58d0a71c01d98b7881cb9f90047f04f4acd"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-60-g6a87d5f",
- "Rev": "6a87d5f443991e9916104392cd5fc77678843e1d"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-60-g6a87d5f",
- "Rev": "6a87d5f443991e9916104392cd5fc77678843e1d"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-33-g0aea1f0",
- "Rev": "0aea1f06a1662dd392d3c8e8240cb4cc662e2e65"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "fcdddc395df1ddf4247c69bd436e84cfa0733f7e"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "999359b6b7a041ce16e695d51e92145b83f01087"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "513e04c400ee2e81e97f5e011c08fb42c6f69b84"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "b2e55852ddaf823a85c67f798080eb7d08acd71d"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "76e2780bc4f71797e1ce037ac0b43b7c99b31749"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "bb4fbaf540ca2f7057d3adb5765784d24d9fd801"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh/terminal",
- "Rev": "c10c31b5e94b6f7a0283272dc2bb27163dcea24b"
- },
- {
- "ImportPath": "github.com/Sirupsen/logrus",
- "Rev": "52919f182f9c314f8a38c5afe96506f73d02b4b2"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go",
- "Rev": "594d483b9b6a8ddc7cd2f1e3e7d1de92fa2de665"
- },
- {
- "ImportPath": "github.com/docker/docker",
- "Rev": "42cfc95549728014811cc9aa2c5b07bdf5553a54"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "f90594a4da6a7cbdaedd29ee5495ddd6b39fe5d3"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go",
- "Rev": "6a87d5f443991e9916104392cd5fc77678843e1d"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go",
- "Rev": "e6ea0192eee4640f32ec73c0cbb71f63e4f2b65a"
- },
- {
- "ImportPath": "github.com/hashicorp/consul",
- "Rev": "9417fd37686241d65918208874a7faa4d0cd92d2"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "fcdddc395df1ddf4247c69bd436e84cfa0733f7e"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "999359b6b7a041ce16e695d51e92145b83f01087"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "513e04c400ee2e81e97f5e011c08fb42c6f69b84"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "b2e55852ddaf823a85c67f798080eb7d08acd71d"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Rev": "2fcac9923693d66dc0e03988a31b21da05cdea84"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm",
- "Rev": "132339029dfa67fd39ff8edeed2af78f2cca4fbb"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "6cc8bc522243675a2882b81662b0b0d2e04b99c9"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/gox",
- "Rev": "e8e6fd4fe12510cc46893dff18c5188a6a6dc549"
- },
- {
- "ImportPath": "github.com/mitchellh/iochan",
- "Rev": "b584a329b193e206025682ae6c10cdbe03b0cd77"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "442e588f213303bec7936deba67901f8fc8f18b1"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/packer",
- "Rev": "350a5f8cad6a0e4c2b24c3049a84c4f294416e16"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "242be0c275dedfba00a616563e6db75ab8f279ec"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp",
- "Rev": "650a91d1da6dc3fefa8f052289ffce648924a304"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "1e0c2b0eb33ca7b5632a130d6d34376a1ea46c84"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Rev": "9ad4137a6b3e786b9c1e161b8d354b44482ab6d7"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "7c7f2020c4c9491594b85767967f4619c2fa75f9"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack",
- "Rev": "f73f6ff1b843dbdac0a01da7b7f39883adfe2bdb"
- }
- ]
-}
diff --git a/deps/v0-6-0.json b/deps/v0-6-0.json
deleted file mode 100644
index 80e1349bb9..0000000000
--- a/deps/v0-6-0.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "code.google.com/p/go-uuid/uuid",
- "Comment": "null-15",
- "Rev": "35bc42037350f0078e3c974c6ea690f1926603ab"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/go-pkcs12",
- "Rev": "a635c0684cd517745ca5c9552a312627791d5ba0"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws/credentials",
- "Comment": "v0.6.4-13-gb102478",
- "Rev": "b1024787e030774e84f3aa6995f2c3891283b4a0"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "594d483b9b6a8ddc7cd2f1e3e7d1de92fa2de665"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "bacc91d0d732390df132783988dc17c611881047"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-70-g1b40363",
- "Rev": "1b403631cd2d44764a68a9549874213cf95b285e"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-70-g1b40363",
- "Rev": "1b403631cd2d44764a68a9549874213cf95b285e"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-125-g9cb5526",
- "Rev": "9cb55266e7df62f2c3fd393503331140a05bfeb6"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "56912fb08d85084aa318edcf2bba735b97cf35c5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "999359b6b7a041ce16e695d51e92145b83f01087"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "54864211433d45cb780682431585b3e573b49e4a"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "b2e55852ddaf823a85c67f798080eb7d08acd71d"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "132339029dfa67fd39ff8edeed2af78f2cca4fbb"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "132339029dfa67fd39ff8edeed2af78f2cca4fbb"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "2caf8efc93669b6c43e0441cdc6aed17546c96f3"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.0-89-g3239d15",
- "Rev": "3239d157c16ad1612d652940b2da2981614c97e4"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "743b1afe5ee3f6d5ba71a0d50673fa0ba2123d6b"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "2a807d118c9e52e94819f414a6ec0293b45cad01"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-618-gf956c6c",
- "Rev": "f956c6c6c0c55844eff4b153b5071ef6e3ab4ab4"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "afe1e2ddf0f05b7c29d388a3f8e76cb15c2231ca"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-30-g4d162c3",
- "Rev": "4d162c3e1955cd12235a8f0abaa95fe0bbf08c63"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "cc04154d65fb9296747569b107cfd05380b1ea3e"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "d9558e5c97f85372afee28cf2b6059d7d3818919"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v0.beta",
- "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "15c0736a396d4a63e96b29802364d721ed0a33d5"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "15c0736a396d4a63e96b29802364d721ed0a33d5"
- }
- ]
-}
diff --git a/deps/v0-6-1.json b/deps/v0-6-1.json
deleted file mode 100644
index 69bbd10dc1..0000000000
--- a/deps/v0-6-1.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "code.google.com/p/go-uuid/uuid",
- "Comment": "null-15",
- "Rev": "35bc42037350f0078e3c974c6ea690f1926603ab"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-216-g9197765",
- "Rev": "91977650587a7bc48318c0430649d7fea886f111"
- },
- {
- "ImportPath": "github.com/Azure/go-pkcs12",
- "Rev": "a635c0684cd517745ca5c9552a312627791d5ba0"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws/credentials",
- "Comment": "v0.6.7-3-g2a6648c",
- "Rev": "2a6648c479175ce005bca95780f948a196a46062"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "594d483b9b6a8ddc7cd2f1e3e7d1de92fa2de665"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "f6e9f5396e0e8f34472efe443d0cb7f9af162b88"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-71-g785958f",
- "Rev": "785958ffcd6a8857890651f3f4d9a289ddc27633"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-71-g785958f",
- "Rev": "785958ffcd6a8857890651f3f4d9a289ddc27633"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-159-gc34bcb4",
- "Rev": "c34bcb45c670af076846826ea72c436fbd0e2c35"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "56912fb08d85084aa318edcf2bba735b97cf35c5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "999359b6b7a041ce16e695d51e92145b83f01087"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "54864211433d45cb780682431585b3e573b49e4a"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "8e00b30457b1486b012f204b82ec92ae6b547de8"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "23128e7b3dc1f8091aeff7aae82cb2112ce53c75"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "23128e7b3dc1f8091aeff7aae82cb2112ce53c75"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.2-4-g2010a0c",
- "Rev": "2010a0c966175b3c0fa8d158a879c10acbba0d76"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "743b1afe5ee3f6d5ba71a0d50673fa0ba2123d6b"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "2a807d118c9e52e94819f414a6ec0293b45cad01"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-623-ge83aa01",
- "Rev": "e83aa011e019917c7bd951444d61c42431b4d21d"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "afe1e2ddf0f05b7c29d388a3f8e76cb15c2231ca"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-36-g0031956",
- "Rev": "00319560eeca5e6ffef3ba048c97c126a465854f"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "7d5b0be716b9d6d4269afdaae10032bb296d3cdf"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "f0cf018861e2b54077eced91659e255072b5f215"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "8914e5017ca260f2a3a1575b1e6868874050d95e"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "18450f4e95c7e76ce3a5dc3a8cb7178ab6d56121"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "18450f4e95c7e76ce3a5dc3a8cb7178ab6d56121"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "18450f4e95c7e76ce3a5dc3a8cb7178ab6d56121"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "18450f4e95c7e76ce3a5dc3a8cb7178ab6d56121"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "18450f4e95c7e76ce3a5dc3a8cb7178ab6d56121"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "522a8ceb4bb83c2def27baccf31d646bce11a4b2"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "522a8ceb4bb83c2def27baccf31d646bce11a4b2"
- }
- ]
-}
diff --git a/deps/v0-6-10.json b/deps/v0-6-10.json
deleted file mode 100644
index faf6af2506..0000000000
--- a/deps/v0-6-10.json
+++ /dev/null
@@ -1,653 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.5",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/cdn",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/compute",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/network",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/resources/resources",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/scheduler",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/storage",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-315-g1cb9dff",
- "Rev": "1cb9dff8c37b2918ad1ebd7b294d01100a153d27"
- },
- {
- "ImportPath": "github.com/Azure/go-autorest/autorest",
- "Comment": "v3.0.0-4-g1af7c26",
- "Rev": "1af7c26b6889336922ac036a1f85c5fc1ed61ff2"
- },
- {
- "ImportPath": "github.com/DreamItGetIT/statuscake",
- "Rev": "8cbe86575f00210a6df2c19cb2f59b00cd181de3"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-cidr/cidr",
- "Rev": "a3ebdb999b831ecb6ab8a226e31b07b2b9061c47"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1-1-g43fcd8f",
- "Rev": "43fcd8fbcf18fd5929258c044b4e3dd0643f875e"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/armon/go-radix",
- "Rev": "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restjson",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudformation",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudtrail",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codecommit",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codedeploy",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecr",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/firehose",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/redshift",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v1.0.11-1-g87b1e60",
- "Rev": "87b1e60a50b09e4812dee560b33a238f67305804"
- },
- {
- "ImportPath": "github.com/bgentry/speakeasy",
- "Rev": "36e9cfdd690967f4f690c6edcc9ffacd006014a0"
- },
- {
- "ImportPath": "github.com/coreos/etcd/client",
- "Comment": "v2.3.0-alpha.0-596-g0020c63",
- "Rev": "0020c63dec1bf3e2927b6e076ffbe86c1021f5ed"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/pathutil",
- "Comment": "v2.3.0-alpha.0-596-g0020c63",
- "Rev": "0020c63dec1bf3e2927b6e076ffbe86c1021f5ed"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/types",
- "Comment": "v2.3.0-alpha.0-596-g0020c63",
- "Rev": "0020c63dec1bf3e2927b6e076ffbe86c1021f5ed"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "81c5afa1abcf69cc18ccc24fa3716b5a455c9208"
- },
- {
- "ImportPath": "github.com/dgrijalva/jwt-go",
- "Comment": "v2.4.0-4-gafef698",
- "Rev": "afef698c326bfd906b11659432544e5aae441d44"
- },
- {
- "ImportPath": "github.com/digitalocean/godo",
- "Comment": "v0.9.0-20-gf75d769",
- "Rev": "f75d769b07edce8a73682dcf325b4404f366ab3d"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "025617847eb2cf9bd1d851bc3b22ed28e6245ce5"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "504b650c495df17b7f246b94fe2a2239a85bc73e"
- },
- {
- "ImportPath": "github.com/go-chef/chef",
- "Comment": "0.0.1-42-gea19666",
- "Rev": "ea196660dd8700ad18911681b223fe6bfc29cd69"
- },
- {
- "ImportPath": "github.com/go-ini/ini",
- "Comment": "v1.8.6",
- "Rev": "afbd495e5aaea13597b5e14fe514ddeaa4d76fc3"
- },
- {
- "ImportPath": "github.com/golang/protobuf/proto",
- "Rev": "6aaa8d47701fa6cf07e914ec01fde3d4a1fe79c3"
- },
- {
- "ImportPath": "github.com/google/go-querystring/query",
- "Rev": "2a60fc2ba6c19de80291203597d752e9ba58e4c0"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-90-g0008886",
- "Rev": "0008886ebfa3b424bed03e2a5cbe4a2568ea0ff6"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-90-g0008886",
- "Rev": "0008886ebfa3b424bed03e2a5cbe4a2568ea0ff6"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.6.3-24-ga2d014a",
- "Rev": "a2d014a2469aa3856e5e10fd1270d9db7bcb8e13"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "e4b2dc34c0f698ee04750bf2035d8b9384233e1b"
- },
- {
- "ImportPath": "github.com/hashicorp/go-cleanhttp",
- "Rev": "ce617e79981a8fff618bb643d155133a8f38db96"
- },
- {
- "ImportPath": "github.com/hashicorp/go-getter",
- "Rev": "848242c76c346ef0aeb34787753b068f5f6f92fe"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-retryablehttp",
- "Rev": "24fda80b7c713c52649e57ce20100d453f7bdb24"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "578dd9746824a54637686b51a41bad457a56bcef"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/serf/coordinate",
- "Comment": "v0.7.0-12-ge4ec8cc",
- "Rev": "e4ec8cc423bbe20d26584b96efbeb9102e16d05f"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "df949784da9ed028ee76df44652e42d37a09d7e4"
- },
- {
- "ImportPath": "github.com/hmrc/vmware-govcd",
- "Comment": "v0.0.2-37-g5cd82f0",
- "Rev": "5cd82f01aa1c97afa9b23ef6f4f42a60f3106003"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.1-3-gb1859b1",
- "Rev": "b1859b199a7171589445bdea9fa8c19362613f80"
- },
- {
- "ImportPath": "github.com/jmespath/go-jmespath",
- "Comment": "0.2.2-2-gc01cf91",
- "Rev": "c01cf91b011868172fdcd9f41838e80c9d716264"
- },
- {
- "ImportPath": "github.com/kardianos/osext",
- "Rev": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc"
- },
- {
- "ImportPath": "github.com/lib/pq",
- "Comment": "go1.0-cutoff-74-g8ad2b29",
- "Rev": "8ad2b298cadd691a77015666a5372eae5dbfac8f"
- },
- {
- "ImportPath": "github.com/lusis/go-artifactory/src/artifactory.v401",
- "Rev": "7e4ce345df825841661d1b3ffbb1327083d4a22f"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "54ea5d01478cfc2afccec1504bd0dfcd8c260cfa"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "54ea5d01478cfc2afccec1504bd0dfcd8c260cfa"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mattn/go-isatty",
- "Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "cb6853d606ea4a12a15ac83cc43503df99fd28fb"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "d682a8f0cf139663a984ff12528da460ca963de9"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-390-gc1ac120",
- "Rev": "c1ac120828388b1fd01ce285959d13d34fdd54f0"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "a1e50bc201f387747a45ffff020f1af2d8759e88"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "6e6954073784f7ee67b28f2d22749d6479151ed7"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nesv/go-dynect/dynect",
- "Comment": "v0.2.0-8-g841842b",
- "Rev": "841842b16b39cf2b5007278956976d7d909bd98b"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "f03d7dc788a8b57b62d301ccb98c950c325756f8"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "dee7705ef7b324f27ceb85a121c61f2c2e8ce988"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "765ac1828a78ba49e6dc48309d56415c61806ac3"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "78996265f576c7580ff75d0cb2c606a61883ceb8"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "b88605989c4141d22a6d874f78800399e5bb7ac2"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-774-g680aa02",
- "Rev": "680aa02616313d8399abc91f17a444cf9292f0e1"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "d41af8bb6a7704f00bc3b7cba9355ae6a5a80048"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/sthulb/mime/multipart",
- "Rev": "698462dc9685d7743511c26da726c1b0c1cfb111"
- },
- {
- "ImportPath": "github.com/tent/http-link-go",
- "Rev": "ac974c61c2f990f4115b119354b5e0b47550e888"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "646ae4a518c1c3be0739df898118d9bccf993858"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.3.0-11-g20c009c",
- "Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-55-gfa516de",
- "Rev": "fa516de9c8f07a186331b78823c2bb717461953f"
- },
- {
- "ImportPath": "github.com/xanzy/ssh-agent",
- "Rev": "ba9c9e33906f58169366275e3450db66139a31a9"
- },
- {
- "ImportPath": "github.com/ziutek/mymysql/mysql",
- "Comment": "v1.5.4-13-g75ce5fb",
- "Rev": "75ce5fbba34b1912a3641adbd58cf317d7315821"
- },
- {
- "ImportPath": "github.com/ziutek/mymysql/native",
- "Comment": "v1.5.4-13-g75ce5fb",
- "Rev": "75ce5fbba34b1912a3641adbd58cf317d7315821"
- },
- {
- "ImportPath": "github.com/ziutek/mymysql/thrsafe",
- "Comment": "v1.5.4-13-g75ce5fb",
- "Rev": "75ce5fbba34b1912a3641adbd58cf317d7315821"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "1f22c0103821b9390939b6776727195525381532"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "1f22c0103821b9390939b6776727195525381532"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "1f22c0103821b9390939b6776727195525381532"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "04b9de9b512f58addf28c9853d50ebef61c3953e"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "8a57ed94ffd43444c0879fe75701732a38afc985"
- },
- {
- "ImportPath": "golang.org/x/sys/unix",
- "Rev": "eb2c74142fd19a79b3f237334c7384d5167b1b46"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/gensupport",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/pubsub/v1",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/sqladmin/v1beta4",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "0caa37974a5f5ae67172acf68b4970f7864f994c"
- },
- {
- "ImportPath": "google.golang.org/appengine",
- "Rev": "6bde959377a90acb53366051d7d587bfd7171354"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "fb10e8da373d97f6ba5e648299a10b3b91f14cd5"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "fb10e8da373d97f6ba5e648299a10b3b91f14cd5"
- }
- ]
-}
diff --git a/deps/v0-6-2.json b/deps/v0-6-2.json
deleted file mode 100644
index eecf6f35b5..0000000000
--- a/deps/v0-6-2.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "code.google.com/p/go-uuid/uuid",
- "Comment": "null-15",
- "Rev": "35bc42037350f0078e3c974c6ea690f1926603ab"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/go-pkcs12",
- "Rev": "a635c0684cd517745ca5c9552a312627791d5ba0"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws/credentials",
- "Comment": "v0.7.2-4-g5df83ba",
- "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "594d483b9b6a8ddc7cd2f1e3e7d1de92fa2de665"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "3ef29fee64703523b191df64d96a28204c86460c"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-73-gd1d08e8",
- "Rev": "d1d08e8e25f0659388ede7bb8157aaa4895f5347"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-73-gd1d08e8",
- "Rev": "d1d08e8e25f0659388ede7bb8157aaa4895f5347"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-200-g066e772",
- "Rev": "066e77253696dd2c2a320ed84408ba5713f82811"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "56912fb08d85084aa318edcf2bba735b97cf35c5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "999359b6b7a041ce16e695d51e92145b83f01087"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "54864211433d45cb780682431585b3e573b49e4a"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "8e00b30457b1486b012f204b82ec92ae6b547de8"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "23128e7b3dc1f8091aeff7aae82cb2112ce53c75"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "23128e7b3dc1f8091aeff7aae82cb2112ce53c75"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.2-102-ga4e8a92",
- "Rev": "a4e8a92a13bce92db7598323b55625f4ea25f413"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "743b1afe5ee3f6d5ba71a0d50673fa0ba2123d6b"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "2a807d118c9e52e94819f414a6ec0293b45cad01"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-647-gefb1971",
- "Rev": "efb1971cbd1d39f6fc762a86cccccfad387019e6"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "6b8e5b55d20d01ad47ecfe98e5171688397c61e9"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-36-g0031956",
- "Rev": "00319560eeca5e6ffef3ba048c97c126a465854f"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "2f3083f6163ef51179ad42ed523a18c9a1141467"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "1bc0720082d79ce7ffc6ef6e523d00d46b0dee45"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "8914e5017ca260f2a3a1575b1e6868874050d95e"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "e34a32f9b0ecbc0784865fb2d47f3818c09521d4"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "e34a32f9b0ecbc0784865fb2d47f3818c09521d4"
- }
- ]
-}
diff --git a/deps/v0-6-3.json b/deps/v0-6-3.json
deleted file mode 100644
index 4a886319de..0000000000
--- a/deps/v0-6-3.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "code.google.com/p/go-uuid/uuid",
- "Comment": "null-15",
- "Rev": "35bc42037350f0078e3c974c6ea690f1926603ab"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-222-g99b5c36",
- "Rev": "99b5c364c7be7088d138aef0afce0b5a70855b03"
- },
- {
- "ImportPath": "github.com/Azure/go-pkcs12",
- "Rev": "a635c0684cd517745ca5c9552a312627791d5ba0"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws/credentials/ec2rolecreds",
- "Comment": "v0.7.3-11-gccb4ffd",
- "Rev": "ccb4ffd37cbd0ea218deb2e3edefb69ff2c001e2"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "594d483b9b6a8ddc7cd2f1e3e7d1de92fa2de665"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "5c1d07d4afa5f11e38225906fb01cb46c24584e8"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-73-gd1d08e8",
- "Rev": "d1d08e8e25f0659388ede7bb8157aaa4895f5347"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-73-gd1d08e8",
- "Rev": "d1d08e8e25f0659388ede7bb8157aaa4895f5347"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-206-g00e35cd",
- "Rev": "00e35cdc416d7a3ab997dd8b930c63bd0e8b93f8"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "88326f6851319068e7b34981032128c0b1a6524d"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "56912fb08d85084aa318edcf2bba735b97cf35c5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "999359b6b7a041ce16e695d51e92145b83f01087"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "54864211433d45cb780682431585b3e573b49e4a"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "8e00b30457b1486b012f204b82ec92ae6b547de8"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "23128e7b3dc1f8091aeff7aae82cb2112ce53c75"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "23128e7b3dc1f8091aeff7aae82cb2112ce53c75"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.5",
- "Rev": "60bbe850ef0b7fec19eba1929d83e7267ca1572b"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "45cbfd3bae250c7676c077fb275be1a2968e066a"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "743b1afe5ee3f6d5ba71a0d50673fa0ba2123d6b"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "2a807d118c9e52e94819f414a6ec0293b45cad01"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-647-gefb1971",
- "Rev": "efb1971cbd1d39f6fc762a86cccccfad387019e6"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "6b8e5b55d20d01ad47ecfe98e5171688397c61e9"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-36-g0031956",
- "Rev": "00319560eeca5e6ffef3ba048c97c126a465854f"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "83f1503f771a82af8a31f358eb825e9efb5dae6c"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "4a71d182556e05375344f3da665304f3d5784ab4"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "8914e5017ca260f2a3a1575b1e6868874050d95e"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "0a735f7ec81c85ce7ec31bf7a67e125ef62266ec"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "e34a32f9b0ecbc0784865fb2d47f3818c09521d4"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "e34a32f9b0ecbc0784865fb2d47f3818c09521d4"
- }
- ]
-}
diff --git a/deps/v0-6-4.json b/deps/v0-6-4.json
deleted file mode 100644
index e0d17b58fc..0000000000
--- a/deps/v0-6-4.json
+++ /dev/null
@@ -1,440 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1",
- "Rev": "cddcfbabbe903e9c8df35ff9569dbb8d67789200"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws",
- "Comment": "v0.9.14-3-g308eaa6",
- "Rev": "308eaa65c0ddf03c701d511b7d73b3f3620452a1"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "8344c6a3e281a99a693f5b71186249a8620eeb6b"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "09604abc82243886001c3f56fd709d4ba603cead"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-77-g85a782d",
- "Rev": "85a782d724b87fcd19db1c4aef9d5337a9bb7a0f"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-77-g85a782d",
- "Rev": "85a782d724b87fcd19db1c4aef9d5337a9bb7a0f"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-325-g5d9530d",
- "Rev": "5d9530d7def3be989ba141382f1b9d82583418f4"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "528ab62f37fa83d4360e8ab2b2c425d6692ef533"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "2b9865f60ce11e527bd1255ba82036d465570aa3"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "4de51957ef8d4aba6e285ddfc587633bbfc7c0e8"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "ddcd0a6ec7c55e29f235e27935bf98d302281bd3"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "b280be362a0c6af26fbaaa055924fb9c4830b006"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "b280be362a0c6af26fbaaa055924fb9c4830b006"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "df55a15e5ce646808815381b3db47a8c66ea62f4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "0dd3f918b21bec95ace9dc86c7e70266cfc5c702"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-76-g88386bc",
- "Rev": "88386bc9db1c850306e5c3737f14bef3a2c4050d"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "1655d88c8ff7495ae9d2c19fd8f445f4657e22b0"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "743b1afe5ee3f6d5ba71a0d50673fa0ba2123d6b"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "496f5c8895c06505fae527830a9e554dc65325f4"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "cccd189d45f7ac3368a0d127efb7f4d08ae0b655"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "19e280b056f3742e535ea12ae92a37ea7767ea82"
- },
- {
- "ImportPath": "github.com/pearkes/digitalocean",
- "Rev": "e966f00c2d9de5743e87697ab77c7278f5998914"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "2a807d118c9e52e94819f414a6ec0293b45cad01"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-681-g8d032cb",
- "Rev": "8d032cb1e835a0018269de3d6b53bb24fc77a8c0"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "08f0718b61e95ddba0ade3346725fe0e4bf28ca6"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.2.0-28-g6037863",
- "Rev": "603786323c18c13dd8b3da3d4f86b1dce4adf126"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-48-g0e6e56f",
- "Rev": "0e6e56fc0db3f48f060273f2e2ffe5d8d41b0112"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "21c3935a8fc0f954d03e6b8a560c9600ffee38d2"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "ef4eca6b097fad7cec79afcc278d213a6de1c960"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "e2903ca9e33d6cbaedda541d96996219056e8214"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "e2903ca9e33d6cbaedda541d96996219056e8214"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "e2903ca9e33d6cbaedda541d96996219056e8214"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "e2903ca9e33d6cbaedda541d96996219056e8214"
- },
- {
- "ImportPath": "google.golang.org/api/internal",
- "Rev": "e2903ca9e33d6cbaedda541d96996219056e8214"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "e2903ca9e33d6cbaedda541d96996219056e8214"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "4bea1598a0936d6d116506b59a8e1aa962b585c3"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "4bea1598a0936d6d116506b59a8e1aa962b585c3"
- }
- ]
-}
diff --git a/deps/v0-6-5.json b/deps/v0-6-5.json
deleted file mode 100644
index 71ace61754..0000000000
--- a/deps/v0-6-5.json
+++ /dev/null
@@ -1,476 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1",
- "Rev": "cddcfbabbe903e9c8df35ff9569dbb8d67789200"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws",
- "Comment": "v0.9.15",
- "Rev": "7ab6754ddaaa7972ac1c896ddd7f796cc726e79d"
- },
- {
- "ImportPath": "github.com/coreos/etcd/client",
- "Comment": "v2.2.0-246-g8d3ed01",
- "Rev": "8d3ed0176c41a5585e040368455fe803fa95511b"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/pathutil",
- "Comment": "v2.2.0-246-g8d3ed01",
- "Rev": "8d3ed0176c41a5585e040368455fe803fa95511b"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/types",
- "Comment": "v2.2.0-246-g8d3ed01",
- "Rev": "8d3ed0176c41a5585e040368455fe803fa95511b"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "8344c6a3e281a99a693f5b71186249a8620eeb6b"
- },
- {
- "ImportPath": "github.com/digitalocean/godo",
- "Comment": "v0.9.0-2-gc03bb09",
- "Rev": "c03bb099b8dc38e87581902a56885013a0865703"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "412c004d923b7b89701e7a1632de83f843657a03"
- },
- {
- "ImportPath": "github.com/google/go-querystring/query",
- "Rev": "547ef5ac979778feb2f760cdb5f4eae1a2207b86"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-79-gabffe75",
- "Rev": "abffe75c7dff7f6c3344727348a95fe70c519696"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-79-gabffe75",
- "Rev": "abffe75c7dff7f6c3344727348a95fe70c519696"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-461-g158eabd",
- "Rev": "158eabdd6f2408067c1d7656fa10e49434f96480"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "ee53b27929ebf0a6d217c96d2107c6c09b8bebb3"
- },
- {
- "ImportPath": "github.com/hashicorp/go-getter",
- "Rev": "2463fe5ef95a59a4096482fb9390b5683a5c380a"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "2b9865f60ce11e527bd1255ba82036d465570aa3"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "4de51957ef8d4aba6e285ddfc587633bbfc7c0e8"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "ddcd0a6ec7c55e29f235e27935bf98d302281bd3"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/kardianos/osext",
- "Rev": "6e7f843663477789fac7c02def0d0909e969b4e5"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "e3e57d617b7d9573db6c98567a261916ff53cfb3"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "e3e57d617b7d9573db6c98567a261916ff53cfb3"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "df55a15e5ce646808815381b3db47a8c66ea62f4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "5e2d6d41470f99c881826dedd8c526728b783c9c"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-114-gd66268f",
- "Rev": "d66268f5f92dc3f785616f9d10f233ece8636e9c"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "1655d88c8ff7495ae9d2c19fd8f445f4657e22b0"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "f03d7dc788a8b57b62d301ccb98c950c325756f8"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "cccd189d45f7ac3368a0d127efb7f4d08ae0b655"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "922f1c75017c54430fb706364d29eff10f64c56d"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "59fa6243d3d5ac56ab0df76be4c6da30821154b0"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "5b02e7e9ffee9869f81393e80db138f6ff726260"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-683-gdc139e8",
- "Rev": "dc139e8a4612310304c1c71aa2b07d94ab7bdeaf"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "08f0718b61e95ddba0ade3346725fe0e4bf28ca6"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/tent/http-link-go",
- "Rev": "ac974c61c2f990f4115b119354b5e0b47550e888"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "8a2a3a8c488c3ebd98f422a965260278267a0551"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.2.0-32-gc33a28e",
- "Rev": "c33a28ed780856865047dda04412c67f2d55de8e"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-48-g0e6e56f",
- "Rev": "0e6e56fc0db3f48f060273f2e2ffe5d8d41b0112"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "9946ad7d5eae91d8edca4f54d1a1e130a052e823"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "ef4eca6b097fad7cec79afcc278d213a6de1c960"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/internal",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "2400193c85c3561d13880d34e0e10c4315bb02af"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "2400193c85c3561d13880d34e0e10c4315bb02af"
- }
- ]
-}
diff --git a/deps/v0-6-6.json b/deps/v0-6-6.json
deleted file mode 100644
index fcc90ead99..0000000000
--- a/deps/v0-6-6.json
+++ /dev/null
@@ -1,489 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.4.2",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-261-g3dcabb6",
- "Rev": "3dcabb61c225af4013db7af20d4fe430fd09e311"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-cidr/cidr",
- "Rev": "a3ebdb999b831ecb6ab8a226e31b07b2b9061c47"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1",
- "Rev": "cddcfbabbe903e9c8df35ff9569dbb8d67789200"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/json/jsonutil",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/jsonrpc",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restjson",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codedeploy",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/awslabs/aws-sdk-go/aws",
- "Comment": "v0.9.16-1-g66c840e",
- "Rev": "66c840e9981dd121a4239fc25e33b6c1c1caa781"
- },
- {
- "ImportPath": "github.com/coreos/etcd/client",
- "Comment": "v2.2.0-261-gae62a77",
- "Rev": "ae62a77de61d70f434ed848ba48b44247cb54c94"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/pathutil",
- "Comment": "v2.2.0-261-gae62a77",
- "Rev": "ae62a77de61d70f434ed848ba48b44247cb54c94"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/types",
- "Comment": "v2.2.0-261-gae62a77",
- "Rev": "ae62a77de61d70f434ed848ba48b44247cb54c94"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "8344c6a3e281a99a693f5b71186249a8620eeb6b"
- },
- {
- "ImportPath": "github.com/digitalocean/godo",
- "Comment": "v0.9.0-2-gc03bb09",
- "Rev": "c03bb099b8dc38e87581902a56885013a0865703"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "44f75219dec4d25d3ac5483d38d3ada7eaf047ab"
- },
- {
- "ImportPath": "github.com/google/go-querystring/query",
- "Rev": "547ef5ac979778feb2f760cdb5f4eae1a2207b86"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-81-g6c9afe8",
- "Rev": "6c9afe8bb88099b424db07dea18f434371de8199"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-81-g6c9afe8",
- "Rev": "6c9afe8bb88099b424db07dea18f434371de8199"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.5.2-469-g6a350d5",
- "Rev": "6a350d5d19a41f94e0c99a933410e8545c4e7a51"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "e4b2dc34c0f698ee04750bf2035d8b9384233e1b"
- },
- {
- "ImportPath": "github.com/hashicorp/go-cleanhttp",
- "Rev": "5df5ddc69534f1a4697289f1dca2193fbb40213f"
- },
- {
- "ImportPath": "github.com/hashicorp/go-getter",
- "Rev": "2463fe5ef95a59a4096482fb9390b5683a5c380a"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "2b9865f60ce11e527bd1255ba82036d465570aa3"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "4de51957ef8d4aba6e285ddfc587633bbfc7c0e8"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "ddcd0a6ec7c55e29f235e27935bf98d302281bd3"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-5-g61a5285",
- "Rev": "61a52852277811e93e06d28e0d0c396284a7730b"
- },
- {
- "ImportPath": "github.com/kardianos/osext",
- "Rev": "6e7f843663477789fac7c02def0d0909e969b4e5"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "e3e57d617b7d9573db6c98567a261916ff53cfb3"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "e3e57d617b7d9573db6c98567a261916ff53cfb3"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "df55a15e5ce646808815381b3db47a8c66ea62f4"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/osext",
- "Rev": "5e2d6d41470f99c881826dedd8c526728b783c9c"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-128-g8e63ce1",
- "Rev": "8e63ce13028ed6a3204d7ed210c4790ea11d7db9"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "1655d88c8ff7495ae9d2c19fd8f445f4657e22b0"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "f03d7dc788a8b57b62d301ccb98c950c325756f8"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "cccd189d45f7ac3368a0d127efb7f4d08ae0b655"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "3d4cd12a4c3a7fc29b338b774f7f8b7e3d5afc2e"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "78996265f576c7580ff75d0cb2c606a61883ceb8"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "b88605989c4141d22a6d874f78800399e5bb7ac2"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-685-g63ee53d",
- "Rev": "63ee53d682169b50b8dfaca88722ba19bd5b17a6"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "08f0718b61e95ddba0ade3346725fe0e4bf28ca6"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/tent/http-link-go",
- "Rev": "ac974c61c2f990f4115b119354b5e0b47550e888"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "8a2a3a8c488c3ebd98f422a965260278267a0551"
- },
- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.2.0-36-g6be2410",
- "Rev": "6be2410334b7be4f6f8962206e49042207f99673"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-48-g0e6e56f",
- "Rev": "0e6e56fc0db3f48f060273f2e2ffe5d8d41b0112"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "c8b9e6388ef638d5a8a9d865c634befdc46a6784"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "2cba614e8ff920c60240d2677bc019af32ee04e5"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "038cb4adce85ed41e285c2e7cc6221a92bfa44aa"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/internal",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "c83ee8e9b7e6c40a486c0992a963ea8b6911de67"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "2400193c85c3561d13880d34e0e10c4315bb02af"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "2400193c85c3561d13880d34e0e10c4315bb02af"
- }
- ]
-}
diff --git a/deps/v0-6-7.json b/deps/v0-6-7.json
deleted file mode 100644
index 54a8971112..0000000000
--- a/deps/v0-6-7.json
+++ /dev/null
@@ -1,525 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.5.1",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-275-g3b480ea",
- "Rev": "3b480eaaf6b4236d43a3c06cba969da6f53c8b66"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-275-g3b480ea",
- "Rev": "3b480eaaf6b4236d43a3c06cba969da6f53c8b66"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-275-g3b480ea",
- "Rev": "3b480eaaf6b4236d43a3c06cba969da6f53c8b66"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-275-g3b480ea",
- "Rev": "3b480eaaf6b4236d43a3c06cba969da6f53c8b66"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-cidr/cidr",
- "Rev": "a3ebdb999b831ecb6ab8a226e31b07b2b9061c47"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1",
- "Rev": "cddcfbabbe903e9c8df35ff9569dbb8d67789200"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restjson",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudformation",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudtrail",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codecommit",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codedeploy",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/firehose",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v1.0.0-1-g328e030",
- "Rev": "328e030f73f66922cb9c1357de794ee1bf0ca2b5"
- },
- {
- "ImportPath": "github.com/coreos/etcd/client",
- "Comment": "v2.3.0-alpha.0-90-gd435d44",
- "Rev": "d435d443bb7659a2ff400c185fe5c6eea9fc81ed"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/pathutil",
- "Comment": "v2.3.0-alpha.0-90-gd435d44",
- "Rev": "d435d443bb7659a2ff400c185fe5c6eea9fc81ed"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/types",
- "Comment": "v2.3.0-alpha.0-90-gd435d44",
- "Rev": "d435d443bb7659a2ff400c185fe5c6eea9fc81ed"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "8344c6a3e281a99a693f5b71186249a8620eeb6b"
- },
- {
- "ImportPath": "github.com/digitalocean/godo",
- "Comment": "v0.9.0-10-g4ac7bea",
- "Rev": "4ac7bea157899131b3f94085219a4c650e19f696"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "0f5764b4d2f5b8928a05db1226a508817a9a01dd"
- },
- {
- "ImportPath": "github.com/go-ini/ini",
- "Comment": "v0-54-g2e44421",
- "Rev": "2e44421e256d82ebbf3d4d4fcabe8930b905eff3"
- },
- {
- "ImportPath": "github.com/google/go-querystring/query",
- "Rev": "2a60fc2ba6c19de80291203597d752e9ba58e4c0"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-81-g6c9afe8",
- "Rev": "6c9afe8bb88099b424db07dea18f434371de8199"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-81-g6c9afe8",
- "Rev": "6c9afe8bb88099b424db07dea18f434371de8199"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.6.0-rc2-8-g4d42ff6",
- "Rev": "4d42ff66e304e3f09eaae621ea4b0792e435064a"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "e4b2dc34c0f698ee04750bf2035d8b9384233e1b"
- },
- {
- "ImportPath": "github.com/hashicorp/go-cleanhttp",
- "Rev": "5df5ddc69534f1a4697289f1dca2193fbb40213f"
- },
- {
- "ImportPath": "github.com/hashicorp/go-getter",
- "Rev": "c5e245982bdb4708f89578c8e0054d82b5197401"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "2b9865f60ce11e527bd1255ba82036d465570aa3"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "1688f22977e3b0bbdf1aaa5e2528cf10c2e93e78"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/serf/coordinate",
- "Comment": "v0.6.4-145-ga72c045",
- "Rev": "a72c0453da2ba628a013e98bf323a76be4aa1443"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "ddcd0a6ec7c55e29f235e27935bf98d302281bd3"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-8-gbb554f9",
- "Rev": "bb554f9fd6ee4cd190eef868de608ced813aeda1"
- },
- {
- "ImportPath": "github.com/jmespath/go-jmespath",
- "Comment": "0.2.2",
- "Rev": "3433f3ea46d9f8019119e7dd41274e112a2359a9"
- },
- {
- "ImportPath": "github.com/kardianos/osext",
- "Rev": "345163ffe35aa66560a4cd7dddf00f3ae21c9fda"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "06208eee5d76e4a422494e25629cefec42b9b3ac"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "06208eee5d76e4a422494e25629cefec42b9b3ac"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "d682a8f0cf139663a984ff12528da460ca963de9"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-228-g25108c8",
- "Rev": "25108c8d13912434d0f32faaf1ea13cdc537b21e"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "89dc8accc8fec9dfa9b8e1ffdd6793265253de16"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nesv/go-dynect/dynect",
- "Comment": "v0.2.0-8-g841842b",
- "Rev": "841842b16b39cf2b5007278956976d7d909bd98b"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "f03d7dc788a8b57b62d301ccb98c950c325756f8"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "cccd189d45f7ac3368a0d127efb7f4d08ae0b655"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "3d4cd12a4c3a7fc29b338b774f7f8b7e3d5afc2e"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "78996265f576c7580ff75d0cb2c606a61883ceb8"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "b88605989c4141d22a6d874f78800399e5bb7ac2"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-757-g761cff8",
- "Rev": "761cff8afb6a8e7f42c5554a90dae72f341bb481"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "d41af8bb6a7704f00bc3b7cba9355ae6a5a80048"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/tent/http-link-go",
- "Rev": "ac974c61c2f990f4115b119354b5e0b47550e888"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "ea9cd21fa0bc41ee4bdd50ac7ed8cbc7ea2ed960"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.2.0-94-gdaf6c9c",
- "Rev": "daf6c9cce2d14cdd05fc38319ad58a5e0d3f7654"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-48-g0e6e56f",
- "Rev": "0e6e56fc0db3f48f060273f2e2ffe5d8d41b0112"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "beef0f4390813b96e8e68fd78570396d0f4751fc"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "beef0f4390813b96e8e68fd78570396d0f4751fc"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "beef0f4390813b96e8e68fd78570396d0f4751fc"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "4f2fc6c1e69d41baf187332ee08fbd2b296f21ed"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "442624c9ec9243441e83b374a9e22ac549b5c51d"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/api/gensupport",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/api/sqladmin/v1beta4",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "030d584ade5f79aa2ed0ce067e8f7da50c9a10d5"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "975617b05ea8a58727e6c1a06b6161ff4185a9f2"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "975617b05ea8a58727e6c1a06b6161ff4185a9f2"
- }
- ]
-}
diff --git a/deps/v0-6-8.json b/deps/v0-6-8.json
deleted file mode 100644
index 91f7356683..0000000000
--- a/deps/v0-6-8.json
+++ /dev/null
@@ -1,529 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.5.1",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-277-g8484320",
- "Rev": "84843207ea0c77c8c8aecbe2e16ac77caa8ce9cc"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-277-g8484320",
- "Rev": "84843207ea0c77c8c8aecbe2e16ac77caa8ce9cc"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-277-g8484320",
- "Rev": "84843207ea0c77c8c8aecbe2e16ac77caa8ce9cc"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-277-g8484320",
- "Rev": "84843207ea0c77c8c8aecbe2e16ac77caa8ce9cc"
- },
- {
- "ImportPath": "github.com/DreamItGetIT/statuscake",
- "Rev": "8cbe86575f00210a6df2c19cb2f59b00cd181de3"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-cidr/cidr",
- "Rev": "a3ebdb999b831ecb6ab8a226e31b07b2b9061c47"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1",
- "Rev": "cddcfbabbe903e9c8df35ff9569dbb8d67789200"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restjson",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudformation",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudtrail",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codecommit",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codedeploy",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/firehose",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v1.0.2-4-geac6a33",
- "Rev": "eac6a331d353c78ab5815fc6a59c1ffe8e92afba"
- },
- {
- "ImportPath": "github.com/coreos/etcd/client",
- "Comment": "v2.3.0-alpha.0-125-gdd733ca",
- "Rev": "dd733ca51d5f4c60def1403739b5701a7a7751c4"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/pathutil",
- "Comment": "v2.3.0-alpha.0-125-gdd733ca",
- "Rev": "dd733ca51d5f4c60def1403739b5701a7a7751c4"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/types",
- "Comment": "v2.3.0-alpha.0-125-gdd733ca",
- "Rev": "dd733ca51d5f4c60def1403739b5701a7a7751c4"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "8344c6a3e281a99a693f5b71186249a8620eeb6b"
- },
- {
- "ImportPath": "github.com/digitalocean/godo",
- "Comment": "v0.9.0-12-gccd7d9b",
- "Rev": "ccd7d9b6bbf2361014a8334ad3c9280b88299ef9"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "3e9661c52c45dab9a8528966a23d421922fca9b9"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "dc4295a98977ab5b1983051bc169b784c4b423df"
- },
- {
- "ImportPath": "github.com/go-ini/ini",
- "Comment": "v0-56-g03e0e7d",
- "Rev": "03e0e7d51a13a91c765d8d0161246bc14a38001a"
- },
- {
- "ImportPath": "github.com/google/go-querystring/query",
- "Rev": "2a60fc2ba6c19de80291203597d752e9ba58e4c0"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-81-g6c9afe8",
- "Rev": "6c9afe8bb88099b424db07dea18f434371de8199"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-81-g6c9afe8",
- "Rev": "6c9afe8bb88099b424db07dea18f434371de8199"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.6.0-rc2-29-g6db8acc",
- "Rev": "6db8acc6585e318168e2bf3c886d49a28a75d114"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "e4b2dc34c0f698ee04750bf2035d8b9384233e1b"
- },
- {
- "ImportPath": "github.com/hashicorp/go-cleanhttp",
- "Rev": "5df5ddc69534f1a4697289f1dca2193fbb40213f"
- },
- {
- "ImportPath": "github.com/hashicorp/go-getter",
- "Rev": "c5e245982bdb4708f89578c8e0054d82b5197401"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "2b9865f60ce11e527bd1255ba82036d465570aa3"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "c40ec20b1285f01e9e75ec39f2bf2cff132891d3"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/serf/coordinate",
- "Comment": "v0.6.4-145-ga72c045",
- "Rev": "a72c0453da2ba628a013e98bf323a76be4aa1443"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "df949784da9ed028ee76df44652e42d37a09d7e4"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-8-gbb554f9",
- "Rev": "bb554f9fd6ee4cd190eef868de608ced813aeda1"
- },
- {
- "ImportPath": "github.com/jmespath/go-jmespath",
- "Comment": "0.2.2",
- "Rev": "3433f3ea46d9f8019119e7dd41274e112a2359a9"
- },
- {
- "ImportPath": "github.com/kardianos/osext",
- "Rev": "10da29423eb9a6269092eebdc2be32209612d9d2"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "06208eee5d76e4a422494e25629cefec42b9b3ac"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "06208eee5d76e4a422494e25629cefec42b9b3ac"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "8102d0ed5ea2709ade1243798785888175f6e415"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "d682a8f0cf139663a984ff12528da460ca963de9"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-230-g400d1e5",
- "Rev": "400d1e560009fac403a776532549841e40f3a4b8"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "89dc8accc8fec9dfa9b8e1ffdd6793265253de16"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "89d9b535996bf0a185f85b59578f2e245f9e1724"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nesv/go-dynect/dynect",
- "Comment": "v0.2.0-8-g841842b",
- "Rev": "841842b16b39cf2b5007278956976d7d909bd98b"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "f03d7dc788a8b57b62d301ccb98c950c325756f8"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "cccd189d45f7ac3368a0d127efb7f4d08ae0b655"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "3d4cd12a4c3a7fc29b338b774f7f8b7e3d5afc2e"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "78996265f576c7580ff75d0cb2c606a61883ceb8"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "b88605989c4141d22a6d874f78800399e5bb7ac2"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-757-g761cff8",
- "Rev": "761cff8afb6a8e7f42c5554a90dae72f341bb481"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "d41af8bb6a7704f00bc3b7cba9355ae6a5a80048"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/tent/http-link-go",
- "Rev": "ac974c61c2f990f4115b119354b5e0b47550e888"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "357a44b2b13e2711a45e30016508134101477610"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.2.0-109-g699ac63",
- "Rev": "699ac6397b74781d2d6519ad2ae408298075e205"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-50-g104168f",
- "Rev": "104168fa792713f5e04b76e2862779dc2ad85bcc"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "7b85b097bf7527677d54d3220065e966a0e3b613"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "7b85b097bf7527677d54d3220065e966a0e3b613"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "7b85b097bf7527677d54d3220065e966a0e3b613"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "195180cfebf7362bd243a52477697895128c8777"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "442624c9ec9243441e83b374a9e22ac549b5c51d"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/api/gensupport",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/api/sqladmin/v1beta4",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "ece7143efeb53ec1839b960a0849db4e57d3cfa2"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "2375e186ca77be721a7c9c7b13a659738a8511d2"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "2375e186ca77be721a7c9c7b13a659738a8511d2"
- }
- ]
-}
diff --git a/deps/v0-6-9.json b/deps/v0-6-9.json
deleted file mode 100644
index 1178b519d8..0000000000
--- a/deps/v0-6-9.json
+++ /dev/null
@@ -1,643 +0,0 @@
-{
- "ImportPath": "github.com/hashicorp/terraform",
- "GoVersion": "go1.5",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/compute",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/network",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/resources",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/scheduler",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/arm/storage",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/http",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/core/tls",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/management",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v1.2-304-g01f39a2",
- "Rev": "01f39a2ee8de1e51edeeb4975d406c3901723f86"
- },
- {
- "ImportPath": "github.com/Azure/go-autorest/autorest",
- "Comment": "v2.1.0-2-gbdba0a8",
- "Rev": "bdba0a8422e534e5b680cbd3453840a49f7736c6"
- },
- {
- "ImportPath": "github.com/DreamItGetIT/statuscake",
- "Rev": "8cbe86575f00210a6df2c19cb2f59b00cd181de3"
- },
- {
- "ImportPath": "github.com/CenturyLinkCloud/clc-sdk",
- "Rev": "74abd779894192c559ad29f0183a1716370490ad"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-cidr/cidr",
- "Rev": "a3ebdb999b831ecb6ab8a226e31b07b2b9061c47"
- },
- {
- "ImportPath": "github.com/apparentlymart/go-rundeck-api/rundeck",
- "Comment": "v0.0.1",
- "Rev": "cddcfbabbe903e9c8df35ff9569dbb8d67789200"
- },
- {
- "ImportPath": "github.com/armon/circbuf",
- "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restjson",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudformation",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudtrail",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codecommit",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/codedeploy",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecr",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ecs",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/efs",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/elb",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/firehose",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/glacier",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/iam",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/lambda",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/rds",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/route53",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sns",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/sqs",
- "Comment": "v1.0.7-18-gf5560d9",
- "Rev": "f5560d971c22b44673247c6b77de26fe22e89189"
- },
- {
- "ImportPath": "github.com/bgentry/speakeasy",
- "Rev": "36e9cfdd690967f4f690c6edcc9ffacd006014a0"
- },
- {
- "ImportPath": "github.com/coreos/etcd/client",
- "Comment": "v2.3.0-alpha.0-416-gcb3ca4f",
- "Rev": "cb3ca4f8fbc58a900e3b606c40b84d137a9b7abf"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/pathutil",
- "Comment": "v2.3.0-alpha.0-416-gcb3ca4f",
- "Rev": "cb3ca4f8fbc58a900e3b606c40b84d137a9b7abf"
- },
- {
- "ImportPath": "github.com/coreos/etcd/pkg/types",
- "Comment": "v2.3.0-alpha.0-416-gcb3ca4f",
- "Rev": "cb3ca4f8fbc58a900e3b606c40b84d137a9b7abf"
- },
- {
- "ImportPath": "github.com/cyberdelia/heroku-go/v3",
- "Rev": "8344c6a3e281a99a693f5b71186249a8620eeb6b"
- },
- {
- "ImportPath": "github.com/dgrijalva/jwt-go",
- "Comment": "v2.4.0-4-gafef698",
- "Rev": "afef698c326bfd906b11659432544e5aae441d44"
- },
- {
- "ImportPath": "github.com/digitalocean/godo",
- "Comment": "v0.9.0-16-g2688c11",
- "Rev": "2688c11a02dc3deac65645c82c3c812f95e417bf"
- },
- {
- "ImportPath": "github.com/dylanmei/iso8601",
- "Rev": "2075bf119b58e5576c6ed9f867b8f3d17f2e54d4"
- },
- {
- "ImportPath": "github.com/dylanmei/winrmtest",
- "Rev": "025617847eb2cf9bd1d851bc3b22ed28e6245ce5"
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
- "Rev": "175e1df973274f04e9b459a62cffc49808f1a649"
- },
- {
- "ImportPath": "github.com/go-chef/chef",
- "Comment": "0.0.1-42-gea19666",
- "Rev": "ea196660dd8700ad18911681b223fe6bfc29cd69"
- },
- {
- "ImportPath": "github.com/go-ini/ini",
- "Comment": "v1.8.6",
- "Rev": "afbd495e5aaea13597b5e14fe514ddeaa4d76fc3"
- },
- {
- "ImportPath": "github.com/golang/protobuf/proto",
- "Rev": "2402d76f3d41f928c7902a765dfc872356dd3aad"
- },
- {
- "ImportPath": "github.com/google/go-querystring/query",
- "Rev": "2a60fc2ba6c19de80291203597d752e9ba58e4c0"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/archive",
- "Comment": "20141209094003-84-gb66e377",
- "Rev": "b66e377f52e316206efe71abba20e276d8790d86"
- },
- {
- "ImportPath": "github.com/hashicorp/atlas-go/v1",
- "Comment": "20141209094003-84-gb66e377",
- "Rev": "b66e377f52e316206efe71abba20e276d8790d86"
- },
- {
- "ImportPath": "github.com/hashicorp/consul/api",
- "Comment": "v0.6.1-7-g81cac9a",
- "Rev": "81cac9aaa5c56aa42fe33e031dc65260ba31a373"
- },
- {
- "ImportPath": "github.com/hashicorp/errwrap",
- "Rev": "7554cd9344cec97297fa6649b055a8c98c2a1e55"
- },
- {
- "ImportPath": "github.com/hashicorp/go-checkpoint",
- "Rev": "e4b2dc34c0f698ee04750bf2035d8b9384233e1b"
- },
- {
- "ImportPath": "github.com/hashicorp/go-cleanhttp",
- "Rev": "ce617e79981a8fff618bb643d155133a8f38db96"
- },
- {
- "ImportPath": "github.com/hashicorp/go-getter",
- "Rev": "c5e245982bdb4708f89578c8e0054d82b5197401"
- },
- {
- "ImportPath": "github.com/hashicorp/go-multierror",
- "Rev": "d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5"
- },
- {
- "ImportPath": "github.com/hashicorp/go-retryablehttp",
- "Rev": "24fda80b7c713c52649e57ce20100d453f7bdb24"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "2b9865f60ce11e527bd1255ba82036d465570aa3"
- },
- {
- "ImportPath": "github.com/hashicorp/hcl",
- "Rev": "197e8d3cf42199cfd53cd775deb37f3637234635"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/hashicorp/serf/coordinate",
- "Comment": "v0.7.0-1-g39c7c06",
- "Rev": "39c7c06298b480560202bec00c2c77e974e88792"
- },
- {
- "ImportPath": "github.com/hashicorp/yamux",
- "Rev": "df949784da9ed028ee76df44652e42d37a09d7e4"
- },
- {
- "ImportPath": "github.com/hmrc/vmware-govcd",
- "Comment": "v0.0.2-29-g8d41785",
- "Rev": "8d41785649f2bd8e90f8fd34183e9f2c64322a83"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.2.0-10-gbc0f156",
- "Rev": "bc0f15622cd2a38ef83388501e4cd6747665b164"
- },
- {
- "ImportPath": "github.com/jmespath/go-jmespath",
- "Comment": "0.2.2-2-gc01cf91",
- "Rev": "c01cf91b011868172fdcd9f41838e80c9d716264"
- },
- {
- "ImportPath": "github.com/kardianos/osext",
- "Rev": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc"
- },
- {
- "ImportPath": "github.com/lib/pq",
- "Comment": "go1.0-cutoff-63-g11fc39a",
- "Rev": "11fc39a580a008f1f39bb3d11d984fb34ed778d9"
- },
- {
- "ImportPath": "github.com/lusis/go-artifactory/src/artifactory.v401",
- "Rev": "11648aea3ce529414641a1f0e4f48de844d8befe"
- },
- {
- "ImportPath": "github.com/masterzen/simplexml/dom",
- "Rev": "95ba30457eb1121fa27753627c774c7cd4e90083"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/soap",
- "Rev": "54ea5d01478cfc2afccec1504bd0dfcd8c260cfa"
- },
- {
- "ImportPath": "github.com/masterzen/winrm/winrm",
- "Rev": "54ea5d01478cfc2afccec1504bd0dfcd8c260cfa"
- },
- {
- "ImportPath": "github.com/masterzen/xmlpath",
- "Rev": "13f4951698adc0fa9c1dda3e275d489a24201161"
- },
- {
- "ImportPath": "github.com/mattn/go-isatty",
- "Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
- },
- {
- "ImportPath": "github.com/mitchellh/cli",
- "Rev": "43a4bc367e0d53f561d3d985b9dca84e15bd0554"
- },
- {
- "ImportPath": "github.com/mitchellh/colorstring",
- "Rev": "8631ce90f28644f54aeedcb3e389a85174e067d1"
- },
- {
- "ImportPath": "github.com/mitchellh/copystructure",
- "Rev": "6fc66267e9da7d155a9d3bd489e00dad02666dc6"
- },
- {
- "ImportPath": "github.com/mitchellh/go-homedir",
- "Rev": "d682a8f0cf139663a984ff12528da460ca963de9"
- },
- {
- "ImportPath": "github.com/mitchellh/go-linereader",
- "Rev": "07bab5fdd9580500aea6ada0e09df4aa28e68abd"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "281073eb9eb092240d33ef253c404f1cca550309"
- },
- {
- "ImportPath": "github.com/mitchellh/packer/common/uuid",
- "Comment": "v0.8.6-266-gd507b18",
- "Rev": "d507b18eb4cf00b7d832c8c3fc7bb46b6377b551"
- },
- {
- "ImportPath": "github.com/mitchellh/panicwrap",
- "Rev": "a1e50bc201f387747a45ffff020f1af2d8759e88"
- },
- {
- "ImportPath": "github.com/mitchellh/prefixedio",
- "Rev": "6e6954073784f7ee67b28f2d22749d6479151ed7"
- },
- {
- "ImportPath": "github.com/mitchellh/reflectwalk",
- "Rev": "eecf4c70c626c7cfbb95c90195bc34d386c74ac6"
- },
- {
- "ImportPath": "github.com/nesv/go-dynect/dynect",
- "Comment": "v0.2.0-8-g841842b",
- "Rev": "841842b16b39cf2b5007278956976d7d909bd98b"
- },
- {
- "ImportPath": "github.com/nu7hatch/gouuid",
- "Rev": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
- },
- {
- "ImportPath": "github.com/packer-community/winrmcp/winrmcp",
- "Rev": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
- },
- {
- "ImportPath": "github.com/packethost/packngo",
- "Rev": "f03d7dc788a8b57b62d301ccb98c950c325756f8"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "dee7705ef7b324f27ceb85a121c61f2c2e8ce988"
- },
- {
- "ImportPath": "github.com/pearkes/cloudflare",
- "Rev": "765ac1828a78ba49e6dc48309d56415c61806ac3"
- },
- {
- "ImportPath": "github.com/pearkes/dnsimple",
- "Rev": "78996265f576c7580ff75d0cb2c606a61883ceb8"
- },
- {
- "ImportPath": "github.com/pearkes/mailgun",
- "Rev": "b88605989c4141d22a6d874f78800399e5bb7ac2"
- },
- {
- "ImportPath": "github.com/rackspace/gophercloud",
- "Comment": "v1.0.0-772-gc70720d",
- "Rev": "c70720d7929fb03f6d2b329db5ad14d2ddefc418"
- },
- {
- "ImportPath": "github.com/satori/go.uuid",
- "Rev": "d41af8bb6a7704f00bc3b7cba9355ae6a5a80048"
- },
- {
- "ImportPath": "github.com/soniah/dnsmadeeasy",
- "Comment": "v1.1-2-g5578a8c",
- "Rev": "5578a8c15e33958c61cf7db720b6181af65f4a9e"
- },
- {
- "ImportPath": "github.com/sthulb/mime/multipart",
- "Rev": "698462dc9685d7743511c26da726c1b0c1cfb111"
- },
- {
- "ImportPath": "github.com/tent/http-link-go",
- "Rev": "ac974c61c2f990f4115b119354b5e0b47550e888"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "646ae4a518c1c3be0739df898118d9bccf993858"
- },
- {
- "ImportPath": "github.com/vmware/govmomi",
- "Comment": "v0.2.0-136-g6cecd8a",
- "Rev": "6cecd8ad370459553e779632e33f9af1e4f5a3f0"
- },
- {
- "ImportPath": "github.com/xanzy/go-cloudstack/cloudstack",
- "Comment": "v1.2.0-53-geaf4e42",
- "Rev": "eaf4e42852ca95fdd2ad70e18abad8ccb55bb611"
- },
- {
- "ImportPath": "github.com/xanzy/ssh-agent",
- "Rev": "ba9c9e33906f58169366275e3450db66139a31a9"
- },
- {
- "ImportPath": "github.com/ziutek/mymysql/mysql",
- "Comment": "v1.5.4-13-g75ce5fb",
- "Rev": "75ce5fbba34b1912a3641adbd58cf317d7315821"
- },
- {
- "ImportPath": "github.com/ziutek/mymysql/native",
- "Comment": "v1.5.4-13-g75ce5fb",
- "Rev": "75ce5fbba34b1912a3641adbd58cf317d7315821"
- },
- {
- "ImportPath": "github.com/ziutek/mymysql/thrsafe",
- "Comment": "v1.5.4-13-g75ce5fb",
- "Rev": "75ce5fbba34b1912a3641adbd58cf317d7315821"
- },
- {
- "ImportPath": "golang.org/x/crypto/curve25519",
- "Rev": "f23ba3a5ee43012fcb4b92e1a2a405a92554f4f2"
- },
- {
- "ImportPath": "golang.org/x/crypto/pkcs12",
- "Rev": "f23ba3a5ee43012fcb4b92e1a2a405a92554f4f2"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh",
- "Rev": "f23ba3a5ee43012fcb4b92e1a2a405a92554f4f2"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "f1d3149ecb40ffadf4a28d39a30f9a125fe57bdf"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "2baa8a1b9338cf13d9eeb27696d761155fa480be"
- },
- {
- "ImportPath": "golang.org/x/sys/unix",
- "Rev": "833a04a10549a95dc34458c195cbad61bbb6cb4d"
- },
- {
- "ImportPath": "google.golang.org/api/compute/v1",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/container/v1",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/dns/v1",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/gensupport",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/googleapi",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/pubsub/v1",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/sqladmin/v1beta4",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/api/storage/v1",
- "Rev": "77e7d383beb96054547729f49c372b3d01e196ff"
- },
- {
- "ImportPath": "google.golang.org/appengine",
- "Rev": "54bf9150c922186bfc45a00bf9dfcb91a5063275"
- },
- {
- "ImportPath": "google.golang.org/cloud/compute/metadata",
- "Rev": "1bff51b8fae8d33cb3dab8f7858c266ce001ee3e"
- },
- {
- "ImportPath": "google.golang.org/cloud/internal",
- "Rev": "1bff51b8fae8d33cb3dab8f7858c266ce001ee3e"
- }
- ]
-}
diff --git a/vendor/google.golang.org/cloud/LICENSE b/vendor/cloud.google.com/go/LICENSE
similarity index 100%
rename from vendor/google.golang.org/cloud/LICENSE
rename to vendor/cloud.google.com/go/LICENSE
diff --git a/vendor/google.golang.org/cloud/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go
similarity index 66%
rename from vendor/google.golang.org/cloud/compute/metadata/metadata.go
rename to vendor/cloud.google.com/go/compute/metadata/metadata.go
index 3dd684e088..f9d2bef6c2 100644
--- a/vendor/google.golang.org/cloud/compute/metadata/metadata.go
+++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go
@@ -17,7 +17,7 @@
//
// This package is a wrapper around the GCE metadata service,
// as documented at https://developers.google.com/compute/docs/metadata.
-package metadata
+package metadata // import "cloud.google.com/go/compute/metadata"
import (
"encoding/json"
@@ -27,11 +27,27 @@ import (
"net/http"
"net/url"
"os"
+ "runtime"
"strings"
"sync"
"time"
- "google.golang.org/cloud/internal"
+ "golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
+
+ "cloud.google.com/go/internal"
+)
+
+const (
+ // metadataIP is the documented metadata server IP address.
+ metadataIP = "169.254.169.254"
+
+ // metadataHostEnv is the environment variable specifying the
+ // GCE metadata hostname. If empty, the default value of
+ // metadataIP ("169.254.169.254") is used instead.
+ // This is variable name is not defined by any spec, as far as
+ // I know; it was made up for the Go package.
+ metadataHostEnv = "GCE_METADATA_HOST"
)
type cachedValue struct {
@@ -47,17 +63,29 @@ var (
instID = &cachedValue{k: "instance/id", trim: true}
)
-var metaClient = &http.Client{
- Transport: &internal.Transport{
- Base: &http.Transport{
- Dial: (&net.Dialer{
- Timeout: 750 * time.Millisecond,
- KeepAlive: 30 * time.Second,
- }).Dial,
- ResponseHeaderTimeout: 750 * time.Millisecond,
+var (
+ metaClient = &http.Client{
+ Transport: &internal.Transport{
+ Base: &http.Transport{
+ Dial: (&net.Dialer{
+ Timeout: 2 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).Dial,
+ ResponseHeaderTimeout: 2 * time.Second,
+ },
},
- },
-}
+ }
+ subscribeClient = &http.Client{
+ Transport: &internal.Transport{
+ Base: &http.Transport{
+ Dial: (&net.Dialer{
+ Timeout: 2 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).Dial,
+ },
+ },
+ }
+)
// NotDefinedError is returned when requested metadata is not defined.
//
@@ -80,31 +108,31 @@ func (suffix NotDefinedError) Error() string {
// If the requested metadata is not defined, the returned error will
// be of type NotDefinedError.
func Get(suffix string) (string, error) {
- val, _, err := getETag(suffix)
+ val, _, err := getETag(metaClient, suffix)
return val, err
}
// getETag returns a value from the metadata service as well as the associated
-// ETag. This func is otherwise equivalent to Get.
-func getETag(suffix string) (value, etag string, err error) {
+// ETag using the provided client. This func is otherwise equivalent to Get.
+func getETag(client *http.Client, suffix string) (value, etag string, err error) {
// Using a fixed IP makes it very difficult to spoof the metadata service in
// a container, which is an important use-case for local testing of cloud
// deployments. To enable spoofing of the metadata service, the environment
// variable GCE_METADATA_HOST is first inspected to decide where metadata
// requests shall go.
- host := os.Getenv("GCE_METADATA_HOST")
+ host := os.Getenv(metadataHostEnv)
if host == "" {
// Using 169.254.169.254 instead of "metadata" here because Go
// binaries built with the "netgo" tag and without cgo won't
// know the search suffix for "metadata" is
// ".google.internal", and this IP address is documented as
// being stable anyway.
- host = "169.254.169.254"
+ host = metadataIP
}
url := "http://" + host + "/computeMetadata/v1/" + suffix
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Metadata-Flavor", "Google")
- res, err := metaClient.Do(req)
+ res, err := client.Do(req)
if err != nil {
return "", "", err
}
@@ -145,33 +173,103 @@ func (c *cachedValue) get() (v string, err error) {
return
}
-var onGCE struct {
- sync.Mutex
- set bool
- v bool
-}
+var (
+ onGCEOnce sync.Once
+ onGCE bool
+)
// OnGCE reports whether this process is running on Google Compute Engine.
func OnGCE() bool {
- defer onGCE.Unlock()
- onGCE.Lock()
- if onGCE.set {
- return onGCE.v
- }
- onGCE.set = true
+ onGCEOnce.Do(initOnGCE)
+ return onGCE
+}
- // We use the DNS name of the metadata service here instead of the IP address
- // because we expect that to fail faster in the not-on-GCE case.
- res, err := metaClient.Get("http://metadata.google.internal")
- if err != nil {
+func initOnGCE() {
+ onGCE = testOnGCE()
+}
+
+func testOnGCE() bool {
+ // The user explicitly said they're on GCE, so trust them.
+ if os.Getenv(metadataHostEnv) != "" {
+ return true
+ }
+
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ resc := make(chan bool, 2)
+
+ // Try two strategies in parallel.
+ // See https://github.com/GoogleCloudPlatform/google-cloud-go/issues/194
+ go func() {
+ res, err := ctxhttp.Get(ctx, metaClient, "http://"+metadataIP)
+ if err != nil {
+ resc <- false
+ return
+ }
+ defer res.Body.Close()
+ resc <- res.Header.Get("Metadata-Flavor") == "Google"
+ }()
+
+ go func() {
+ addrs, err := net.LookupHost("metadata.google.internal")
+ if err != nil || len(addrs) == 0 {
+ resc <- false
+ return
+ }
+ resc <- strsContains(addrs, metadataIP)
+ }()
+
+ tryHarder := systemInfoSuggestsGCE()
+ if tryHarder {
+ res := <-resc
+ if res {
+ // The first strategy succeeded, so let's use it.
+ return true
+ }
+ // Wait for either the DNS or metadata server probe to
+ // contradict the other one and say we are running on
+ // GCE. Give it a lot of time to do so, since the system
+ // info already suggests we're running on a GCE BIOS.
+ timer := time.NewTimer(5 * time.Second)
+ defer timer.Stop()
+ select {
+ case res = <-resc:
+ return res
+ case <-timer.C:
+ // Too slow. Who knows what this system is.
+ return false
+ }
+ }
+
+ // There's no hint from the system info that we're running on
+ // GCE, so use the first probe's result as truth, whether it's
+ // true or false. The goal here is to optimize for speed for
+ // users who are NOT running on GCE. We can't assume that
+ // either a DNS lookup or an HTTP request to a blackholed IP
+ // address is fast. Worst case this should return when the
+ // metaClient's Transport.ResponseHeaderTimeout or
+ // Transport.Dial.Timeout fires (in two seconds).
+ return <-resc
+}
+
+// systemInfoSuggestsGCE reports whether the local system (without
+// doing network requests) suggests that we're running on GCE. If this
+// returns true, testOnGCE tries a bit harder to reach its metadata
+// server.
+func systemInfoSuggestsGCE() bool {
+ if runtime.GOOS != "linux" {
+ // We don't have any non-Linux clues available, at least yet.
return false
}
- onGCE.v = res.Header.Get("Metadata-Flavor") == "Google"
- return onGCE.v
+ slurp, _ := ioutil.ReadFile("/sys/class/dmi/id/product_name")
+ name := strings.TrimSpace(string(slurp))
+ return name == "Google" || name == "Google Compute Engine"
}
// Subscribe subscribes to a value from the metadata service.
// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
+// The suffix may contain query parameters.
//
// Subscribe calls fn with the latest metadata value indicated by the provided
// suffix. If the metadata value is deleted, fn is called with the empty string
@@ -182,7 +280,7 @@ func Subscribe(suffix string, fn func(v string, ok bool) error) error {
const failedSubscribeSleep = time.Second * 5
// First check to see if the metadata value exists at all.
- val, lastETag, err := getETag(suffix)
+ val, lastETag, err := getETag(subscribeClient, suffix)
if err != nil {
return err
}
@@ -192,9 +290,13 @@ func Subscribe(suffix string, fn func(v string, ok bool) error) error {
}
ok := true
- suffix += "?wait_for_change=true&last_etag="
+ if strings.ContainsRune(suffix, '?') {
+ suffix += "&wait_for_change=true&last_etag="
+ } else {
+ suffix += "?wait_for_change=true&last_etag="
+ }
for {
- val, etag, err := getETag(suffix + url.QueryEscape(lastETag))
+ val, etag, err := getETag(subscribeClient, suffix+url.QueryEscape(lastETag))
if err != nil {
if _, deleted := err.(NotDefinedError); !deleted {
time.Sleep(failedSubscribeSleep)
@@ -325,3 +427,12 @@ func Scopes(serviceAccount string) ([]string, error) {
}
return lines("instance/service-accounts/" + serviceAccount + "/scopes")
}
+
+func strsContains(ss []string, s string) bool {
+ for _, v := range ss {
+ if v == s {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/cloud.google.com/go/internal/cloud.go b/vendor/cloud.google.com/go/internal/cloud.go
new file mode 100644
index 0000000000..8e0c8f8e52
--- /dev/null
+++ b/vendor/cloud.google.com/go/internal/cloud.go
@@ -0,0 +1,64 @@
+// Copyright 2014 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package internal provides support for the cloud packages.
+//
+// Users should not import this package directly.
+package internal
+
+import (
+ "fmt"
+ "net/http"
+)
+
+const userAgent = "gcloud-golang/0.1"
+
+// Transport is an http.RoundTripper that appends Google Cloud client's
+// user-agent to the original request's user-agent header.
+type Transport struct {
+ // TODO(bradfitz): delete internal.Transport. It's too wrappy for what it does.
+ // Do User-Agent some other way.
+
+ // Base is the actual http.RoundTripper
+ // requests will use. It must not be nil.
+ Base http.RoundTripper
+}
+
+// RoundTrip appends a user-agent to the existing user-agent
+// header and delegates the request to the base http.RoundTripper.
+func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
+ req = cloneRequest(req)
+ ua := req.Header.Get("User-Agent")
+ if ua == "" {
+ ua = userAgent
+ } else {
+ ua = fmt.Sprintf("%s %s", ua, userAgent)
+ }
+ req.Header.Set("User-Agent", ua)
+ return t.Base.RoundTrip(req)
+}
+
+// cloneRequest returns a clone of the provided *http.Request.
+// The clone is a shallow copy of the struct and its Header map.
+func cloneRequest(r *http.Request) *http.Request {
+ // shallow copy of the struct
+ r2 := new(http.Request)
+ *r2 = *r
+ // deep copy of the Header
+ r2.Header = make(http.Header)
+ for k, s := range r.Header {
+ r2.Header[k] = s
+ }
+ return r2
+}
diff --git a/vendor/cloud.google.com/go/internal/retry.go b/vendor/cloud.google.com/go/internal/retry.go
new file mode 100644
index 0000000000..79995be4cc
--- /dev/null
+++ b/vendor/cloud.google.com/go/internal/retry.go
@@ -0,0 +1,55 @@
+// Copyright 2016 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "fmt"
+ "time"
+
+ gax "github.com/googleapis/gax-go"
+
+ "golang.org/x/net/context"
+)
+
+// Retry calls the supplied function f repeatedly according to the provided
+// backoff parameters. It returns when one of the following occurs:
+// When f's first return value is true, Retry immediately returns with f's second
+// return value.
+// When the provided context is done, Retry returns with ctx.Err().
+func Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error {
+ return retry(ctx, bo, f, gax.Sleep)
+}
+
+func retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error),
+ sleep func(context.Context, time.Duration) error) error {
+ var lastErr error
+ for {
+ stop, err := f()
+ if stop {
+ return err
+ }
+ // Remember the last "real" error from f.
+ if err != nil && err != context.Canceled && err != context.DeadlineExceeded {
+ lastErr = err
+ }
+ p := bo.Pause()
+ if cerr := sleep(ctx, p); cerr != nil {
+ if lastErr != nil {
+ return fmt.Errorf("%v; last function err: %v", cerr, lastErr)
+ }
+ return cerr
+ }
+ }
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/LICENSE b/vendor/github.com/Azure/go-ansiterm/LICENSE
new file mode 100644
index 0000000000..e3d9a64d1d
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Microsoft Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/github.com/Azure/go-ansiterm/README.md b/vendor/github.com/Azure/go-ansiterm/README.md
new file mode 100644
index 0000000000..261c041e7a
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/README.md
@@ -0,0 +1,12 @@
+# go-ansiterm
+
+This is a cross platform Ansi Terminal Emulation library. It reads a stream of Ansi characters and produces the appropriate function calls. The results of the function calls are platform dependent.
+
+For example the parser might receive "ESC, [, A" as a stream of three characters. This is the code for Cursor Up (http://www.vt100.net/docs/vt510-rm/CUU). The parser then calls the cursor up function (CUU()) on an event handler. The event handler determines what platform specific work must be done to cause the cursor to move up one position.
+
+The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png). There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go).
+
+See parser_test.go for examples exercising the state machine and generating appropriate function calls.
+
+-----
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
diff --git a/vendor/github.com/Azure/go-ansiterm/constants.go b/vendor/github.com/Azure/go-ansiterm/constants.go
new file mode 100644
index 0000000000..96504a33bc
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/constants.go
@@ -0,0 +1,188 @@
+package ansiterm
+
+const LogEnv = "DEBUG_TERMINAL"
+
+// ANSI constants
+// References:
+// -- http://www.ecma-international.org/publications/standards/Ecma-048.htm
+// -- http://man7.org/linux/man-pages/man4/console_codes.4.html
+// -- http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html
+// -- http://en.wikipedia.org/wiki/ANSI_escape_code
+// -- http://vt100.net/emu/dec_ansi_parser
+// -- http://vt100.net/emu/vt500_parser.svg
+// -- http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+// -- http://www.inwap.com/pdp10/ansicode.txt
+const (
+ // ECMA-48 Set Graphics Rendition
+ // Note:
+ // -- Constants leading with an underscore (e.g., _ANSI_xxx) are unsupported or reserved
+ // -- Fonts could possibly be supported via SetCurrentConsoleFontEx
+ // -- Windows does not expose the per-window cursor (i.e., caret) blink times
+ ANSI_SGR_RESET = 0
+ ANSI_SGR_BOLD = 1
+ ANSI_SGR_DIM = 2
+ _ANSI_SGR_ITALIC = 3
+ ANSI_SGR_UNDERLINE = 4
+ _ANSI_SGR_BLINKSLOW = 5
+ _ANSI_SGR_BLINKFAST = 6
+ ANSI_SGR_REVERSE = 7
+ _ANSI_SGR_INVISIBLE = 8
+ _ANSI_SGR_LINETHROUGH = 9
+ _ANSI_SGR_FONT_00 = 10
+ _ANSI_SGR_FONT_01 = 11
+ _ANSI_SGR_FONT_02 = 12
+ _ANSI_SGR_FONT_03 = 13
+ _ANSI_SGR_FONT_04 = 14
+ _ANSI_SGR_FONT_05 = 15
+ _ANSI_SGR_FONT_06 = 16
+ _ANSI_SGR_FONT_07 = 17
+ _ANSI_SGR_FONT_08 = 18
+ _ANSI_SGR_FONT_09 = 19
+ _ANSI_SGR_FONT_10 = 20
+ _ANSI_SGR_DOUBLEUNDERLINE = 21
+ ANSI_SGR_BOLD_DIM_OFF = 22
+ _ANSI_SGR_ITALIC_OFF = 23
+ ANSI_SGR_UNDERLINE_OFF = 24
+ _ANSI_SGR_BLINK_OFF = 25
+ _ANSI_SGR_RESERVED_00 = 26
+ ANSI_SGR_REVERSE_OFF = 27
+ _ANSI_SGR_INVISIBLE_OFF = 28
+ _ANSI_SGR_LINETHROUGH_OFF = 29
+ ANSI_SGR_FOREGROUND_BLACK = 30
+ ANSI_SGR_FOREGROUND_RED = 31
+ ANSI_SGR_FOREGROUND_GREEN = 32
+ ANSI_SGR_FOREGROUND_YELLOW = 33
+ ANSI_SGR_FOREGROUND_BLUE = 34
+ ANSI_SGR_FOREGROUND_MAGENTA = 35
+ ANSI_SGR_FOREGROUND_CYAN = 36
+ ANSI_SGR_FOREGROUND_WHITE = 37
+ _ANSI_SGR_RESERVED_01 = 38
+ ANSI_SGR_FOREGROUND_DEFAULT = 39
+ ANSI_SGR_BACKGROUND_BLACK = 40
+ ANSI_SGR_BACKGROUND_RED = 41
+ ANSI_SGR_BACKGROUND_GREEN = 42
+ ANSI_SGR_BACKGROUND_YELLOW = 43
+ ANSI_SGR_BACKGROUND_BLUE = 44
+ ANSI_SGR_BACKGROUND_MAGENTA = 45
+ ANSI_SGR_BACKGROUND_CYAN = 46
+ ANSI_SGR_BACKGROUND_WHITE = 47
+ _ANSI_SGR_RESERVED_02 = 48
+ ANSI_SGR_BACKGROUND_DEFAULT = 49
+ // 50 - 65: Unsupported
+
+ ANSI_MAX_CMD_LENGTH = 4096
+
+ MAX_INPUT_EVENTS = 128
+ DEFAULT_WIDTH = 80
+ DEFAULT_HEIGHT = 24
+
+ ANSI_BEL = 0x07
+ ANSI_BACKSPACE = 0x08
+ ANSI_TAB = 0x09
+ ANSI_LINE_FEED = 0x0A
+ ANSI_VERTICAL_TAB = 0x0B
+ ANSI_FORM_FEED = 0x0C
+ ANSI_CARRIAGE_RETURN = 0x0D
+ ANSI_ESCAPE_PRIMARY = 0x1B
+ ANSI_ESCAPE_SECONDARY = 0x5B
+ ANSI_OSC_STRING_ENTRY = 0x5D
+ ANSI_COMMAND_FIRST = 0x40
+ ANSI_COMMAND_LAST = 0x7E
+ DCS_ENTRY = 0x90
+ CSI_ENTRY = 0x9B
+ OSC_STRING = 0x9D
+ ANSI_PARAMETER_SEP = ";"
+ ANSI_CMD_G0 = '('
+ ANSI_CMD_G1 = ')'
+ ANSI_CMD_G2 = '*'
+ ANSI_CMD_G3 = '+'
+ ANSI_CMD_DECPNM = '>'
+ ANSI_CMD_DECPAM = '='
+ ANSI_CMD_OSC = ']'
+ ANSI_CMD_STR_TERM = '\\'
+
+ KEY_CONTROL_PARAM_2 = ";2"
+ KEY_CONTROL_PARAM_3 = ";3"
+ KEY_CONTROL_PARAM_4 = ";4"
+ KEY_CONTROL_PARAM_5 = ";5"
+ KEY_CONTROL_PARAM_6 = ";6"
+ KEY_CONTROL_PARAM_7 = ";7"
+ KEY_CONTROL_PARAM_8 = ";8"
+ KEY_ESC_CSI = "\x1B["
+ KEY_ESC_N = "\x1BN"
+ KEY_ESC_O = "\x1BO"
+
+ FILL_CHARACTER = ' '
+)
+
+func getByteRange(start byte, end byte) []byte {
+ bytes := make([]byte, 0, 32)
+ for i := start; i <= end; i++ {
+ bytes = append(bytes, byte(i))
+ }
+
+ return bytes
+}
+
+var toGroundBytes = getToGroundBytes()
+var executors = getExecuteBytes()
+
+// SPACE 20+A0 hex Always and everywhere a blank space
+// Intermediate 20-2F hex !"#$%&'()*+,-./
+var intermeds = getByteRange(0x20, 0x2F)
+
+// Parameters 30-3F hex 0123456789:;<=>?
+// CSI Parameters 30-39, 3B hex 0123456789;
+var csiParams = getByteRange(0x30, 0x3F)
+
+var csiCollectables = append(getByteRange(0x30, 0x39), getByteRange(0x3B, 0x3F)...)
+
+// Uppercase 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
+var upperCase = getByteRange(0x40, 0x5F)
+
+// Lowercase 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~
+var lowerCase = getByteRange(0x60, 0x7E)
+
+// Alphabetics 40-7E hex (all of upper and lower case)
+var alphabetics = append(upperCase, lowerCase...)
+
+var printables = getByteRange(0x20, 0x7F)
+
+var escapeIntermediateToGroundBytes = getByteRange(0x30, 0x7E)
+var escapeToGroundBytes = getEscapeToGroundBytes()
+
+// See http://www.vt100.net/emu/vt500_parser.png for description of the complex
+// byte ranges below
+
+func getEscapeToGroundBytes() []byte {
+ escapeToGroundBytes := getByteRange(0x30, 0x4F)
+ escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x51, 0x57)...)
+ escapeToGroundBytes = append(escapeToGroundBytes, 0x59)
+ escapeToGroundBytes = append(escapeToGroundBytes, 0x5A)
+ escapeToGroundBytes = append(escapeToGroundBytes, 0x5C)
+ escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x60, 0x7E)...)
+ return escapeToGroundBytes
+}
+
+func getExecuteBytes() []byte {
+ executeBytes := getByteRange(0x00, 0x17)
+ executeBytes = append(executeBytes, 0x19)
+ executeBytes = append(executeBytes, getByteRange(0x1C, 0x1F)...)
+ return executeBytes
+}
+
+func getToGroundBytes() []byte {
+ groundBytes := []byte{0x18}
+ groundBytes = append(groundBytes, 0x1A)
+ groundBytes = append(groundBytes, getByteRange(0x80, 0x8F)...)
+ groundBytes = append(groundBytes, getByteRange(0x91, 0x97)...)
+ groundBytes = append(groundBytes, 0x99)
+ groundBytes = append(groundBytes, 0x9A)
+ groundBytes = append(groundBytes, 0x9C)
+ return groundBytes
+}
+
+// Delete 7F hex Always and everywhere ignored
+// C1 Control 80-9F hex 32 additional control characters
+// G1 Displayable A1-FE hex 94 additional displayable characters
+// Special A0+FF hex Same as SPACE and DELETE
diff --git a/vendor/github.com/Azure/go-ansiterm/context.go b/vendor/github.com/Azure/go-ansiterm/context.go
new file mode 100644
index 0000000000..8d66e777c0
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/context.go
@@ -0,0 +1,7 @@
+package ansiterm
+
+type ansiContext struct {
+ currentChar byte
+ paramBuffer []byte
+ interBuffer []byte
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go b/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go
new file mode 100644
index 0000000000..1bd6057da8
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go
@@ -0,0 +1,49 @@
+package ansiterm
+
+type csiEntryState struct {
+ baseState
+}
+
+func (csiState csiEntryState) Handle(b byte) (s state, e error) {
+ logger.Infof("CsiEntry::Handle %#x", b)
+
+ nextState, err := csiState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(alphabetics, b):
+ return csiState.parser.ground, nil
+ case sliceContains(csiCollectables, b):
+ return csiState.parser.csiParam, nil
+ case sliceContains(executors, b):
+ return csiState, csiState.parser.execute()
+ }
+
+ return csiState, nil
+}
+
+func (csiState csiEntryState) Transition(s state) error {
+ logger.Infof("CsiEntry::Transition %s --> %s", csiState.Name(), s.Name())
+ csiState.baseState.Transition(s)
+
+ switch s {
+ case csiState.parser.ground:
+ return csiState.parser.csiDispatch()
+ case csiState.parser.csiParam:
+ switch {
+ case sliceContains(csiParams, csiState.parser.context.currentChar):
+ csiState.parser.collectParam()
+ case sliceContains(intermeds, csiState.parser.context.currentChar):
+ csiState.parser.collectInter()
+ }
+ }
+
+ return nil
+}
+
+func (csiState csiEntryState) Enter() error {
+ csiState.parser.clear()
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/csi_param_state.go b/vendor/github.com/Azure/go-ansiterm/csi_param_state.go
new file mode 100644
index 0000000000..4be35c5fd2
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/csi_param_state.go
@@ -0,0 +1,38 @@
+package ansiterm
+
+type csiParamState struct {
+ baseState
+}
+
+func (csiState csiParamState) Handle(b byte) (s state, e error) {
+ logger.Infof("CsiParam::Handle %#x", b)
+
+ nextState, err := csiState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(alphabetics, b):
+ return csiState.parser.ground, nil
+ case sliceContains(csiCollectables, b):
+ csiState.parser.collectParam()
+ return csiState, nil
+ case sliceContains(executors, b):
+ return csiState, csiState.parser.execute()
+ }
+
+ return csiState, nil
+}
+
+func (csiState csiParamState) Transition(s state) error {
+ logger.Infof("CsiParam::Transition %s --> %s", csiState.Name(), s.Name())
+ csiState.baseState.Transition(s)
+
+ switch s {
+ case csiState.parser.ground:
+ return csiState.parser.csiDispatch()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go b/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go
new file mode 100644
index 0000000000..2189eb6b6b
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go
@@ -0,0 +1,36 @@
+package ansiterm
+
+type escapeIntermediateState struct {
+ baseState
+}
+
+func (escState escapeIntermediateState) Handle(b byte) (s state, e error) {
+ logger.Infof("escapeIntermediateState::Handle %#x", b)
+ nextState, err := escState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(intermeds, b):
+ return escState, escState.parser.collectInter()
+ case sliceContains(executors, b):
+ return escState, escState.parser.execute()
+ case sliceContains(escapeIntermediateToGroundBytes, b):
+ return escState.parser.ground, nil
+ }
+
+ return escState, nil
+}
+
+func (escState escapeIntermediateState) Transition(s state) error {
+ logger.Infof("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name())
+ escState.baseState.Transition(s)
+
+ switch s {
+ case escState.parser.ground:
+ return escState.parser.escDispatch()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/escape_state.go b/vendor/github.com/Azure/go-ansiterm/escape_state.go
new file mode 100644
index 0000000000..7b1b9ad3f1
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/escape_state.go
@@ -0,0 +1,47 @@
+package ansiterm
+
+type escapeState struct {
+ baseState
+}
+
+func (escState escapeState) Handle(b byte) (s state, e error) {
+ logger.Infof("escapeState::Handle %#x", b)
+ nextState, err := escState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case b == ANSI_ESCAPE_SECONDARY:
+ return escState.parser.csiEntry, nil
+ case b == ANSI_OSC_STRING_ENTRY:
+ return escState.parser.oscString, nil
+ case sliceContains(executors, b):
+ return escState, escState.parser.execute()
+ case sliceContains(escapeToGroundBytes, b):
+ return escState.parser.ground, nil
+ case sliceContains(intermeds, b):
+ return escState.parser.escapeIntermediate, nil
+ }
+
+ return escState, nil
+}
+
+func (escState escapeState) Transition(s state) error {
+ logger.Infof("Escape::Transition %s --> %s", escState.Name(), s.Name())
+ escState.baseState.Transition(s)
+
+ switch s {
+ case escState.parser.ground:
+ return escState.parser.escDispatch()
+ case escState.parser.escapeIntermediate:
+ return escState.parser.collectInter()
+ }
+
+ return nil
+}
+
+func (escState escapeState) Enter() error {
+ escState.parser.clear()
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/event_handler.go b/vendor/github.com/Azure/go-ansiterm/event_handler.go
new file mode 100644
index 0000000000..98087b38c2
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/event_handler.go
@@ -0,0 +1,90 @@
+package ansiterm
+
+type AnsiEventHandler interface {
+ // Print
+ Print(b byte) error
+
+ // Execute C0 commands
+ Execute(b byte) error
+
+ // CUrsor Up
+ CUU(int) error
+
+ // CUrsor Down
+ CUD(int) error
+
+ // CUrsor Forward
+ CUF(int) error
+
+ // CUrsor Backward
+ CUB(int) error
+
+ // Cursor to Next Line
+ CNL(int) error
+
+ // Cursor to Previous Line
+ CPL(int) error
+
+ // Cursor Horizontal position Absolute
+ CHA(int) error
+
+ // Vertical line Position Absolute
+ VPA(int) error
+
+ // CUrsor Position
+ CUP(int, int) error
+
+ // Horizontal and Vertical Position (depends on PUM)
+ HVP(int, int) error
+
+ // Text Cursor Enable Mode
+ DECTCEM(bool) error
+
+ // Origin Mode
+ DECOM(bool) error
+
+ // 132 Column Mode
+ DECCOLM(bool) error
+
+ // Erase in Display
+ ED(int) error
+
+ // Erase in Line
+ EL(int) error
+
+ // Insert Line
+ IL(int) error
+
+ // Delete Line
+ DL(int) error
+
+ // Insert Character
+ ICH(int) error
+
+ // Delete Character
+ DCH(int) error
+
+ // Set Graphics Rendition
+ SGR([]int) error
+
+ // Pan Down
+ SU(int) error
+
+ // Pan Up
+ SD(int) error
+
+ // Device Attributes
+ DA([]string) error
+
+ // Set Top and Bottom Margins
+ DECSTBM(int, int) error
+
+ // Index
+ IND() error
+
+ // Reverse Index
+ RI() error
+
+ // Flush updates from previous commands
+ Flush() error
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/ground_state.go b/vendor/github.com/Azure/go-ansiterm/ground_state.go
new file mode 100644
index 0000000000..52451e9469
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/ground_state.go
@@ -0,0 +1,24 @@
+package ansiterm
+
+type groundState struct {
+ baseState
+}
+
+func (gs groundState) Handle(b byte) (s state, e error) {
+ gs.parser.context.currentChar = b
+
+ nextState, err := gs.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(printables, b):
+ return gs, gs.parser.print()
+
+ case sliceContains(executors, b):
+ return gs, gs.parser.execute()
+ }
+
+ return gs, nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/osc_string_state.go b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go
new file mode 100644
index 0000000000..24062d420e
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go
@@ -0,0 +1,31 @@
+package ansiterm
+
+type oscStringState struct {
+ baseState
+}
+
+func (oscState oscStringState) Handle(b byte) (s state, e error) {
+ logger.Infof("OscString::Handle %#x", b)
+ nextState, err := oscState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case isOscStringTerminator(b):
+ return oscState.parser.ground, nil
+ }
+
+ return oscState, nil
+}
+
+// See below for OSC string terminators for linux
+// http://man7.org/linux/man-pages/man4/console_codes.4.html
+func isOscStringTerminator(b byte) bool {
+
+ if b == ANSI_BEL || b == 0x5C {
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/parser.go b/vendor/github.com/Azure/go-ansiterm/parser.go
new file mode 100644
index 0000000000..169f68dbef
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/parser.go
@@ -0,0 +1,136 @@
+package ansiterm
+
+import (
+ "errors"
+ "io/ioutil"
+ "os"
+
+ "github.com/Sirupsen/logrus"
+)
+
+var logger *logrus.Logger
+
+type AnsiParser struct {
+ currState state
+ eventHandler AnsiEventHandler
+ context *ansiContext
+ csiEntry state
+ csiParam state
+ dcsEntry state
+ escape state
+ escapeIntermediate state
+ error state
+ ground state
+ oscString state
+ stateMap []state
+}
+
+func CreateParser(initialState string, evtHandler AnsiEventHandler) *AnsiParser {
+ logFile := ioutil.Discard
+
+ if isDebugEnv := os.Getenv(LogEnv); isDebugEnv == "1" {
+ logFile, _ = os.Create("ansiParser.log")
+ }
+
+ logger = &logrus.Logger{
+ Out: logFile,
+ Formatter: new(logrus.TextFormatter),
+ Level: logrus.InfoLevel,
+ }
+
+ parser := &AnsiParser{
+ eventHandler: evtHandler,
+ context: &ansiContext{},
+ }
+
+ parser.csiEntry = csiEntryState{baseState{name: "CsiEntry", parser: parser}}
+ parser.csiParam = csiParamState{baseState{name: "CsiParam", parser: parser}}
+ parser.dcsEntry = dcsEntryState{baseState{name: "DcsEntry", parser: parser}}
+ parser.escape = escapeState{baseState{name: "Escape", parser: parser}}
+ parser.escapeIntermediate = escapeIntermediateState{baseState{name: "EscapeIntermediate", parser: parser}}
+ parser.error = errorState{baseState{name: "Error", parser: parser}}
+ parser.ground = groundState{baseState{name: "Ground", parser: parser}}
+ parser.oscString = oscStringState{baseState{name: "OscString", parser: parser}}
+
+ parser.stateMap = []state{
+ parser.csiEntry,
+ parser.csiParam,
+ parser.dcsEntry,
+ parser.escape,
+ parser.escapeIntermediate,
+ parser.error,
+ parser.ground,
+ parser.oscString,
+ }
+
+ parser.currState = getState(initialState, parser.stateMap)
+
+ logger.Infof("CreateParser: parser %p", parser)
+ return parser
+}
+
+func getState(name string, states []state) state {
+ for _, el := range states {
+ if el.Name() == name {
+ return el
+ }
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) Parse(bytes []byte) (int, error) {
+ for i, b := range bytes {
+ if err := ap.handle(b); err != nil {
+ return i, err
+ }
+ }
+
+ return len(bytes), ap.eventHandler.Flush()
+}
+
+func (ap *AnsiParser) handle(b byte) error {
+ ap.context.currentChar = b
+ newState, err := ap.currState.Handle(b)
+ if err != nil {
+ return err
+ }
+
+ if newState == nil {
+ logger.Warning("newState is nil")
+ return errors.New("New state of 'nil' is invalid.")
+ }
+
+ if newState != ap.currState {
+ if err := ap.changeState(newState); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) changeState(newState state) error {
+ logger.Infof("ChangeState %s --> %s", ap.currState.Name(), newState.Name())
+
+ // Exit old state
+ if err := ap.currState.Exit(); err != nil {
+ logger.Infof("Exit state '%s' failed with : '%v'", ap.currState.Name(), err)
+ return err
+ }
+
+ // Perform transition action
+ if err := ap.currState.Transition(newState); err != nil {
+ logger.Infof("Transition from '%s' to '%s' failed with: '%v'", ap.currState.Name(), newState.Name, err)
+ return err
+ }
+
+ // Enter new state
+ if err := newState.Enter(); err != nil {
+ logger.Infof("Enter state '%s' failed with: '%v'", newState.Name(), err)
+ return err
+ }
+
+ ap.currState = newState
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go b/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go
new file mode 100644
index 0000000000..8b69a67a5a
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go
@@ -0,0 +1,103 @@
+package ansiterm
+
+import (
+ "strconv"
+)
+
+func parseParams(bytes []byte) ([]string, error) {
+ paramBuff := make([]byte, 0, 0)
+ params := []string{}
+
+ for _, v := range bytes {
+ if v == ';' {
+ if len(paramBuff) > 0 {
+ // Completed parameter, append it to the list
+ s := string(paramBuff)
+ params = append(params, s)
+ paramBuff = make([]byte, 0, 0)
+ }
+ } else {
+ paramBuff = append(paramBuff, v)
+ }
+ }
+
+ // Last parameter may not be terminated with ';'
+ if len(paramBuff) > 0 {
+ s := string(paramBuff)
+ params = append(params, s)
+ }
+
+ logger.Infof("Parsed params: %v with length: %d", params, len(params))
+ return params, nil
+}
+
+func parseCmd(context ansiContext) (string, error) {
+ return string(context.currentChar), nil
+}
+
+func getInt(params []string, dflt int) int {
+ i := getInts(params, 1, dflt)[0]
+ logger.Infof("getInt: %v", i)
+ return i
+}
+
+func getInts(params []string, minCount int, dflt int) []int {
+ ints := []int{}
+
+ for _, v := range params {
+ i, _ := strconv.Atoi(v)
+ // Zero is mapped to the default value in VT100.
+ if i == 0 {
+ i = dflt
+ }
+ ints = append(ints, i)
+ }
+
+ if len(ints) < minCount {
+ remaining := minCount - len(ints)
+ for i := 0; i < remaining; i++ {
+ ints = append(ints, dflt)
+ }
+ }
+
+ logger.Infof("getInts: %v", ints)
+
+ return ints
+}
+
+func (ap *AnsiParser) modeDispatch(param string, set bool) error {
+ switch param {
+ case "?3":
+ return ap.eventHandler.DECCOLM(set)
+ case "?6":
+ return ap.eventHandler.DECOM(set)
+ case "?25":
+ return ap.eventHandler.DECTCEM(set)
+ }
+ return nil
+}
+
+func (ap *AnsiParser) hDispatch(params []string) error {
+ if len(params) == 1 {
+ return ap.modeDispatch(params[0], true)
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) lDispatch(params []string) error {
+ if len(params) == 1 {
+ return ap.modeDispatch(params[0], false)
+ }
+
+ return nil
+}
+
+func getEraseParam(params []string) int {
+ param := getInt(params, 0)
+ if param < 0 || 3 < param {
+ param = 0
+ }
+
+ return param
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/parser_actions.go b/vendor/github.com/Azure/go-ansiterm/parser_actions.go
new file mode 100644
index 0000000000..58750a2d2b
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/parser_actions.go
@@ -0,0 +1,122 @@
+package ansiterm
+
+import (
+ "fmt"
+)
+
+func (ap *AnsiParser) collectParam() error {
+ currChar := ap.context.currentChar
+ logger.Infof("collectParam %#x", currChar)
+ ap.context.paramBuffer = append(ap.context.paramBuffer, currChar)
+ return nil
+}
+
+func (ap *AnsiParser) collectInter() error {
+ currChar := ap.context.currentChar
+ logger.Infof("collectInter %#x", currChar)
+ ap.context.paramBuffer = append(ap.context.interBuffer, currChar)
+ return nil
+}
+
+func (ap *AnsiParser) escDispatch() error {
+ cmd, _ := parseCmd(*ap.context)
+ intermeds := ap.context.interBuffer
+ logger.Infof("escDispatch currentChar: %#x", ap.context.currentChar)
+ logger.Infof("escDispatch: %v(%v)", cmd, intermeds)
+
+ switch cmd {
+ case "D": // IND
+ return ap.eventHandler.IND()
+ case "E": // NEL, equivalent to CRLF
+ err := ap.eventHandler.Execute(ANSI_CARRIAGE_RETURN)
+ if err == nil {
+ err = ap.eventHandler.Execute(ANSI_LINE_FEED)
+ }
+ return err
+ case "M": // RI
+ return ap.eventHandler.RI()
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) csiDispatch() error {
+ cmd, _ := parseCmd(*ap.context)
+ params, _ := parseParams(ap.context.paramBuffer)
+
+ logger.Infof("csiDispatch: %v(%v)", cmd, params)
+
+ switch cmd {
+ case "@":
+ return ap.eventHandler.ICH(getInt(params, 1))
+ case "A":
+ return ap.eventHandler.CUU(getInt(params, 1))
+ case "B":
+ return ap.eventHandler.CUD(getInt(params, 1))
+ case "C":
+ return ap.eventHandler.CUF(getInt(params, 1))
+ case "D":
+ return ap.eventHandler.CUB(getInt(params, 1))
+ case "E":
+ return ap.eventHandler.CNL(getInt(params, 1))
+ case "F":
+ return ap.eventHandler.CPL(getInt(params, 1))
+ case "G":
+ return ap.eventHandler.CHA(getInt(params, 1))
+ case "H":
+ ints := getInts(params, 2, 1)
+ x, y := ints[0], ints[1]
+ return ap.eventHandler.CUP(x, y)
+ case "J":
+ param := getEraseParam(params)
+ return ap.eventHandler.ED(param)
+ case "K":
+ param := getEraseParam(params)
+ return ap.eventHandler.EL(param)
+ case "L":
+ return ap.eventHandler.IL(getInt(params, 1))
+ case "M":
+ return ap.eventHandler.DL(getInt(params, 1))
+ case "P":
+ return ap.eventHandler.DCH(getInt(params, 1))
+ case "S":
+ return ap.eventHandler.SU(getInt(params, 1))
+ case "T":
+ return ap.eventHandler.SD(getInt(params, 1))
+ case "c":
+ return ap.eventHandler.DA(params)
+ case "d":
+ return ap.eventHandler.VPA(getInt(params, 1))
+ case "f":
+ ints := getInts(params, 2, 1)
+ x, y := ints[0], ints[1]
+ return ap.eventHandler.HVP(x, y)
+ case "h":
+ return ap.hDispatch(params)
+ case "l":
+ return ap.lDispatch(params)
+ case "m":
+ return ap.eventHandler.SGR(getInts(params, 1, 0))
+ case "r":
+ ints := getInts(params, 2, 1)
+ top, bottom := ints[0], ints[1]
+ return ap.eventHandler.DECSTBM(top, bottom)
+ default:
+ logger.Errorf(fmt.Sprintf("Unsupported CSI command: '%s', with full context: %v", cmd, ap.context))
+ return nil
+ }
+
+}
+
+func (ap *AnsiParser) print() error {
+ return ap.eventHandler.Print(ap.context.currentChar)
+}
+
+func (ap *AnsiParser) clear() error {
+ ap.context = &ansiContext{}
+ return nil
+}
+
+func (ap *AnsiParser) execute() error {
+ return ap.eventHandler.Execute(ap.context.currentChar)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/states.go b/vendor/github.com/Azure/go-ansiterm/states.go
new file mode 100644
index 0000000000..f2ea1fcd12
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/states.go
@@ -0,0 +1,71 @@
+package ansiterm
+
+type stateID int
+
+type state interface {
+ Enter() error
+ Exit() error
+ Handle(byte) (state, error)
+ Name() string
+ Transition(state) error
+}
+
+type baseState struct {
+ name string
+ parser *AnsiParser
+}
+
+func (base baseState) Enter() error {
+ return nil
+}
+
+func (base baseState) Exit() error {
+ return nil
+}
+
+func (base baseState) Handle(b byte) (s state, e error) {
+
+ switch {
+ case b == CSI_ENTRY:
+ return base.parser.csiEntry, nil
+ case b == DCS_ENTRY:
+ return base.parser.dcsEntry, nil
+ case b == ANSI_ESCAPE_PRIMARY:
+ return base.parser.escape, nil
+ case b == OSC_STRING:
+ return base.parser.oscString, nil
+ case sliceContains(toGroundBytes, b):
+ return base.parser.ground, nil
+ }
+
+ return nil, nil
+}
+
+func (base baseState) Name() string {
+ return base.name
+}
+
+func (base baseState) Transition(s state) error {
+ if s == base.parser.ground {
+ execBytes := []byte{0x18}
+ execBytes = append(execBytes, 0x1A)
+ execBytes = append(execBytes, getByteRange(0x80, 0x8F)...)
+ execBytes = append(execBytes, getByteRange(0x91, 0x97)...)
+ execBytes = append(execBytes, 0x99)
+ execBytes = append(execBytes, 0x9A)
+
+ if sliceContains(execBytes, base.parser.context.currentChar) {
+ return base.parser.execute()
+ }
+ }
+
+ return nil
+}
+
+type dcsEntryState struct {
+ baseState
+}
+
+type errorState struct {
+ baseState
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/utilities.go
new file mode 100644
index 0000000000..392114493a
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/utilities.go
@@ -0,0 +1,21 @@
+package ansiterm
+
+import (
+ "strconv"
+)
+
+func sliceContains(bytes []byte, b byte) bool {
+ for _, v := range bytes {
+ if v == b {
+ return true
+ }
+ }
+
+ return false
+}
+
+func convertBytesToInteger(bytes []byte) int {
+ s := string(bytes)
+ i, _ := strconv.Atoi(s)
+ return i
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go
new file mode 100644
index 0000000000..daf2f06961
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go
@@ -0,0 +1,182 @@
+// +build windows
+
+package winterm
+
+import (
+ "fmt"
+ "os"
+ "strconv"
+ "strings"
+ "syscall"
+
+ "github.com/Azure/go-ansiterm"
+)
+
+// Windows keyboard constants
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx.
+const (
+ VK_PRIOR = 0x21 // PAGE UP key
+ VK_NEXT = 0x22 // PAGE DOWN key
+ VK_END = 0x23 // END key
+ VK_HOME = 0x24 // HOME key
+ VK_LEFT = 0x25 // LEFT ARROW key
+ VK_UP = 0x26 // UP ARROW key
+ VK_RIGHT = 0x27 // RIGHT ARROW key
+ VK_DOWN = 0x28 // DOWN ARROW key
+ VK_SELECT = 0x29 // SELECT key
+ VK_PRINT = 0x2A // PRINT key
+ VK_EXECUTE = 0x2B // EXECUTE key
+ VK_SNAPSHOT = 0x2C // PRINT SCREEN key
+ VK_INSERT = 0x2D // INS key
+ VK_DELETE = 0x2E // DEL key
+ VK_HELP = 0x2F // HELP key
+ VK_F1 = 0x70 // F1 key
+ VK_F2 = 0x71 // F2 key
+ VK_F3 = 0x72 // F3 key
+ VK_F4 = 0x73 // F4 key
+ VK_F5 = 0x74 // F5 key
+ VK_F6 = 0x75 // F6 key
+ VK_F7 = 0x76 // F7 key
+ VK_F8 = 0x77 // F8 key
+ VK_F9 = 0x78 // F9 key
+ VK_F10 = 0x79 // F10 key
+ VK_F11 = 0x7A // F11 key
+ VK_F12 = 0x7B // F12 key
+
+ RIGHT_ALT_PRESSED = 0x0001
+ LEFT_ALT_PRESSED = 0x0002
+ RIGHT_CTRL_PRESSED = 0x0004
+ LEFT_CTRL_PRESSED = 0x0008
+ SHIFT_PRESSED = 0x0010
+ NUMLOCK_ON = 0x0020
+ SCROLLLOCK_ON = 0x0040
+ CAPSLOCK_ON = 0x0080
+ ENHANCED_KEY = 0x0100
+)
+
+type ansiCommand struct {
+ CommandBytes []byte
+ Command string
+ Parameters []string
+ IsSpecial bool
+}
+
+func newAnsiCommand(command []byte) *ansiCommand {
+
+ if isCharacterSelectionCmdChar(command[1]) {
+ // Is Character Set Selection commands
+ return &ansiCommand{
+ CommandBytes: command,
+ Command: string(command),
+ IsSpecial: true,
+ }
+ }
+
+ // last char is command character
+ lastCharIndex := len(command) - 1
+
+ ac := &ansiCommand{
+ CommandBytes: command,
+ Command: string(command[lastCharIndex]),
+ IsSpecial: false,
+ }
+
+ // more than a single escape
+ if lastCharIndex != 0 {
+ start := 1
+ // skip if double char escape sequence
+ if command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_ESCAPE_SECONDARY {
+ start++
+ }
+ // convert this to GetNextParam method
+ ac.Parameters = strings.Split(string(command[start:lastCharIndex]), ansiterm.ANSI_PARAMETER_SEP)
+ }
+
+ return ac
+}
+
+func (ac *ansiCommand) paramAsSHORT(index int, defaultValue int16) int16 {
+ if index < 0 || index >= len(ac.Parameters) {
+ return defaultValue
+ }
+
+ param, err := strconv.ParseInt(ac.Parameters[index], 10, 16)
+ if err != nil {
+ return defaultValue
+ }
+
+ return int16(param)
+}
+
+func (ac *ansiCommand) String() string {
+ return fmt.Sprintf("0x%v \"%v\" (\"%v\")",
+ bytesToHex(ac.CommandBytes),
+ ac.Command,
+ strings.Join(ac.Parameters, "\",\""))
+}
+
+// isAnsiCommandChar returns true if the passed byte falls within the range of ANSI commands.
+// See http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html.
+func isAnsiCommandChar(b byte) bool {
+ switch {
+ case ansiterm.ANSI_COMMAND_FIRST <= b && b <= ansiterm.ANSI_COMMAND_LAST && b != ansiterm.ANSI_ESCAPE_SECONDARY:
+ return true
+ case b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_OSC || b == ansiterm.ANSI_CMD_DECPAM || b == ansiterm.ANSI_CMD_DECPNM:
+ // non-CSI escape sequence terminator
+ return true
+ case b == ansiterm.ANSI_CMD_STR_TERM || b == ansiterm.ANSI_BEL:
+ // String escape sequence terminator
+ return true
+ }
+ return false
+}
+
+func isXtermOscSequence(command []byte, current byte) bool {
+ return (len(command) >= 2 && command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_CMD_OSC && current != ansiterm.ANSI_BEL)
+}
+
+func isCharacterSelectionCmdChar(b byte) bool {
+ return (b == ansiterm.ANSI_CMD_G0 || b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_G2 || b == ansiterm.ANSI_CMD_G3)
+}
+
+// bytesToHex converts a slice of bytes to a human-readable string.
+func bytesToHex(b []byte) string {
+ hex := make([]string, len(b))
+ for i, ch := range b {
+ hex[i] = fmt.Sprintf("%X", ch)
+ }
+ return strings.Join(hex, "")
+}
+
+// ensureInRange adjusts the passed value, if necessary, to ensure it is within
+// the passed min / max range.
+func ensureInRange(n int16, min int16, max int16) int16 {
+ if n < min {
+ return min
+ } else if n > max {
+ return max
+ } else {
+ return n
+ }
+}
+
+func GetStdFile(nFile int) (*os.File, uintptr) {
+ var file *os.File
+ switch nFile {
+ case syscall.STD_INPUT_HANDLE:
+ file = os.Stdin
+ case syscall.STD_OUTPUT_HANDLE:
+ file = os.Stdout
+ case syscall.STD_ERROR_HANDLE:
+ file = os.Stderr
+ default:
+ panic(fmt.Errorf("Invalid standard handle identifier: %v", nFile))
+ }
+
+ fd, err := syscall.GetStdHandle(nFile)
+ if err != nil {
+ panic(fmt.Errorf("Invalid standard handle indentifier: %v -- %v", nFile, err))
+ }
+
+ return file, uintptr(fd)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/api.go b/vendor/github.com/Azure/go-ansiterm/winterm/api.go
new file mode 100644
index 0000000000..462d92f8ef
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/api.go
@@ -0,0 +1,322 @@
+// +build windows
+
+package winterm
+
+import (
+ "fmt"
+ "syscall"
+ "unsafe"
+)
+
+//===========================================================================================================
+// IMPORTANT NOTE:
+//
+// The methods below make extensive use of the "unsafe" package to obtain the required pointers.
+// Beginning in Go 1.3, the garbage collector may release local variables (e.g., incoming arguments, stack
+// variables) the pointers reference *before* the API completes.
+//
+// As a result, in those cases, the code must hint that the variables remain in active by invoking the
+// dummy method "use" (see below). Newer versions of Go are planned to change the mechanism to no longer
+// require unsafe pointers.
+//
+// If you add or modify methods, ENSURE protection of local variables through the "use" builtin to inform
+// the garbage collector the variables remain in use if:
+//
+// -- The value is not a pointer (e.g., int32, struct)
+// -- The value is not referenced by the method after passing the pointer to Windows
+//
+// See http://golang.org/doc/go1.3.
+//===========================================================================================================
+
+var (
+ kernel32DLL = syscall.NewLazyDLL("kernel32.dll")
+
+ getConsoleCursorInfoProc = kernel32DLL.NewProc("GetConsoleCursorInfo")
+ setConsoleCursorInfoProc = kernel32DLL.NewProc("SetConsoleCursorInfo")
+ setConsoleCursorPositionProc = kernel32DLL.NewProc("SetConsoleCursorPosition")
+ setConsoleModeProc = kernel32DLL.NewProc("SetConsoleMode")
+ getConsoleScreenBufferInfoProc = kernel32DLL.NewProc("GetConsoleScreenBufferInfo")
+ setConsoleScreenBufferSizeProc = kernel32DLL.NewProc("SetConsoleScreenBufferSize")
+ scrollConsoleScreenBufferProc = kernel32DLL.NewProc("ScrollConsoleScreenBufferA")
+ setConsoleTextAttributeProc = kernel32DLL.NewProc("SetConsoleTextAttribute")
+ setConsoleWindowInfoProc = kernel32DLL.NewProc("SetConsoleWindowInfo")
+ writeConsoleOutputProc = kernel32DLL.NewProc("WriteConsoleOutputW")
+ readConsoleInputProc = kernel32DLL.NewProc("ReadConsoleInputW")
+ waitForSingleObjectProc = kernel32DLL.NewProc("WaitForSingleObject")
+)
+
+// Windows Console constants
+const (
+ // Console modes
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx.
+ ENABLE_PROCESSED_INPUT = 0x0001
+ ENABLE_LINE_INPUT = 0x0002
+ ENABLE_ECHO_INPUT = 0x0004
+ ENABLE_WINDOW_INPUT = 0x0008
+ ENABLE_MOUSE_INPUT = 0x0010
+ ENABLE_INSERT_MODE = 0x0020
+ ENABLE_QUICK_EDIT_MODE = 0x0040
+ ENABLE_EXTENDED_FLAGS = 0x0080
+
+ ENABLE_PROCESSED_OUTPUT = 0x0001
+ ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002
+
+ // Character attributes
+ // Note:
+ // -- The attributes are combined to produce various colors (e.g., Blue + Green will create Cyan).
+ // Clearing all foreground or background colors results in black; setting all creates white.
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes.
+ FOREGROUND_BLUE uint16 = 0x0001
+ FOREGROUND_GREEN uint16 = 0x0002
+ FOREGROUND_RED uint16 = 0x0004
+ FOREGROUND_INTENSITY uint16 = 0x0008
+ FOREGROUND_MASK uint16 = 0x000F
+
+ BACKGROUND_BLUE uint16 = 0x0010
+ BACKGROUND_GREEN uint16 = 0x0020
+ BACKGROUND_RED uint16 = 0x0040
+ BACKGROUND_INTENSITY uint16 = 0x0080
+ BACKGROUND_MASK uint16 = 0x00F0
+
+ COMMON_LVB_MASK uint16 = 0xFF00
+ COMMON_LVB_REVERSE_VIDEO uint16 = 0x4000
+ COMMON_LVB_UNDERSCORE uint16 = 0x8000
+
+ // Input event types
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx.
+ KEY_EVENT = 0x0001
+ MOUSE_EVENT = 0x0002
+ WINDOW_BUFFER_SIZE_EVENT = 0x0004
+ MENU_EVENT = 0x0008
+ FOCUS_EVENT = 0x0010
+
+ // WaitForSingleObject return codes
+ WAIT_ABANDONED = 0x00000080
+ WAIT_FAILED = 0xFFFFFFFF
+ WAIT_SIGNALED = 0x0000000
+ WAIT_TIMEOUT = 0x00000102
+
+ // WaitForSingleObject wait duration
+ WAIT_INFINITE = 0xFFFFFFFF
+ WAIT_ONE_SECOND = 1000
+ WAIT_HALF_SECOND = 500
+ WAIT_QUARTER_SECOND = 250
+)
+
+// Windows API Console types
+// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682101(v=vs.85).aspx for Console specific types (e.g., COORD)
+// -- See https://msdn.microsoft.com/en-us/library/aa296569(v=vs.60).aspx for comments on alignment
+type (
+ CHAR_INFO struct {
+ UnicodeChar uint16
+ Attributes uint16
+ }
+
+ CONSOLE_CURSOR_INFO struct {
+ Size uint32
+ Visible int32
+ }
+
+ CONSOLE_SCREEN_BUFFER_INFO struct {
+ Size COORD
+ CursorPosition COORD
+ Attributes uint16
+ Window SMALL_RECT
+ MaximumWindowSize COORD
+ }
+
+ COORD struct {
+ X int16
+ Y int16
+ }
+
+ SMALL_RECT struct {
+ Left int16
+ Top int16
+ Right int16
+ Bottom int16
+ }
+
+ // INPUT_RECORD is a C/C++ union of which KEY_EVENT_RECORD is one case, it is also the largest
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx.
+ INPUT_RECORD struct {
+ EventType uint16
+ KeyEvent KEY_EVENT_RECORD
+ }
+
+ KEY_EVENT_RECORD struct {
+ KeyDown int32
+ RepeatCount uint16
+ VirtualKeyCode uint16
+ VirtualScanCode uint16
+ UnicodeChar uint16
+ ControlKeyState uint32
+ }
+
+ WINDOW_BUFFER_SIZE struct {
+ Size COORD
+ }
+)
+
+// boolToBOOL converts a Go bool into a Windows int32.
+func boolToBOOL(f bool) int32 {
+ if f {
+ return int32(1)
+ } else {
+ return int32(0)
+ }
+}
+
+// GetConsoleCursorInfo retrieves information about the size and visiblity of the console cursor.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683163(v=vs.85).aspx.
+func GetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error {
+ r1, r2, err := getConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleCursorInfo sets the size and visiblity of the console cursor.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686019(v=vs.85).aspx.
+func SetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error {
+ r1, r2, err := setConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleCursorPosition location of the console cursor.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx.
+func SetConsoleCursorPosition(handle uintptr, coord COORD) error {
+ r1, r2, err := setConsoleCursorPositionProc.Call(handle, coordToPointer(coord))
+ use(coord)
+ return checkError(r1, r2, err)
+}
+
+// GetConsoleMode gets the console mode for given file descriptor
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx.
+func GetConsoleMode(handle uintptr) (mode uint32, err error) {
+ err = syscall.GetConsoleMode(syscall.Handle(handle), &mode)
+ return mode, err
+}
+
+// SetConsoleMode sets the console mode for given file descriptor
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx.
+func SetConsoleMode(handle uintptr, mode uint32) error {
+ r1, r2, err := setConsoleModeProc.Call(handle, uintptr(mode), 0)
+ use(mode)
+ return checkError(r1, r2, err)
+}
+
+// GetConsoleScreenBufferInfo retrieves information about the specified console screen buffer.
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683171(v=vs.85).aspx.
+func GetConsoleScreenBufferInfo(handle uintptr) (*CONSOLE_SCREEN_BUFFER_INFO, error) {
+ info := CONSOLE_SCREEN_BUFFER_INFO{}
+ err := checkError(getConsoleScreenBufferInfoProc.Call(handle, uintptr(unsafe.Pointer(&info)), 0))
+ if err != nil {
+ return nil, err
+ }
+ return &info, nil
+}
+
+func ScrollConsoleScreenBuffer(handle uintptr, scrollRect SMALL_RECT, clipRect SMALL_RECT, destOrigin COORD, char CHAR_INFO) error {
+ r1, r2, err := scrollConsoleScreenBufferProc.Call(handle, uintptr(unsafe.Pointer(&scrollRect)), uintptr(unsafe.Pointer(&clipRect)), coordToPointer(destOrigin), uintptr(unsafe.Pointer(&char)))
+ use(scrollRect)
+ use(clipRect)
+ use(destOrigin)
+ use(char)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleScreenBufferSize sets the size of the console screen buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686044(v=vs.85).aspx.
+func SetConsoleScreenBufferSize(handle uintptr, coord COORD) error {
+ r1, r2, err := setConsoleScreenBufferSizeProc.Call(handle, coordToPointer(coord))
+ use(coord)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleTextAttribute sets the attributes of characters written to the
+// console screen buffer by the WriteFile or WriteConsole function.
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx.
+func SetConsoleTextAttribute(handle uintptr, attribute uint16) error {
+ r1, r2, err := setConsoleTextAttributeProc.Call(handle, uintptr(attribute), 0)
+ use(attribute)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleWindowInfo sets the size and position of the console screen buffer's window.
+// Note that the size and location must be within and no larger than the backing console screen buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686125(v=vs.85).aspx.
+func SetConsoleWindowInfo(handle uintptr, isAbsolute bool, rect SMALL_RECT) error {
+ r1, r2, err := setConsoleWindowInfoProc.Call(handle, uintptr(boolToBOOL(isAbsolute)), uintptr(unsafe.Pointer(&rect)))
+ use(isAbsolute)
+ use(rect)
+ return checkError(r1, r2, err)
+}
+
+// WriteConsoleOutput writes the CHAR_INFOs from the provided buffer to the active console buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687404(v=vs.85).aspx.
+func WriteConsoleOutput(handle uintptr, buffer []CHAR_INFO, bufferSize COORD, bufferCoord COORD, writeRegion *SMALL_RECT) error {
+ r1, r2, err := writeConsoleOutputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), coordToPointer(bufferSize), coordToPointer(bufferCoord), uintptr(unsafe.Pointer(writeRegion)))
+ use(buffer)
+ use(bufferSize)
+ use(bufferCoord)
+ return checkError(r1, r2, err)
+}
+
+// ReadConsoleInput reads (and removes) data from the console input buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx.
+func ReadConsoleInput(handle uintptr, buffer []INPUT_RECORD, count *uint32) error {
+ r1, r2, err := readConsoleInputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer)), uintptr(unsafe.Pointer(count)))
+ use(buffer)
+ return checkError(r1, r2, err)
+}
+
+// WaitForSingleObject waits for the passed handle to be signaled.
+// It returns true if the handle was signaled; false otherwise.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx.
+func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) {
+ r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait)))
+ switch r1 {
+ case WAIT_ABANDONED, WAIT_TIMEOUT:
+ return false, nil
+ case WAIT_SIGNALED:
+ return true, nil
+ }
+ use(msWait)
+ return false, err
+}
+
+// String helpers
+func (info CONSOLE_SCREEN_BUFFER_INFO) String() string {
+ return fmt.Sprintf("Size(%v) Cursor(%v) Window(%v) Max(%v)", info.Size, info.CursorPosition, info.Window, info.MaximumWindowSize)
+}
+
+func (coord COORD) String() string {
+ return fmt.Sprintf("%v,%v", coord.X, coord.Y)
+}
+
+func (rect SMALL_RECT) String() string {
+ return fmt.Sprintf("(%v,%v),(%v,%v)", rect.Left, rect.Top, rect.Right, rect.Bottom)
+}
+
+// checkError evaluates the results of a Windows API call and returns the error if it failed.
+func checkError(r1, r2 uintptr, err error) error {
+ // Windows APIs return non-zero to indicate success
+ if r1 != 0 {
+ return nil
+ }
+
+ // Return the error if provided, otherwise default to EINVAL
+ if err != nil {
+ return err
+ }
+ return syscall.EINVAL
+}
+
+// coordToPointer converts a COORD into a uintptr (by fooling the type system).
+func coordToPointer(c COORD) uintptr {
+ // Note: This code assumes the two SHORTs are correctly laid out; the "cast" to uint32 is just to get a pointer to pass.
+ return uintptr(*((*uint32)(unsafe.Pointer(&c))))
+}
+
+// use is a no-op, but the compiler cannot see that it is.
+// Calling use(p) ensures that p is kept live until that point.
+func use(p interface{}) {}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go
new file mode 100644
index 0000000000..cbec8f728f
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go
@@ -0,0 +1,100 @@
+// +build windows
+
+package winterm
+
+import "github.com/Azure/go-ansiterm"
+
+const (
+ FOREGROUND_COLOR_MASK = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE
+ BACKGROUND_COLOR_MASK = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE
+)
+
+// collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the
+// request represented by the passed ANSI mode.
+func collectAnsiIntoWindowsAttributes(windowsMode uint16, inverted bool, baseMode uint16, ansiMode int16) (uint16, bool) {
+ switch ansiMode {
+
+ // Mode styles
+ case ansiterm.ANSI_SGR_BOLD:
+ windowsMode = windowsMode | FOREGROUND_INTENSITY
+
+ case ansiterm.ANSI_SGR_DIM, ansiterm.ANSI_SGR_BOLD_DIM_OFF:
+ windowsMode &^= FOREGROUND_INTENSITY
+
+ case ansiterm.ANSI_SGR_UNDERLINE:
+ windowsMode = windowsMode | COMMON_LVB_UNDERSCORE
+
+ case ansiterm.ANSI_SGR_REVERSE:
+ inverted = true
+
+ case ansiterm.ANSI_SGR_REVERSE_OFF:
+ inverted = false
+
+ case ansiterm.ANSI_SGR_UNDERLINE_OFF:
+ windowsMode &^= COMMON_LVB_UNDERSCORE
+
+ // Foreground colors
+ case ansiterm.ANSI_SGR_FOREGROUND_DEFAULT:
+ windowsMode = (windowsMode &^ FOREGROUND_MASK) | (baseMode & FOREGROUND_MASK)
+
+ case ansiterm.ANSI_SGR_FOREGROUND_BLACK:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK)
+
+ case ansiterm.ANSI_SGR_FOREGROUND_RED:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED
+
+ case ansiterm.ANSI_SGR_FOREGROUND_GREEN:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_FOREGROUND_YELLOW:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_FOREGROUND_BLUE:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_FOREGROUND_MAGENTA:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_FOREGROUND_CYAN:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN | FOREGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_FOREGROUND_WHITE:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE
+
+ // Background colors
+ case ansiterm.ANSI_SGR_BACKGROUND_DEFAULT:
+ // Black with no intensity
+ windowsMode = (windowsMode &^ BACKGROUND_MASK) | (baseMode & BACKGROUND_MASK)
+
+ case ansiterm.ANSI_SGR_BACKGROUND_BLACK:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK)
+
+ case ansiterm.ANSI_SGR_BACKGROUND_RED:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED
+
+ case ansiterm.ANSI_SGR_BACKGROUND_GREEN:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_BACKGROUND_YELLOW:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_BACKGROUND_BLUE:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_BACKGROUND_MAGENTA:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_BACKGROUND_CYAN:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN | BACKGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_BACKGROUND_WHITE:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE
+ }
+
+ return windowsMode, inverted
+}
+
+// invertAttributes inverts the foreground and background colors of a Windows attributes value
+func invertAttributes(windowsMode uint16) uint16 {
+ return (COMMON_LVB_MASK & windowsMode) | ((FOREGROUND_MASK & windowsMode) << 4) | ((BACKGROUND_MASK & windowsMode) >> 4)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go
new file mode 100644
index 0000000000..f015723ade
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go
@@ -0,0 +1,101 @@
+// +build windows
+
+package winterm
+
+const (
+ horizontal = iota
+ vertical
+)
+
+func (h *windowsAnsiEventHandler) getCursorWindow(info *CONSOLE_SCREEN_BUFFER_INFO) SMALL_RECT {
+ if h.originMode {
+ sr := h.effectiveSr(info.Window)
+ return SMALL_RECT{
+ Top: sr.top,
+ Bottom: sr.bottom,
+ Left: 0,
+ Right: info.Size.X - 1,
+ }
+ } else {
+ return SMALL_RECT{
+ Top: info.Window.Top,
+ Bottom: info.Window.Bottom,
+ Left: 0,
+ Right: info.Size.X - 1,
+ }
+ }
+}
+
+// setCursorPosition sets the cursor to the specified position, bounded to the screen size
+func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error {
+ position.X = ensureInRange(position.X, window.Left, window.Right)
+ position.Y = ensureInRange(position.Y, window.Top, window.Bottom)
+ err := SetConsoleCursorPosition(h.fd, position)
+ if err != nil {
+ return err
+ }
+ logger.Infof("Cursor position set: (%d, %d)", position.X, position.Y)
+ return err
+}
+
+func (h *windowsAnsiEventHandler) moveCursorVertical(param int) error {
+ return h.moveCursor(vertical, param)
+}
+
+func (h *windowsAnsiEventHandler) moveCursorHorizontal(param int) error {
+ return h.moveCursor(horizontal, param)
+}
+
+func (h *windowsAnsiEventHandler) moveCursor(moveMode int, param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ position := info.CursorPosition
+ switch moveMode {
+ case horizontal:
+ position.X += int16(param)
+ case vertical:
+ position.Y += int16(param)
+ }
+
+ if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) moveCursorLine(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ position := info.CursorPosition
+ position.X = 0
+ position.Y += int16(param)
+
+ if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) moveCursorColumn(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ position := info.CursorPosition
+ position.X = int16(param) - 1
+
+ if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go
new file mode 100644
index 0000000000..244b5fa25e
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go
@@ -0,0 +1,84 @@
+// +build windows
+
+package winterm
+
+import "github.com/Azure/go-ansiterm"
+
+func (h *windowsAnsiEventHandler) clearRange(attributes uint16, fromCoord COORD, toCoord COORD) error {
+ // Ignore an invalid (negative area) request
+ if toCoord.Y < fromCoord.Y {
+ return nil
+ }
+
+ var err error
+
+ var coordStart = COORD{}
+ var coordEnd = COORD{}
+
+ xCurrent, yCurrent := fromCoord.X, fromCoord.Y
+ xEnd, yEnd := toCoord.X, toCoord.Y
+
+ // Clear any partial initial line
+ if xCurrent > 0 {
+ coordStart.X, coordStart.Y = xCurrent, yCurrent
+ coordEnd.X, coordEnd.Y = xEnd, yCurrent
+
+ err = h.clearRect(attributes, coordStart, coordEnd)
+ if err != nil {
+ return err
+ }
+
+ xCurrent = 0
+ yCurrent += 1
+ }
+
+ // Clear intervening rectangular section
+ if yCurrent < yEnd {
+ coordStart.X, coordStart.Y = xCurrent, yCurrent
+ coordEnd.X, coordEnd.Y = xEnd, yEnd-1
+
+ err = h.clearRect(attributes, coordStart, coordEnd)
+ if err != nil {
+ return err
+ }
+
+ xCurrent = 0
+ yCurrent = yEnd
+ }
+
+ // Clear remaining partial ending line
+ coordStart.X, coordStart.Y = xCurrent, yCurrent
+ coordEnd.X, coordEnd.Y = xEnd, yEnd
+
+ err = h.clearRect(attributes, coordStart, coordEnd)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) clearRect(attributes uint16, fromCoord COORD, toCoord COORD) error {
+ region := SMALL_RECT{Top: fromCoord.Y, Left: fromCoord.X, Bottom: toCoord.Y, Right: toCoord.X}
+ width := toCoord.X - fromCoord.X + 1
+ height := toCoord.Y - fromCoord.Y + 1
+ size := uint32(width) * uint32(height)
+
+ if size <= 0 {
+ return nil
+ }
+
+ buffer := make([]CHAR_INFO, size)
+
+ char := CHAR_INFO{ansiterm.FILL_CHARACTER, attributes}
+ for i := 0; i < int(size); i++ {
+ buffer[i] = char
+ }
+
+ err := WriteConsoleOutput(h.fd, buffer, COORD{X: width, Y: height}, COORD{X: 0, Y: 0}, ®ion)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go
new file mode 100644
index 0000000000..706d270577
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go
@@ -0,0 +1,118 @@
+// +build windows
+
+package winterm
+
+// effectiveSr gets the current effective scroll region in buffer coordinates
+func (h *windowsAnsiEventHandler) effectiveSr(window SMALL_RECT) scrollRegion {
+ top := addInRange(window.Top, h.sr.top, window.Top, window.Bottom)
+ bottom := addInRange(window.Top, h.sr.bottom, window.Top, window.Bottom)
+ if top >= bottom {
+ top = window.Top
+ bottom = window.Bottom
+ }
+ return scrollRegion{top: top, bottom: bottom}
+}
+
+func (h *windowsAnsiEventHandler) scrollUp(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ sr := h.effectiveSr(info.Window)
+ return h.scroll(param, sr, info)
+}
+
+func (h *windowsAnsiEventHandler) scrollDown(param int) error {
+ return h.scrollUp(-param)
+}
+
+func (h *windowsAnsiEventHandler) deleteLines(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ start := info.CursorPosition.Y
+ sr := h.effectiveSr(info.Window)
+ // Lines cannot be inserted or deleted outside the scrolling region.
+ if start >= sr.top && start <= sr.bottom {
+ sr.top = start
+ return h.scroll(param, sr, info)
+ } else {
+ return nil
+ }
+}
+
+func (h *windowsAnsiEventHandler) insertLines(param int) error {
+ return h.deleteLines(-param)
+}
+
+// scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates.
+func (h *windowsAnsiEventHandler) scroll(param int, sr scrollRegion, info *CONSOLE_SCREEN_BUFFER_INFO) error {
+ logger.Infof("scroll: scrollTop: %d, scrollBottom: %d", sr.top, sr.bottom)
+ logger.Infof("scroll: windowTop: %d, windowBottom: %d", info.Window.Top, info.Window.Bottom)
+
+ // Copy from and clip to the scroll region (full buffer width)
+ scrollRect := SMALL_RECT{
+ Top: sr.top,
+ Bottom: sr.bottom,
+ Left: 0,
+ Right: info.Size.X - 1,
+ }
+
+ // Origin to which area should be copied
+ destOrigin := COORD{
+ X: 0,
+ Y: sr.top - int16(param),
+ }
+
+ char := CHAR_INFO{
+ UnicodeChar: ' ',
+ Attributes: h.attributes,
+ }
+
+ if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) deleteCharacters(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+ return h.scrollLine(param, info.CursorPosition, info)
+}
+
+func (h *windowsAnsiEventHandler) insertCharacters(param int) error {
+ return h.deleteCharacters(-param)
+}
+
+// scrollLine scrolls a line horizontally starting at the provided position by a number of columns.
+func (h *windowsAnsiEventHandler) scrollLine(columns int, position COORD, info *CONSOLE_SCREEN_BUFFER_INFO) error {
+ // Copy from and clip to the scroll region (full buffer width)
+ scrollRect := SMALL_RECT{
+ Top: position.Y,
+ Bottom: position.Y,
+ Left: position.X,
+ Right: info.Size.X - 1,
+ }
+
+ // Origin to which area should be copied
+ destOrigin := COORD{
+ X: position.X - int16(columns),
+ Y: position.Y,
+ }
+
+ char := CHAR_INFO{
+ UnicodeChar: ' ',
+ Attributes: h.attributes,
+ }
+
+ if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go
new file mode 100644
index 0000000000..afa7635d77
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go
@@ -0,0 +1,9 @@
+// +build windows
+
+package winterm
+
+// AddInRange increments a value by the passed quantity while ensuring the values
+// always remain within the supplied min / max range.
+func addInRange(n int16, increment int16, min int16, max int16) int16 {
+ return ensureInRange(n+increment, min, max)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
new file mode 100644
index 0000000000..4d858ed611
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
@@ -0,0 +1,726 @@
+// +build windows
+
+package winterm
+
+import (
+ "bytes"
+ "io/ioutil"
+ "os"
+ "strconv"
+
+ "github.com/Azure/go-ansiterm"
+ "github.com/Sirupsen/logrus"
+)
+
+var logger *logrus.Logger
+
+type windowsAnsiEventHandler struct {
+ fd uintptr
+ file *os.File
+ infoReset *CONSOLE_SCREEN_BUFFER_INFO
+ sr scrollRegion
+ buffer bytes.Buffer
+ attributes uint16
+ inverted bool
+ wrapNext bool
+ drewMarginByte bool
+ originMode bool
+ marginByte byte
+ curInfo *CONSOLE_SCREEN_BUFFER_INFO
+ curPos COORD
+}
+
+func CreateWinEventHandler(fd uintptr, file *os.File) ansiterm.AnsiEventHandler {
+ logFile := ioutil.Discard
+
+ if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" {
+ logFile, _ = os.Create("winEventHandler.log")
+ }
+
+ logger = &logrus.Logger{
+ Out: logFile,
+ Formatter: new(logrus.TextFormatter),
+ Level: logrus.DebugLevel,
+ }
+
+ infoReset, err := GetConsoleScreenBufferInfo(fd)
+ if err != nil {
+ return nil
+ }
+
+ return &windowsAnsiEventHandler{
+ fd: fd,
+ file: file,
+ infoReset: infoReset,
+ attributes: infoReset.Attributes,
+ }
+}
+
+type scrollRegion struct {
+ top int16
+ bottom int16
+}
+
+// simulateLF simulates a LF or CR+LF by scrolling if necessary to handle the
+// current cursor position and scroll region settings, in which case it returns
+// true. If no special handling is necessary, then it does nothing and returns
+// false.
+//
+// In the false case, the caller should ensure that a carriage return
+// and line feed are inserted or that the text is otherwise wrapped.
+func (h *windowsAnsiEventHandler) simulateLF(includeCR bool) (bool, error) {
+ if h.wrapNext {
+ if err := h.Flush(); err != nil {
+ return false, err
+ }
+ h.clearWrap()
+ }
+ pos, info, err := h.getCurrentInfo()
+ if err != nil {
+ return false, err
+ }
+ sr := h.effectiveSr(info.Window)
+ if pos.Y == sr.bottom {
+ // Scrolling is necessary. Let Windows automatically scroll if the scrolling region
+ // is the full window.
+ if sr.top == info.Window.Top && sr.bottom == info.Window.Bottom {
+ if includeCR {
+ pos.X = 0
+ h.updatePos(pos)
+ }
+ return false, nil
+ }
+
+ // A custom scroll region is active. Scroll the window manually to simulate
+ // the LF.
+ if err := h.Flush(); err != nil {
+ return false, err
+ }
+ logger.Info("Simulating LF inside scroll region")
+ if err := h.scrollUp(1); err != nil {
+ return false, err
+ }
+ if includeCR {
+ pos.X = 0
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return false, err
+ }
+ }
+ return true, nil
+
+ } else if pos.Y < info.Window.Bottom {
+ // Let Windows handle the LF.
+ pos.Y++
+ if includeCR {
+ pos.X = 0
+ }
+ h.updatePos(pos)
+ return false, nil
+ } else {
+ // The cursor is at the bottom of the screen but outside the scroll
+ // region. Skip the LF.
+ logger.Info("Simulating LF outside scroll region")
+ if includeCR {
+ if err := h.Flush(); err != nil {
+ return false, err
+ }
+ pos.X = 0
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return false, err
+ }
+ }
+ return true, nil
+ }
+}
+
+// executeLF executes a LF without a CR.
+func (h *windowsAnsiEventHandler) executeLF() error {
+ handled, err := h.simulateLF(false)
+ if err != nil {
+ return err
+ }
+ if !handled {
+ // Windows LF will reset the cursor column position. Write the LF
+ // and restore the cursor position.
+ pos, _, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED)
+ if pos.X != 0 {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Info("Resetting cursor position for LF without CR")
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) Print(b byte) error {
+ if h.wrapNext {
+ h.buffer.WriteByte(h.marginByte)
+ h.clearWrap()
+ if _, err := h.simulateLF(true); err != nil {
+ return err
+ }
+ }
+ pos, info, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ if pos.X == info.Size.X-1 {
+ h.wrapNext = true
+ h.marginByte = b
+ } else {
+ pos.X++
+ h.updatePos(pos)
+ h.buffer.WriteByte(b)
+ }
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) Execute(b byte) error {
+ switch b {
+ case ansiterm.ANSI_TAB:
+ logger.Info("Execute(TAB)")
+ // Move to the next tab stop, but preserve auto-wrap if already set.
+ if !h.wrapNext {
+ pos, info, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ pos.X = (pos.X + 8) - pos.X%8
+ if pos.X >= info.Size.X {
+ pos.X = info.Size.X - 1
+ }
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return err
+ }
+ }
+ return nil
+
+ case ansiterm.ANSI_BEL:
+ h.buffer.WriteByte(ansiterm.ANSI_BEL)
+ return nil
+
+ case ansiterm.ANSI_BACKSPACE:
+ if h.wrapNext {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.clearWrap()
+ }
+ pos, _, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ if pos.X > 0 {
+ pos.X--
+ h.updatePos(pos)
+ h.buffer.WriteByte(ansiterm.ANSI_BACKSPACE)
+ }
+ return nil
+
+ case ansiterm.ANSI_VERTICAL_TAB, ansiterm.ANSI_FORM_FEED:
+ // Treat as true LF.
+ return h.executeLF()
+
+ case ansiterm.ANSI_LINE_FEED:
+ // Simulate a CR and LF for now since there is no way in go-ansiterm
+ // to tell if the LF should include CR (and more things break when it's
+ // missing than when it's incorrectly added).
+ handled, err := h.simulateLF(true)
+ if handled || err != nil {
+ return err
+ }
+ return h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED)
+
+ case ansiterm.ANSI_CARRIAGE_RETURN:
+ if h.wrapNext {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.clearWrap()
+ }
+ pos, _, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ if pos.X != 0 {
+ pos.X = 0
+ h.updatePos(pos)
+ h.buffer.WriteByte(ansiterm.ANSI_CARRIAGE_RETURN)
+ }
+ return nil
+
+ default:
+ return nil
+ }
+}
+
+func (h *windowsAnsiEventHandler) CUU(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CUU: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorVertical(-param)
+}
+
+func (h *windowsAnsiEventHandler) CUD(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CUD: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorVertical(param)
+}
+
+func (h *windowsAnsiEventHandler) CUF(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CUF: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorHorizontal(param)
+}
+
+func (h *windowsAnsiEventHandler) CUB(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CUB: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorHorizontal(-param)
+}
+
+func (h *windowsAnsiEventHandler) CNL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CNL: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorLine(param)
+}
+
+func (h *windowsAnsiEventHandler) CPL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CPL: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorLine(-param)
+}
+
+func (h *windowsAnsiEventHandler) CHA(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CHA: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorColumn(param)
+}
+
+func (h *windowsAnsiEventHandler) VPA(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("VPA: [[%d]]", param)
+ h.clearWrap()
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+ window := h.getCursorWindow(info)
+ position := info.CursorPosition
+ position.Y = window.Top + int16(param) - 1
+ return h.setCursorPosition(position, window)
+}
+
+func (h *windowsAnsiEventHandler) CUP(row int, col int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("CUP: [[%d %d]]", row, col)
+ h.clearWrap()
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ window := h.getCursorWindow(info)
+ position := COORD{window.Left + int16(col) - 1, window.Top + int16(row) - 1}
+ return h.setCursorPosition(position, window)
+}
+
+func (h *windowsAnsiEventHandler) HVP(row int, col int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("HVP: [[%d %d]]", row, col)
+ h.clearWrap()
+ return h.CUP(row, col)
+}
+
+func (h *windowsAnsiEventHandler) DECTCEM(visible bool) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("DECTCEM: [%v]", []string{strconv.FormatBool(visible)})
+ h.clearWrap()
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) DECOM(enable bool) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("DECOM: [%v]", []string{strconv.FormatBool(enable)})
+ h.clearWrap()
+ h.originMode = enable
+ return h.CUP(1, 1)
+}
+
+func (h *windowsAnsiEventHandler) DECCOLM(use132 bool) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("DECCOLM: [%v]", []string{strconv.FormatBool(use132)})
+ h.clearWrap()
+ if err := h.ED(2); err != nil {
+ return err
+ }
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+ targetWidth := int16(80)
+ if use132 {
+ targetWidth = 132
+ }
+ if info.Size.X < targetWidth {
+ if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil {
+ logger.Info("set buffer failed:", err)
+ return err
+ }
+ }
+ window := info.Window
+ window.Left = 0
+ window.Right = targetWidth - 1
+ if err := SetConsoleWindowInfo(h.fd, true, window); err != nil {
+ logger.Info("set window failed:", err)
+ return err
+ }
+ if info.Size.X > targetWidth {
+ if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil {
+ logger.Info("set buffer failed:", err)
+ return err
+ }
+ }
+ return SetConsoleCursorPosition(h.fd, COORD{0, 0})
+}
+
+func (h *windowsAnsiEventHandler) ED(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("ED: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+
+ // [J -- Erases from the cursor to the end of the screen, including the cursor position.
+ // [1J -- Erases from the beginning of the screen to the cursor, including the cursor position.
+ // [2J -- Erases the complete display. The cursor does not move.
+ // Notes:
+ // -- Clearing the entire buffer, versus just the Window, works best for Windows Consoles
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ var start COORD
+ var end COORD
+
+ switch param {
+ case 0:
+ start = info.CursorPosition
+ end = COORD{info.Size.X - 1, info.Size.Y - 1}
+
+ case 1:
+ start = COORD{0, 0}
+ end = info.CursorPosition
+
+ case 2:
+ start = COORD{0, 0}
+ end = COORD{info.Size.X - 1, info.Size.Y - 1}
+ }
+
+ err = h.clearRange(h.attributes, start, end)
+ if err != nil {
+ return err
+ }
+
+ // If the whole buffer was cleared, move the window to the top while preserving
+ // the window-relative cursor position.
+ if param == 2 {
+ pos := info.CursorPosition
+ window := info.Window
+ pos.Y -= window.Top
+ window.Bottom -= window.Top
+ window.Top = 0
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return err
+ }
+ if err := SetConsoleWindowInfo(h.fd, true, window); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) EL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("EL: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+
+ // [K -- Erases from the cursor to the end of the line, including the cursor position.
+ // [1K -- Erases from the beginning of the line to the cursor, including the cursor position.
+ // [2K -- Erases the complete line.
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ var start COORD
+ var end COORD
+
+ switch param {
+ case 0:
+ start = info.CursorPosition
+ end = COORD{info.Size.X, info.CursorPosition.Y}
+
+ case 1:
+ start = COORD{0, info.CursorPosition.Y}
+ end = info.CursorPosition
+
+ case 2:
+ start = COORD{0, info.CursorPosition.Y}
+ end = COORD{info.Size.X, info.CursorPosition.Y}
+ }
+
+ err = h.clearRange(h.attributes, start, end)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) IL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("IL: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.insertLines(param)
+}
+
+func (h *windowsAnsiEventHandler) DL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("DL: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.deleteLines(param)
+}
+
+func (h *windowsAnsiEventHandler) ICH(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("ICH: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.insertCharacters(param)
+}
+
+func (h *windowsAnsiEventHandler) DCH(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("DCH: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.deleteCharacters(param)
+}
+
+func (h *windowsAnsiEventHandler) SGR(params []int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ strings := []string{}
+ for _, v := range params {
+ strings = append(strings, strconv.Itoa(v))
+ }
+
+ logger.Infof("SGR: [%v]", strings)
+
+ if len(params) <= 0 {
+ h.attributes = h.infoReset.Attributes
+ h.inverted = false
+ } else {
+ for _, attr := range params {
+
+ if attr == ansiterm.ANSI_SGR_RESET {
+ h.attributes = h.infoReset.Attributes
+ h.inverted = false
+ continue
+ }
+
+ h.attributes, h.inverted = collectAnsiIntoWindowsAttributes(h.attributes, h.inverted, h.infoReset.Attributes, int16(attr))
+ }
+ }
+
+ attributes := h.attributes
+ if h.inverted {
+ attributes = invertAttributes(attributes)
+ }
+ err := SetConsoleTextAttribute(h.fd, attributes)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) SU(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("SU: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.scrollUp(param)
+}
+
+func (h *windowsAnsiEventHandler) SD(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("SD: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.scrollDown(param)
+}
+
+func (h *windowsAnsiEventHandler) DA(params []string) error {
+ logger.Infof("DA: [%v]", params)
+ // DA cannot be implemented because it must send data on the VT100 input stream,
+ // which is not available to go-ansiterm.
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) DECSTBM(top int, bottom int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Infof("DECSTBM: [%d, %d]", top, bottom)
+
+ // Windows is 0 indexed, Linux is 1 indexed
+ h.sr.top = int16(top - 1)
+ h.sr.bottom = int16(bottom - 1)
+
+ // This command also moves the cursor to the origin.
+ h.clearWrap()
+ return h.CUP(1, 1)
+}
+
+func (h *windowsAnsiEventHandler) RI() error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ logger.Info("RI: []")
+ h.clearWrap()
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ sr := h.effectiveSr(info.Window)
+ if info.CursorPosition.Y == sr.top {
+ return h.scrollDown(1)
+ }
+
+ return h.moveCursorVertical(-1)
+}
+
+func (h *windowsAnsiEventHandler) IND() error {
+ logger.Info("IND: []")
+ return h.executeLF()
+}
+
+func (h *windowsAnsiEventHandler) Flush() error {
+ h.curInfo = nil
+ if h.buffer.Len() > 0 {
+ logger.Infof("Flush: [%s]", h.buffer.Bytes())
+ if _, err := h.buffer.WriteTo(h.file); err != nil {
+ return err
+ }
+ }
+
+ if h.wrapNext && !h.drewMarginByte {
+ logger.Infof("Flush: drawing margin byte '%c'", h.marginByte)
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ charInfo := []CHAR_INFO{{UnicodeChar: uint16(h.marginByte), Attributes: info.Attributes}}
+ size := COORD{1, 1}
+ position := COORD{0, 0}
+ region := SMALL_RECT{Left: info.CursorPosition.X, Top: info.CursorPosition.Y, Right: info.CursorPosition.X, Bottom: info.CursorPosition.Y}
+ if err := WriteConsoleOutput(h.fd, charInfo, size, position, ®ion); err != nil {
+ return err
+ }
+ h.drewMarginByte = true
+ }
+ return nil
+}
+
+// cacheConsoleInfo ensures that the current console screen information has been queried
+// since the last call to Flush(). It must be called before accessing h.curInfo or h.curPos.
+func (h *windowsAnsiEventHandler) getCurrentInfo() (COORD, *CONSOLE_SCREEN_BUFFER_INFO, error) {
+ if h.curInfo == nil {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return COORD{}, nil, err
+ }
+ h.curInfo = info
+ h.curPos = info.CursorPosition
+ }
+ return h.curPos, h.curInfo, nil
+}
+
+func (h *windowsAnsiEventHandler) updatePos(pos COORD) {
+ if h.curInfo == nil {
+ panic("failed to call getCurrentInfo before calling updatePos")
+ }
+ h.curPos = pos
+}
+
+// clearWrap clears the state where the cursor is in the margin
+// waiting for the next character before wrapping the line. This must
+// be done before most operations that act on the cursor.
+func (h *windowsAnsiEventHandler) clearWrap() {
+ h.wrapNext = false
+ h.drewMarginByte = false
+}
diff --git a/vendor/github.com/CenturyLinkCloud/clc-sdk/.coveralls.yml b/vendor/github.com/CenturyLinkCloud/clc-sdk/.coveralls.yml
deleted file mode 100644
index 91600595a1..0000000000
--- a/vendor/github.com/CenturyLinkCloud/clc-sdk/.coveralls.yml
+++ /dev/null
@@ -1 +0,0 @@
-service_name: travis-ci
diff --git a/vendor/github.com/CenturyLinkCloud/clc-sdk/.gitignore b/vendor/github.com/CenturyLinkCloud/clc-sdk/.gitignore
deleted file mode 100644
index 0ecc34548f..0000000000
--- a/vendor/github.com/CenturyLinkCloud/clc-sdk/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.swp
-*.cov
-Godeps/_workspace
diff --git a/vendor/github.com/CenturyLinkCloud/clc-sdk/.travis.yml b/vendor/github.com/CenturyLinkCloud/clc-sdk/.travis.yml
deleted file mode 100644
index 09431f95a6..0000000000
--- a/vendor/github.com/CenturyLinkCloud/clc-sdk/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-
-go:
- - 1.5
-
-install: make deps
-script:
- - make test
diff --git a/vendor/github.com/CenturyLinkCloud/clc-sdk/cover.sh b/vendor/github.com/CenturyLinkCloud/clc-sdk/cover.sh
old mode 100644
new mode 100755
diff --git a/vendor/github.com/Ensighten/udnssdk/readme.md b/vendor/github.com/Ensighten/udnssdk/README.md
similarity index 100%
rename from vendor/github.com/Ensighten/udnssdk/readme.md
rename to vendor/github.com/Ensighten/udnssdk/README.md
diff --git a/vendor/github.com/Unknwon/com/.gitignore b/vendor/github.com/Unknwon/com/.gitignore
deleted file mode 100644
index 0da157fe9c..0000000000
--- a/vendor/github.com/Unknwon/com/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-.idea
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.iml
diff --git a/vendor/github.com/Unknwon/com/.travis.yml b/vendor/github.com/Unknwon/com/.travis.yml
deleted file mode 100644
index 882eb2d122..0000000000
--- a/vendor/github.com/Unknwon/com/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: go
-
-go:
- - 1.2
- - 1.3
- - 1.4
- - tip
-
-install: go get -v -t
-
-notifications:
- email:
- - u@gogs.io
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/macaron/.gitignore b/vendor/github.com/Unknwon/macaron/.gitignore
deleted file mode 100644
index 57ee3ec50f..0000000000
--- a/vendor/github.com/Unknwon/macaron/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-macaron.sublime-project
-macaron.sublime-workspace
\ No newline at end of file
diff --git a/vendor/github.com/apparentlymart/go-grafana-api/.gitignore b/vendor/github.com/apparentlymart/go-grafana-api/.gitignore
deleted file mode 100644
index daf913b1b3..0000000000
--- a/vendor/github.com/apparentlymart/go-grafana-api/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
diff --git a/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job.go b/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job.go
index 275db85016..281ab28b57 100644
--- a/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job.go
+++ b/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job.go
@@ -44,7 +44,7 @@ type JobDetail struct {
* This has to be handle by the user.
*/
NodesSelectedByDefault bool `xml:"nodesSelectedByDefault"`
- Schedule *JobSchedule `xml:"schedule,omitempty"`
+ Schedule *JobSchedule `xml:"schedule"`
}
type JobSchedule struct {
@@ -73,7 +73,7 @@ type JobScheduleYear struct {
type JobScheduleWeekDay struct {
XMLName xml.Name `xml:"weekday"`
- Day string `xml:"day,attr"`
+ Day string `xml:"day,attr"`
}
type JobScheduleTime struct {
diff --git a/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job_test.go b/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job_test.go
deleted file mode 100644
index aa54351b3d..0000000000
--- a/vendor/github.com/apparentlymart/go-rundeck-api/rundeck/job_test.go
+++ /dev/null
@@ -1,314 +0,0 @@
-package rundeck
-
-import (
- "fmt"
- "testing"
-)
-
-func TestUnmarshalJobDetail(t *testing.T) {
- testUnmarshalXML(t, []unmarshalTest{
- unmarshalTest{
- "with-config",
- `bazascending`,
- &JobDetail{},
- func (rv interface {}) error {
- v := rv.(*JobDetail)
- if v.ID != "baz" {
- return fmt.Errorf("got ID %s, but expecting baz", v.ID)
- }
- if v.Dispatch.RankOrder != "ascending" {
- return fmt.Errorf("Dispatch.RankOrder = \"%v\", but expecting \"ascending\"", v.Dispatch.RankOrder)
- }
- return nil
- },
- },
- unmarshalTest{
- "with-empty-config",
- ``,
- &JobPlugin{},
- func (rv interface {}) error {
- v := rv.(*JobPlugin)
- if v.Type != "foo-plugin" {
- return fmt.Errorf("got Type %s, but expecting foo-plugin", v.Type)
- }
- if len(v.Config) != 0 {
- return fmt.Errorf("got %i Config values, but expecting 0", len(v.Config))
- }
- return nil
- },
- },
- })
-}
-
-func TestMarshalJobPlugin(t *testing.T) {
- testMarshalXML(t, []marshalTest{
- marshalTest{
- "with-config",
- JobPlugin{
- Type: "foo-plugin",
- Config: map[string]string{
- "woo": "foo",
- "bar": "baz",
- },
- },
- ``,
- },
- marshalTest{
- "with-empty-config",
- JobPlugin{
- Type: "foo-plugin",
- Config: map[string]string{},
- },
- ``,
- },
- marshalTest{
- "with-zero-value-config",
- JobPlugin{
- Type: "foo-plugin",
- },
- ``,
- },
- })
-}
-
-func TestUnmarshalJobPlugin(t *testing.T) {
- testUnmarshalXML(t, []unmarshalTest{
- unmarshalTest{
- "with-config",
- ``,
- &JobPlugin{},
- func (rv interface {}) error {
- v := rv.(*JobPlugin)
- if v.Type != "foo-plugin" {
- return fmt.Errorf("got Type %s, but expecting foo-plugin", v.Type)
- }
- if len(v.Config) != 2 {
- return fmt.Errorf("got %v Config values, but expecting 2", len(v.Config))
- }
- if v.Config["woo"] != "foo" {
- return fmt.Errorf("Config[\"woo\"] = \"%s\", but expecting \"foo\"", v.Config["woo"])
- }
- if v.Config["bar"] != "baz" {
- return fmt.Errorf("Config[\"bar\"] = \"%s\", but expecting \"baz\"", v.Config["bar"])
- }
- return nil
- },
- },
- unmarshalTest{
- "with-empty-config",
- ``,
- &JobPlugin{},
- func (rv interface {}) error {
- v := rv.(*JobPlugin)
- if v.Type != "foo-plugin" {
- return fmt.Errorf("got Type %s, but expecting foo-plugin", v.Type)
- }
- if len(v.Config) != 0 {
- return fmt.Errorf("got %i Config values, but expecting 0", len(v.Config))
- }
- return nil
- },
- },
- })
-}
-
-func TestMarshalJobCommand(t *testing.T) {
- testMarshalXML(t, []marshalTest{
- marshalTest{
- "with-shell",
- JobCommand{
- ShellCommand: "command",
- },
- `command`,
- },
- marshalTest{
- "with-script",
- JobCommand{
- Script: "script",
- },
- ``,
- },
- marshalTest{
- "with-script-interpreter",
- JobCommand{
- FileExtension: "sh",
- Script: "Hello World!",
- ScriptInterpreter: &JobCommandScriptInterpreter{
- InvocationString: "sudo",
- },
- },
- `shsudo`,
- },
- })
-}
-
-func TestUnmarshalJobCommand(t *testing.T) {
- testUnmarshalXML(t, []unmarshalTest{
- unmarshalTest{
- "with-shell",
- `command`,
- &JobCommand{},
- func (rv interface {}) error {
- v := rv.(*JobCommand)
- if v.ShellCommand != "command" {
- return fmt.Errorf("got ShellCommand %s, but expecting command", v.ShellCommand)
- }
- return nil
- },
- },
- unmarshalTest{
- "with-script",
- ``,
- &JobCommand{},
- func (rv interface {}) error {
- v := rv.(*JobCommand)
- if v.Script != "script" {
- return fmt.Errorf("got Script %s, but expecting script", v.Script)
- }
- return nil
- },
- },
- unmarshalTest{
- "with-script-interpreter",
- `shsudo`,
- &JobCommand{},
- func (rv interface {}) error {
- v := rv.(*JobCommand)
- if v.FileExtension != "sh" {
- return fmt.Errorf("got FileExtension %s, but expecting sh", v.FileExtension)
- }
- if v.Script != "Hello World!" {
- return fmt.Errorf("got Script %s, but expecting Hello World!", v.Script)
- }
- if v.ScriptInterpreter == nil {
- return fmt.Errorf("got %s, but expecting not nil", v.ScriptInterpreter)
- }
- if v.ScriptInterpreter.InvocationString != "sudo" {
- return fmt.Errorf("got InvocationString %s, but expecting sudo", v.ScriptInterpreter.InvocationString)
- }
- return nil
- },
- },
- })
-}
-
-func TestMarshalScriptInterpreter(t *testing.T) {
- testMarshalXML(t, []marshalTest{
- marshalTest{
- "with-script-interpreter",
- JobCommandScriptInterpreter{
- InvocationString: "sudo",
- },
- `sudo`,
- },
- marshalTest{
- "with-script-interpreter-quoted",
- JobCommandScriptInterpreter{
- ArgsQuoted: true,
- InvocationString: "sudo",
- },
- `sudo`,
- },
- })
-}
-
-func TestUnmarshalScriptInterpreter(t *testing.T) {
- testUnmarshalXML(t, []unmarshalTest{
- unmarshalTest{
- "with-script-interpreter",
- `sudo`,
- &JobCommandScriptInterpreter{},
- func (rv interface {}) error {
- v := rv.(*JobCommandScriptInterpreter)
- if v.InvocationString != "sudo" {
- return fmt.Errorf("got InvocationString %s, but expecting sudo", v.InvocationString)
- }
- if v.ArgsQuoted {
- return fmt.Errorf("got ArgsQuoted %s, but expecting false", v.ArgsQuoted)
- }
- return nil
- },
- },
- unmarshalTest{
- "with-script-interpreter-quoted",
- `sudo`,
- &JobCommandScriptInterpreter{},
- func (rv interface {}) error {
- v := rv.(*JobCommandScriptInterpreter)
- if v.InvocationString != "sudo" {
- return fmt.Errorf("got InvocationString %s, but expecting sudo", v.InvocationString)
- }
- if ! v.ArgsQuoted {
- return fmt.Errorf("got ArgsQuoted %s, but expecting true", v.ArgsQuoted)
- }
- return nil
- },
- },
- })
-}
-
-func TestMarshalErrorHanlder(t *testing.T) {
- testMarshalXML(t, []marshalTest{
- marshalTest{
- "with-errorhandler",
- JobCommandSequence{
- ContinueOnError: true,
- OrderingStrategy: "step-first",
- Commands: []JobCommand{
- JobCommand{
- Script: "inline_script",
- ErrorHandler: &JobCommand{
- ContinueOnError: true,
- Script: "error_script",
- },
- },
- },
- },
- ``,
- },
- })
-}
-
-
-func TestMarshalJobOption(t *testing.T) {
- testMarshalXML(t, []marshalTest{
- marshalTest{
- "with-option-basic",
- JobOption{
- Name: "basic",
- },
- ``,
- },
- marshalTest{
- "with-option-multivalued",
- JobOption{
- Name: "Multivalued",
- MultiValueDelimiter: "|",
- RequirePredefinedChoice: true,
- AllowsMultipleValues: true,
- IsRequired: true,
- ValueChoices: JobValueChoices([]string{"myValues"}),
- },
- ``,
- },
- marshalTest{
- "with-all-attributes",
- JobOption{
- Name: "advanced",
- MultiValueDelimiter: "|",
- RequirePredefinedChoice: true,
- AllowsMultipleValues: true,
- ValidationRegex: ".+",
- IsRequired: true,
- ObscureInput: true,
- StoragePath: "myKey",
- DefaultValue: "myValue",
- ValueIsExposedToScripts: true,
- ValueChoices: JobValueChoices([]string{"myValues"}),
- ValueChoicesURL: "myValuesUrl",
- },
- ``,
- },
- })
-}
-
diff --git a/vendor/github.com/armon/circbuf/.gitignore b/vendor/github.com/armon/circbuf/.gitignore
deleted file mode 100644
index 00268614f0..0000000000
--- a/vendor/github.com/armon/circbuf/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
diff --git a/vendor/github.com/armon/circbuf/LICENSE b/vendor/github.com/armon/circbuf/LICENSE
old mode 100644
new mode 100755
diff --git a/vendor/github.com/armon/go-radix/.gitignore b/vendor/github.com/armon/go-radix/.gitignore
deleted file mode 100644
index 00268614f0..0000000000
--- a/vendor/github.com/armon/go-radix/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
diff --git a/vendor/github.com/armon/go-radix/.travis.yml b/vendor/github.com/armon/go-radix/.travis.yml
deleted file mode 100644
index 1a0bbea6c7..0000000000
--- a/vendor/github.com/armon/go-radix/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: go
-go:
- - tip
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
new file mode 100644
index 0000000000..19d97562fe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
@@ -0,0 +1,70 @@
+// Package endpoints validates regional endpoints for services.
+package endpoints
+
+//go:generate go run -tags codegen ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go
+//go:generate gofmt -s -w endpoints_map.go
+
+import (
+ "fmt"
+ "regexp"
+ "strings"
+)
+
+// NormalizeEndpoint takes and endpoint and service API information to return a
+// normalized endpoint and signing region. If the endpoint is not an empty string
+// the service name and region will be used to look up the service's API endpoint.
+// If the endpoint is provided the scheme will be added if it is not present.
+func NormalizeEndpoint(endpoint, serviceName, region string, disableSSL, useDualStack bool) (normEndpoint, signingRegion string) {
+ if endpoint == "" {
+ return EndpointForRegion(serviceName, region, disableSSL, useDualStack)
+ }
+
+ return AddScheme(endpoint, disableSSL), ""
+}
+
+// EndpointForRegion returns an endpoint and its signing region for a service and region.
+// if the service and region pair are not found endpoint and signingRegion will be empty.
+func EndpointForRegion(svcName, region string, disableSSL, useDualStack bool) (endpoint, signingRegion string) {
+ dualStackField := ""
+ if useDualStack {
+ dualStackField = "/dualstack"
+ }
+
+ derivedKeys := []string{
+ region + "/" + svcName + dualStackField,
+ region + "/*" + dualStackField,
+ "*/" + svcName + dualStackField,
+ "*/*" + dualStackField,
+ }
+
+ for _, key := range derivedKeys {
+ if val, ok := endpointsMap.Endpoints[key]; ok {
+ ep := val.Endpoint
+ ep = strings.Replace(ep, "{region}", region, -1)
+ ep = strings.Replace(ep, "{service}", svcName, -1)
+
+ endpoint = ep
+ signingRegion = val.SigningRegion
+ break
+ }
+ }
+
+ return AddScheme(endpoint, disableSSL), signingRegion
+}
+
+// Regular expression to determine if the endpoint string is prefixed with a scheme.
+var schemeRE = regexp.MustCompile("^([^:]+)://")
+
+// AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no
+// scheme. If disableSSL is true HTTP will be added instead of the default HTTPS.
+func AddScheme(endpoint string, disableSSL bool) string {
+ if endpoint != "" && !schemeRE.MatchString(endpoint) {
+ scheme := "https"
+ if disableSSL {
+ scheme = "http"
+ }
+ endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
+ }
+
+ return endpoint
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
new file mode 100644
index 0000000000..5594f2efd2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
@@ -0,0 +1,82 @@
+{
+ "version": 2,
+ "endpoints": {
+ "*/*": {
+ "endpoint": "{service}.{region}.amazonaws.com"
+ },
+ "cn-north-1/*": {
+ "endpoint": "{service}.{region}.amazonaws.com.cn",
+ "signatureVersion": "v4"
+ },
+ "cn-north-1/ec2metadata": {
+ "endpoint": "http://169.254.169.254/latest"
+ },
+ "us-gov-west-1/iam": {
+ "endpoint": "iam.us-gov.amazonaws.com"
+ },
+ "us-gov-west-1/sts": {
+ "endpoint": "sts.us-gov-west-1.amazonaws.com"
+ },
+ "us-gov-west-1/s3": {
+ "endpoint": "s3-{region}.amazonaws.com"
+ },
+ "us-gov-west-1/ec2metadata": {
+ "endpoint": "http://169.254.169.254/latest"
+ },
+ "*/budgets": {
+ "endpoint": "budgets.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/cloudfront": {
+ "endpoint": "cloudfront.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/cloudsearchdomain": {
+ "endpoint": "",
+ "signingRegion": "us-east-1"
+ },
+ "*/data.iot": {
+ "endpoint": "",
+ "signingRegion": "us-east-1"
+ },
+ "*/ec2metadata": {
+ "endpoint": "http://169.254.169.254/latest"
+ },
+ "*/iam": {
+ "endpoint": "iam.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/importexport": {
+ "endpoint": "importexport.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/route53": {
+ "endpoint": "route53.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/sts": {
+ "endpoint": "sts.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/waf": {
+ "endpoint": "waf.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "us-east-1/sdb": {
+ "endpoint": "sdb.amazonaws.com",
+ "signingRegion": "us-east-1"
+ },
+ "*/s3": {
+ "endpoint": "s3-{region}.amazonaws.com"
+ },
+ "*/s3/dualstack": {
+ "endpoint": "s3.dualstack.{region}.amazonaws.com"
+ },
+ "us-east-1/s3": {
+ "endpoint": "s3.amazonaws.com"
+ },
+ "eu-central-1/s3": {
+ "endpoint": "{service}.{region}.amazonaws.com"
+ }
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
new file mode 100644
index 0000000000..e79e6782a6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
@@ -0,0 +1,95 @@
+package endpoints
+
+// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+
+type endpointStruct struct {
+ Version int
+ Endpoints map[string]endpointEntry
+}
+
+type endpointEntry struct {
+ Endpoint string
+ SigningRegion string
+}
+
+var endpointsMap = endpointStruct{
+ Version: 2,
+ Endpoints: map[string]endpointEntry{
+ "*/*": {
+ Endpoint: "{service}.{region}.amazonaws.com",
+ },
+ "*/budgets": {
+ Endpoint: "budgets.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "*/cloudfront": {
+ Endpoint: "cloudfront.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "*/cloudsearchdomain": {
+ Endpoint: "",
+ SigningRegion: "us-east-1",
+ },
+ "*/data.iot": {
+ Endpoint: "",
+ SigningRegion: "us-east-1",
+ },
+ "*/ec2metadata": {
+ Endpoint: "http://169.254.169.254/latest",
+ },
+ "*/iam": {
+ Endpoint: "iam.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "*/importexport": {
+ Endpoint: "importexport.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "*/route53": {
+ Endpoint: "route53.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "*/s3": {
+ Endpoint: "s3-{region}.amazonaws.com",
+ },
+ "*/s3/dualstack": {
+ Endpoint: "s3.dualstack.{region}.amazonaws.com",
+ },
+ "*/sts": {
+ Endpoint: "sts.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "*/waf": {
+ Endpoint: "waf.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "cn-north-1/*": {
+ Endpoint: "{service}.{region}.amazonaws.com.cn",
+ },
+ "cn-north-1/ec2metadata": {
+ Endpoint: "http://169.254.169.254/latest",
+ },
+ "eu-central-1/s3": {
+ Endpoint: "{service}.{region}.amazonaws.com",
+ },
+ "us-east-1/s3": {
+ Endpoint: "s3.amazonaws.com",
+ },
+ "us-east-1/sdb": {
+ Endpoint: "sdb.amazonaws.com",
+ SigningRegion: "us-east-1",
+ },
+ "us-gov-west-1/ec2metadata": {
+ Endpoint: "http://169.254.169.254/latest",
+ },
+ "us-gov-west-1/iam": {
+ Endpoint: "iam.us-gov.amazonaws.com",
+ },
+ "us-gov-west-1/s3": {
+ Endpoint: "s3-{region}.amazonaws.com",
+ },
+ "us-gov-west-1/sts": {
+ Endpoint: "sts.us-gov-west-1.amazonaws.com",
+ },
+ },
+}
diff --git a/vendor/github.com/bgentry/speakeasy/.gitignore b/vendor/github.com/bgentry/speakeasy/.gitignore
deleted file mode 100644
index 9e1311461e..0000000000
--- a/vendor/github.com/bgentry/speakeasy/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-example/example
-example/example.exe
diff --git a/vendor/github.com/bgentry/speakeasy/speakeasy.go b/vendor/github.com/bgentry/speakeasy/speakeasy.go
index d16233a1a4..71c1dd1b96 100644
--- a/vendor/github.com/bgentry/speakeasy/speakeasy.go
+++ b/vendor/github.com/bgentry/speakeasy/speakeasy.go
@@ -14,16 +14,18 @@ func Ask(prompt string) (password string, err error) {
return FAsk(os.Stdout, prompt)
}
-// Same as the Ask function, except it is possible to specify the file to write
-// the prompt to.
-func FAsk(file *os.File, prompt string) (password string, err error) {
- if prompt != "" {
- fmt.Fprint(file, prompt) // Display the prompt.
+// FAsk is the same as Ask, except it is possible to specify the file to write
+// the prompt to. If 'nil' is passed as the writer, no prompt will be written.
+func FAsk(wr io.Writer, prompt string) (password string, err error) {
+ if wr != nil && prompt != "" {
+ fmt.Fprint(wr, prompt) // Display the prompt.
}
password, err = getPassword()
// Carriage return after the user input.
- fmt.Fprintln(file, "")
+ if wr != nil {
+ fmt.Fprintln(wr, "")
+ }
return
}
diff --git a/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go b/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go
index dca74bd995..d99fda1919 100644
--- a/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go
+++ b/vendor/github.com/bgentry/speakeasy/speakeasy_unix.go
@@ -4,7 +4,7 @@
// Original code is based on code by RogerV in the golang-nuts thread:
// https://groups.google.com/group/golang-nuts/browse_thread/thread/40cc41e9d9fc9247
-// +build darwin freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package speakeasy
diff --git a/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go b/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go
index fc4177c44d..c2093a8091 100644
--- a/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go
+++ b/vendor/github.com/bgentry/speakeasy/speakeasy_windows.go
@@ -3,7 +3,6 @@
package speakeasy
import (
- "os"
"syscall"
)
@@ -12,18 +11,17 @@ import (
const ENABLE_ECHO_INPUT = 0x0004
func getPassword() (password string, err error) {
- hStdin := syscall.Handle(os.Stdin.Fd())
var oldMode uint32
- err = syscall.GetConsoleMode(hStdin, &oldMode)
+ err = syscall.GetConsoleMode(syscall.Stdin, &oldMode)
if err != nil {
return
}
var newMode uint32 = (oldMode &^ ENABLE_ECHO_INPUT)
- err = setConsoleMode(hStdin, newMode)
- defer setConsoleMode(hStdin, oldMode)
+ err = setConsoleMode(syscall.Stdin, newMode)
+ defer setConsoleMode(syscall.Stdin, oldMode)
if err != nil {
return
}
diff --git a/vendor/github.com/cenkalti/backoff/.gitignore b/vendor/github.com/cenkalti/backoff/.gitignore
deleted file mode 100644
index 00268614f0..0000000000
--- a/vendor/github.com/cenkalti/backoff/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
diff --git a/vendor/github.com/cenkalti/backoff/.travis.yml b/vendor/github.com/cenkalti/backoff/.travis.yml
deleted file mode 100644
index ce9cb62333..0000000000
--- a/vendor/github.com/cenkalti/backoff/.travis.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-language: go
-go: 1.3.3
diff --git a/vendor/github.com/cenkalti/backoff/README.md b/vendor/github.com/cenkalti/backoff/README.md
index 020b8fbf33..13b347fb95 100644
--- a/vendor/github.com/cenkalti/backoff/README.md
+++ b/vendor/github.com/cenkalti/backoff/README.md
@@ -1,4 +1,4 @@
-# Exponential Backoff [![GoDoc][godoc image]][godoc] [![Build Status][travis image]][travis]
+# Exponential Backoff [![GoDoc][godoc image]][godoc] [![Build Status][travis image]][travis] [![Coverage Status][coveralls image]][coveralls]
This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client].
@@ -7,108 +7,22 @@ is an algorithm that uses feedback to multiplicatively decrease the rate of some
in order to gradually find an acceptable rate.
The retries exponentially increase and stop increasing when a certain threshold is met.
-## How To
+## Usage
-We define two functions, `Retry()` and `RetryNotify()`.
-They receive an `Operation` to execute, a `BackOff` algorithm,
-and an optional `Notify` error handler.
+See https://godoc.org/github.com/cenkalti/backoff#pkg-examples
-The operation will be executed, and will be retried on failure with delay
-as given by the backoff algorithm. The backoff algorithm can also decide when to stop
-retrying.
-In addition, the notify error handler will be called after each failed attempt,
-except for the last time, whose error should be handled by the caller.
+## Contributing
-```go
-// An Operation is executing by Retry() or RetryNotify().
-// The operation will be retried using a backoff policy if it returns an error.
-type Operation func() error
-
-// Notify is a notify-on-error function. It receives an operation error and
-// backoff delay if the operation failed (with an error).
-//
-// NOTE that if the backoff policy stated to stop retrying,
-// the notify function isn't called.
-type Notify func(error, time.Duration)
-
-func Retry(Operation, BackOff) error
-func RetryNotify(Operation, BackOff, Notify)
-```
-
-## Examples
-
-See more advanced examples in the [godoc][advanced example].
-
-### Retry
-
-Simple retry helper that uses the default exponential backoff algorithm:
-
-```go
-operation := func() error {
- // An operation that might fail.
- return nil // or return errors.New("some error")
-}
-
-err := Retry(operation, NewExponentialBackOff())
-if err != nil {
- // Handle error.
- return err
-}
-
-// Operation is successful.
-return nil
-```
-
-### Ticker
-
-```go
-operation := func() error {
- // An operation that might fail
- return nil // or return errors.New("some error")
-}
-
-b := NewExponentialBackOff()
-ticker := NewTicker(b)
-
-var err error
-
-// Ticks will continue to arrive when the previous operation is still running,
-// so operations that take a while to fail could run in quick succession.
-for range ticker.C {
- if err = operation(); err != nil {
- log.Println(err, "will retry...")
- continue
- }
-
- ticker.Stop()
- break
-}
-
-if err != nil {
- // Operation has failed.
- return err
-}
-
-// Operation is successful.
-return nil
-```
-
-## Getting Started
-
-```bash
-# install
-$ go get github.com/cenkalti/backoff
-
-# test
-$ cd $GOPATH/src/github.com/cenkalti/backoff
-$ go get -t ./...
-$ go test -v -cover
-```
+* I would like to keep this library as small as possible.
+* Please don't send a PR without opening an issue and discussing it first.
+* If proposed change is not a common use case, I will probably not accept it.
[godoc]: https://godoc.org/github.com/cenkalti/backoff
[godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png
[travis]: https://travis-ci.org/cenkalti/backoff
-[travis image]: https://travis-ci.org/cenkalti/backoff.png
+[travis image]: https://travis-ci.org/cenkalti/backoff.png?branch=master
+[coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master
+[coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master
[google-http-java-client]: https://github.com/google/google-http-java-client
[exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff
diff --git a/vendor/github.com/cenkalti/backoff/backoff.go b/vendor/github.com/cenkalti/backoff/backoff.go
index 61bd6df66c..2102c5f2de 100644
--- a/vendor/github.com/cenkalti/backoff/backoff.go
+++ b/vendor/github.com/cenkalti/backoff/backoff.go
@@ -1,6 +1,13 @@
// Package backoff implements backoff algorithms for retrying operations.
//
-// Also has a Retry() helper for retrying operations that may fail.
+// Use Retry function for retrying operations that may fail.
+// If Retry does not meet your needs,
+// copy/paste the function into your project and modify as you wish.
+//
+// There is also Ticker type similar to time.Ticker.
+// You can use it if you need to work with channels.
+//
+// See Examples section below for usage examples.
package backoff
import "time"
@@ -25,7 +32,7 @@ type BackOff interface {
Reset()
}
-// Indicates that no more retries should be made for use in NextBackOff().
+// Stop indicates that no more retries should be made for use in NextBackOff().
const Stop time.Duration = -1
// ZeroBackOff is a fixed backoff policy whose backoff time is always zero,
diff --git a/vendor/github.com/cenkalti/backoff/exponential.go b/vendor/github.com/cenkalti/backoff/exponential.go
index cc2a164f28..ae65516dc0 100644
--- a/vendor/github.com/cenkalti/backoff/exponential.go
+++ b/vendor/github.com/cenkalti/backoff/exponential.go
@@ -89,6 +89,11 @@ func NewExponentialBackOff() *ExponentialBackOff {
MaxElapsedTime: DefaultMaxElapsedTime,
Clock: SystemClock,
}
+ if b.RandomizationFactor < 0 {
+ b.RandomizationFactor = 0
+ } else if b.RandomizationFactor > 1 {
+ b.RandomizationFactor = 1
+ }
b.Reset()
return b
}
diff --git a/vendor/github.com/cenkalti/backoff/retry.go b/vendor/github.com/cenkalti/backoff/retry.go
index f01f2bbd07..6bc88ce750 100644
--- a/vendor/github.com/cenkalti/backoff/retry.go
+++ b/vendor/github.com/cenkalti/backoff/retry.go
@@ -13,8 +13,8 @@ type Operation func() error
// the notify function isn't called.
type Notify func(error, time.Duration)
-// Retry the function f until it does not return error or BackOff stops.
-// f is guaranteed to be run at least once.
+// Retry the operation o until it does not return error or BackOff stops.
+// o is guaranteed to be run at least once.
// It is the caller's responsibility to reset b after Retry returns.
//
// Retry sleeps the goroutine for the duration returned by BackOff after a
diff --git a/vendor/github.com/cihub/seelog/archive/archive_test.go b/vendor/github.com/cihub/seelog/archive/archive_test.go
deleted file mode 100644
index a05cac7266..0000000000
--- a/vendor/github.com/cihub/seelog/archive/archive_test.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package archive_test
-
-import (
- "bytes"
- "fmt"
- "io"
- "testing"
-
- "github.com/cihub/seelog/archive"
- "github.com/cihub/seelog/archive/gzip"
- "github.com/cihub/seelog/archive/tar"
- "github.com/cihub/seelog/archive/zip"
- "github.com/cihub/seelog/io/iotest"
-)
-
-const (
- gzipType = "gzip"
- tarType = "tar"
- zipType = "zip"
-)
-
-var types = []string{gzipType, tarType, zipType}
-
-type file struct {
- name string
- contents []byte
-}
-
-var (
- oneFile = []file{
- {
- name: "file1",
- contents: []byte("This is a single log."),
- },
- }
- twoFiles = []file{
- {
- name: "file1",
- contents: []byte("This is a log."),
- },
- {
- name: "file2",
- contents: []byte("This is another log."),
- },
- }
-)
-
-type testCase struct {
- srcType, dstType string
- in []file
-}
-
-func copyTests() map[string]testCase {
- // types X types X files
- tests := make(map[string]testCase, len(types)*len(types)*2)
- for _, srct := range types {
- for _, dstt := range types {
- tests[fmt.Sprintf("%s to %s: one file", srct, dstt)] = testCase{
- srcType: srct,
- dstType: dstt,
- in: oneFile,
- }
- // gzip does not handle more than one file
- if srct != gzipType && dstt != gzipType {
- tests[fmt.Sprintf("%s to %s: two files", srct, dstt)] = testCase{
- srcType: srct,
- dstType: dstt,
- in: twoFiles,
- }
- }
- }
- }
- return tests
-}
-
-func TestCopy(t *testing.T) {
- srcb, dstb := new(bytes.Buffer), new(bytes.Buffer)
- for tname, tt := range copyTests() {
- // Reset buffers between tests
- srcb.Reset()
- dstb.Reset()
-
- // Last file name (needed for gzip.NewReader)
- var fname string
-
- // Seed the src
- srcw := writer(t, tname, srcb, tt.srcType)
- for _, f := range tt.in {
- srcw.NextFile(f.name, iotest.FileInfo(t, f.contents))
- mustCopy(t, tname, srcw, bytes.NewReader(f.contents))
- fname = f.name
- }
- mustClose(t, tname, srcw)
-
- // Perform the copy
- srcr := reader(t, tname, srcb, tt.srcType, fname)
- dstw := writer(t, tname, dstb, tt.dstType)
- if err := archive.Copy(dstw, srcr); err != nil {
- t.Fatalf("%s: %v", tname, err)
- }
- srcr.Close() // Read-only
- mustClose(t, tname, dstw)
-
- // Read back dst to confirm our expectations
- dstr := reader(t, tname, dstb, tt.dstType, fname)
- for _, want := range tt.in {
- buf := new(bytes.Buffer)
- name, err := dstr.NextFile()
- if err != nil {
- t.Fatalf("%s: %v", tname, err)
- }
- mustCopy(t, tname, buf, dstr)
- got := file{
- name: name,
- contents: buf.Bytes(),
- }
-
- switch {
- case got.name != want.name:
- t.Errorf("%s: got file %q but want file %q",
- tname, got.name, want.name)
-
- case !bytes.Equal(got.contents, want.contents):
- t.Errorf("%s: mismatched contents in %q: got %q but want %q",
- tname, got.name, got.contents, want.contents)
- }
- }
- dstr.Close()
- }
-}
-
-func writer(t *testing.T, tname string, w io.Writer, atype string) archive.WriteCloser {
- switch atype {
- case gzipType:
- return gzip.NewWriter(w)
- case tarType:
- return tar.NewWriter(w)
- case zipType:
- return zip.NewWriter(w)
- }
- t.Fatalf("%s: unrecognized archive type: %s", tname, atype)
- panic("execution continued after (*testing.T).Fatalf")
-}
-
-func reader(t *testing.T, tname string, buf *bytes.Buffer, atype string, fname string) archive.ReadCloser {
- switch atype {
- case gzipType:
- gr, err := gzip.NewReader(buf, fname)
- if err != nil {
- t.Fatalf("%s: %v", tname, err)
- }
- return gr
- case tarType:
- return archive.NopCloser(tar.NewReader(buf))
- case zipType:
- zr, err := zip.NewReader(
- bytes.NewReader(buf.Bytes()),
- int64(buf.Len()))
- if err != nil {
- t.Fatalf("%s: new zip reader: %v", tname, err)
- }
- return archive.NopCloser(zr)
- }
- t.Fatalf("%s: unrecognized archive type: %s", tname, atype)
- panic("execution continued after (*testing.T).Fatalf")
-}
-
-func mustCopy(t *testing.T, tname string, dst io.Writer, src io.Reader) {
- if _, err := io.Copy(dst, src); err != nil {
- t.Fatalf("%s: copy: %v", tname, err)
- }
-}
-
-func mustClose(t *testing.T, tname string, c io.Closer) {
- if err := c.Close(); err != nil {
- t.Fatalf("%s: close: %v", tname, err)
- }
-}
diff --git a/vendor/github.com/cihub/seelog/archive/tar/tar_test.go b/vendor/github.com/cihub/seelog/archive/tar/tar_test.go
deleted file mode 100644
index eeb5b44e4e..0000000000
--- a/vendor/github.com/cihub/seelog/archive/tar/tar_test.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package tar_test
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "os"
- "testing"
-
- "github.com/cihub/seelog/archive/tar"
- "github.com/cihub/seelog/io/iotest"
-)
-
-type file struct {
- name string
- contents []byte
-}
-
-var tarTests = map[string]struct{ want []file }{
- "one file": {
- want: []file{
- {
- name: "file",
- contents: []byte("I am a log file"),
- },
- },
- },
- "multiple files": {
- want: []file{
- {
- name: "file1",
- contents: []byte("I am log file 1"),
- },
- {
- name: "file2",
- contents: []byte("I am log file 2"),
- },
- },
- },
-}
-
-func TestWriterAndReader(t *testing.T) {
- for tname, tt := range tarTests {
- f, cleanup := iotest.TempFile(t)
- defer cleanup()
- writeFiles(t, f, tname, tt.want)
- readFiles(t, f, tname, tt.want)
- }
-}
-
-// writeFiles iterates through the files we want and writes them as a tarred
-// file.
-func writeFiles(t *testing.T, f *os.File, tname string, want []file) {
- w := tar.NewWriter(f)
- defer w.Close()
-
- // Write zipped files
- for _, fwant := range want {
- fi := iotest.FileInfo(t, fwant.contents)
-
- // Write the file
- err := w.NextFile(fwant.name, fi)
- switch err {
- case io.EOF:
- break
- default:
- t.Fatalf("%s: write header for next file: %v", tname, err)
- case nil: // Proceed below
- }
- if _, err := io.Copy(w, bytes.NewReader(fwant.contents)); err != nil {
- t.Fatalf("%s: copy to writer: %v", tname, err)
- }
- }
-}
-
-// readFiles iterates through tarred files and ensures they are the same.
-func readFiles(t *testing.T, f *os.File, tname string, want []file) {
- r := tar.NewReader(f)
-
- for _, fwant := range want {
- fname, err := r.NextFile()
- switch err {
- case io.EOF:
- return
- default:
- t.Fatalf("%s: read header for next file: %v", tname, err)
- case nil: // Proceed below
- }
-
- if fname != fwant.name {
- t.Fatalf("%s: incorrect file name: got %q but want %q", tname, fname, fwant.name)
- continue
- }
-
- gotContents, err := ioutil.ReadAll(r)
- if err != nil {
- t.Fatalf("%s: read file: %v", tname, err)
- }
-
- if !bytes.Equal(gotContents, fwant.contents) {
- t.Errorf("%s: %q = %q but want %q", tname, fname, gotContents, fwant.contents)
- }
- }
-}
diff --git a/vendor/github.com/cihub/seelog/archive/zip/zip_test.go b/vendor/github.com/cihub/seelog/archive/zip/zip_test.go
deleted file mode 100644
index 5bec3dff12..0000000000
--- a/vendor/github.com/cihub/seelog/archive/zip/zip_test.go
+++ /dev/null
@@ -1,99 +0,0 @@
-package zip_test
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "os"
- "testing"
-
- "github.com/cihub/seelog/archive/zip"
- "github.com/cihub/seelog/io/iotest"
-)
-
-var zipTests = map[string]struct{ want map[string][]byte }{
- "one file": {
- want: map[string][]byte{
- "file": []byte("I am a log file"),
- },
- },
- "multiple files": {
- want: map[string][]byte{
- "file1": []byte("I am log file 1"),
- "file2": []byte("I am log file 2"),
- },
- },
-}
-
-func TestWriterAndReader(t *testing.T) {
- for tname, tt := range zipTests {
- f, cleanup := iotest.TempFile(t)
- defer cleanup()
- writeFiles(t, f, tname, tt.want)
- readFiles(t, f, tname, tt.want)
- }
-}
-
-// writeFiles iterates through the files we want and writes them as a zipped
-// file.
-func writeFiles(t *testing.T, f *os.File, tname string, want map[string][]byte) {
- w := zip.NewWriter(f)
- defer w.Close()
-
- // Write zipped files
- for fname, fbytes := range want {
- fi := iotest.FileInfo(t, fbytes)
-
- // Write the file
- err := w.NextFile(fname, fi)
- switch err {
- case io.EOF:
- break
- default:
- t.Fatalf("%s: write header for next file: %v", tname, err)
- case nil: // Proceed below
- }
- if _, err := io.Copy(w, bytes.NewReader(fbytes)); err != nil {
- t.Fatalf("%s: copy to writer: %v", tname, err)
- }
- }
-}
-
-// readFiles iterates through zipped files and ensures they are the same.
-func readFiles(t *testing.T, f *os.File, tname string, want map[string][]byte) {
- // Get zip Reader
- fi, err := f.Stat()
- if err != nil {
- t.Fatalf("%s: stat zipped file: %v", tname, err)
- }
- r, err := zip.NewReader(f, fi.Size())
- if err != nil {
- t.Fatalf("%s: %v", tname, err)
- }
-
- for {
- fname, err := r.NextFile()
- switch err {
- case io.EOF:
- return
- default:
- t.Fatalf("%s: read header for next file: %v", tname, err)
- case nil: // Proceed below
- }
-
- wantBytes, ok := want[fname]
- if !ok {
- t.Errorf("%s: read unwanted file: %v", tname, fname)
- continue
- }
-
- gotBytes, err := ioutil.ReadAll(r)
- if err != nil {
- t.Fatalf("%s: read file: %v", tname, err)
- }
-
- if !bytes.Equal(gotBytes, wantBytes) {
- t.Errorf("%s: %q = %q but want %q", tname, fname, gotBytes, wantBytes)
- }
- }
-}
diff --git a/vendor/github.com/creack/goselect/Dockerfile b/vendor/github.com/creack/goselect/Dockerfile
new file mode 100644
index 0000000000..d03b5a9d9c
--- /dev/null
+++ b/vendor/github.com/creack/goselect/Dockerfile
@@ -0,0 +1,5 @@
+FROM google/golang:stable
+MAINTAINER Guillaume J. Charmes
+CMD /tmp/a.out
+ADD . /src
+RUN cd /src && go build -o /tmp/a.out
diff --git a/vendor/github.com/creack/goselect/LICENSE b/vendor/github.com/creack/goselect/LICENSE
new file mode 100644
index 0000000000..95c600af14
--- /dev/null
+++ b/vendor/github.com/creack/goselect/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Guillaume J. Charmes
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/creack/goselect/README.md b/vendor/github.com/creack/goselect/README.md
new file mode 100644
index 0000000000..d5d06510eb
--- /dev/null
+++ b/vendor/github.com/creack/goselect/README.md
@@ -0,0 +1,30 @@
+# go-select
+
+select(2) implementation in Go
+
+## Supported platforms
+
+| | 386 | amd64 | arm | arm64 |
+|---------------|-----|-------|-----|-------|
+| **linux** | yes | yes | yes | yes |
+| **darwin** | yes | yes | n/a | ?? |
+| **freebsd** | yes | yes | yes | ?? |
+| **openbsd** | yes | yes | yes | ?? |
+| **netbsd** | yes | yes | yes | ?? |
+| **dragonfly** | n/a | yes | n/a | ?? |
+| **solaris** | n/a | no | n/a | ?? |
+| **plan9** | no | no | n/a | ?? |
+| **windows** | yes | yes | n/a | ?? |
+| **android** | n/a | n/a | no | ?? |
+
+*n/a: platform not supported by Go
+
+Go on `plan9` and `solaris` do not implement `syscall.Select` not `syscall.SYS_SELECT`.
+
+## Cross compile
+
+Using davecheney's https://github.com/davecheney/golang-crosscompile
+
+```
+export PLATFORMS="darwin/386 darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm windows/386 windows/amd64 openbsd/386 openbsd/amd64 netbsd/386 netbsd/amd64 dragonfly/amd64 plan9/386 plan9/amd64 solaris/amd64"
+```
diff --git a/vendor/github.com/creack/goselect/fdset.go b/vendor/github.com/creack/goselect/fdset.go
new file mode 100644
index 0000000000..2ff3f6c7a3
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset.go
@@ -0,0 +1,33 @@
+// +build !freebsd,!windows,!plan9
+
+package goselect
+
+import "syscall"
+
+const FD_SETSIZE = syscall.FD_SETSIZE
+
+// FDSet wraps syscall.FdSet with convenience methods
+type FDSet syscall.FdSet
+
+// Set adds the fd to the set
+func (fds *FDSet) Set(fd uintptr) {
+ fds.Bits[fd/NFDBITS] |= (1 << (fd % NFDBITS))
+}
+
+// Clear remove the fd from the set
+func (fds *FDSet) Clear(fd uintptr) {
+ fds.Bits[fd/NFDBITS] &^= (1 << (fd % NFDBITS))
+}
+
+// IsSet check if the given fd is set
+func (fds *FDSet) IsSet(fd uintptr) bool {
+ return fds.Bits[fd/NFDBITS]&(1<<(fd%NFDBITS)) != 0
+}
+
+// Keep a null set to avoid reinstatiation
+var nullFdSet = &FDSet{}
+
+// Zero empties the Set
+func (fds *FDSet) Zero() {
+ copy(fds.Bits[:], (nullFdSet).Bits[:])
+}
diff --git a/vendor/github.com/creack/goselect/fdset_32.go b/vendor/github.com/creack/goselect/fdset_32.go
new file mode 100644
index 0000000000..8b90d21a95
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset_32.go
@@ -0,0 +1,10 @@
+// +build darwin openbsd netbsd 386 arm
+
+package goselect
+
+// darwin, netbsd and openbsd uses uint32 on both amd64 and 386
+
+const (
+ // NFDBITS is the amount of bits per mask
+ NFDBITS = 4 * 8
+)
diff --git a/vendor/github.com/creack/goselect/fdset_64.go b/vendor/github.com/creack/goselect/fdset_64.go
new file mode 100644
index 0000000000..4e032e4ea5
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset_64.go
@@ -0,0 +1,11 @@
+// +build !darwin,!netbsd,!openbsd
+// +build amd64 arm64
+
+package goselect
+
+// darwin, netbsd and openbsd uses uint32 on both amd64 and 386
+
+const (
+ // NFDBITS is the amount of bits per mask
+ NFDBITS = 8 * 8
+)
diff --git a/vendor/github.com/creack/goselect/fdset_doc.go b/vendor/github.com/creack/goselect/fdset_doc.go
new file mode 100644
index 0000000000..d9f15a1cec
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset_doc.go
@@ -0,0 +1,93 @@
+package goselect
+
+/**
+From: XCode's MacOSX10.10.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/select.h
+--
+// darwin/amd64 / 386
+sizeof(__int32_t) == 4
+--
+
+typedef __int32_t __fd_mask;
+
+#define FD_SETSIZE 1024
+#define __NFDBITS (sizeof(__fd_mask) * 8)
+#define __howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1))
+
+typedef struct fd_set {
+ __fd_mask fds_bits[__howmany(__FD_SETSIZE, __NFDBITS)];
+} fd_set;
+
+#define __FD_MASK(n) ((__fd_mask)1 << ((n) % __NFDBITS))
+#define FD_SET(n, p) ((p)->fds_bits[(n)/__NFDBITS] |= __FD_MASK(n))
+#define FD_CLR(n, p) ((p)->fds_bits[(n)/__NFDBITS] &= ~__FD_MASK(n))
+#define FD_ISSET(n, p) (((p)->fds_bits[(n)/__NFDBITS] & __FD_MASK(n)) != 0)
+*/
+
+/**
+From: /usr/include/i386-linux-gnu/sys/select.h
+--
+// linux/i686
+sizeof(long int) == 4
+--
+
+typedef long int __fd_mask;
+
+#define FD_SETSIZE 1024
+#define __NFDBITS (sizeof(__fd_mask) * 8)
+
+
+typedef struct fd_set {
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+} fd_set;
+
+#define __FD_MASK(n) ((__fd_mask)1 << ((n) % __NFDBITS))
+#define FD_SET(n, p) ((p)->fds_bits[(n)/__NFDBITS] |= __FD_MASK(n))
+#define FD_CLR(n, p) ((p)->fds_bits[(n)/__NFDBITS] &= ~__FD_MASK(n))
+#define FD_ISSET(n, p) (((p)->fds_bits[(n)/__NFDBITS] & __FD_MASK(n)) != 0)
+*/
+
+/**
+From: /usr/include/x86_64-linux-gnu/sys/select.h
+--
+// linux/amd64
+sizeof(long int) == 8
+--
+
+typedef long int __fd_mask;
+
+#define FD_SETSIZE 1024
+#define __NFDBITS (sizeof(__fd_mask) * 8)
+
+
+typedef struct fd_set {
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+} fd_set;
+
+#define __FD_MASK(n) ((__fd_mask)1 << ((n) % __NFDBITS))
+#define FD_SET(n, p) ((p)->fds_bits[(n)/__NFDBITS] |= __FD_MASK(n))
+#define FD_CLR(n, p) ((p)->fds_bits[(n)/__NFDBITS] &= ~__FD_MASK(n))
+#define FD_ISSET(n, p) (((p)->fds_bits[(n)/__NFDBITS] & __FD_MASK(n)) != 0)
+*/
+
+/**
+From: /usr/include/sys/select.h
+--
+// freebsd/amd64
+sizeof(unsigned long) == 8
+--
+
+typedef unsigned long __fd_mask;
+
+#define FD_SETSIZE 1024U
+#define __NFDBITS (sizeof(__fd_mask) * 8)
+#define _howmany(x, y) (((x) + ((y) - 1)) / (y))
+
+typedef struct fd_set {
+ __fd_mask fds_bits[_howmany(FD_SETSIZE, __NFDBITS)];
+} fd_set;
+
+#define __FD_MASK(n) ((__fd_mask)1 << ((n) % __NFDBITS))
+#define FD_SET(n, p) ((p)->fds_bits[(n)/__NFDBITS] |= __FD_MASK(n))
+#define FD_CLR(n, p) ((p)->fds_bits[(n)/__NFDBITS] &= ~__FD_MASK(n))
+#define FD_ISSET(n, p) (((p)->fds_bits[(n)/__NFDBITS] & __FD_MASK(n)) != 0)
+*/
diff --git a/vendor/github.com/creack/goselect/fdset_freebsd.go b/vendor/github.com/creack/goselect/fdset_freebsd.go
new file mode 100644
index 0000000000..03f7b9127f
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset_freebsd.go
@@ -0,0 +1,33 @@
+// +build freebsd
+
+package goselect
+
+import "syscall"
+
+const FD_SETSIZE = syscall.FD_SETSIZE
+
+// FDSet wraps syscall.FdSet with convenience methods
+type FDSet syscall.FdSet
+
+// Set adds the fd to the set
+func (fds *FDSet) Set(fd uintptr) {
+ fds.X__fds_bits[fd/NFDBITS] |= (1 << (fd % NFDBITS))
+}
+
+// Clear remove the fd from the set
+func (fds *FDSet) Clear(fd uintptr) {
+ fds.X__fds_bits[fd/NFDBITS] &^= (1 << (fd % NFDBITS))
+}
+
+// IsSet check if the given fd is set
+func (fds *FDSet) IsSet(fd uintptr) bool {
+ return fds.X__fds_bits[fd/NFDBITS]&(1<<(fd%NFDBITS)) != 0
+}
+
+// Keep a null set to avoid reinstatiation
+var nullFdSet = &FDSet{}
+
+// Zero empties the Set
+func (fds *FDSet) Zero() {
+ copy(fds.X__fds_bits[:], (nullFdSet).X__fds_bits[:])
+}
diff --git a/vendor/github.com/creack/goselect/fdset_unsupported.go b/vendor/github.com/creack/goselect/fdset_unsupported.go
new file mode 100644
index 0000000000..cbd8d58802
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset_unsupported.go
@@ -0,0 +1,20 @@
+// +build plan9
+
+package goselect
+
+const FD_SETSIZE = 0
+
+// FDSet wraps syscall.FdSet with convenience methods
+type FDSet struct{}
+
+// Set adds the fd to the set
+func (fds *FDSet) Set(fd uintptr) {}
+
+// Clear remove the fd from the set
+func (fds *FDSet) Clear(fd uintptr) {}
+
+// IsSet check if the given fd is set
+func (fds *FDSet) IsSet(fd uintptr) bool { return false }
+
+// Zero empties the Set
+func (fds *FDSet) Zero() {}
diff --git a/vendor/github.com/creack/goselect/fdset_windows.go b/vendor/github.com/creack/goselect/fdset_windows.go
new file mode 100644
index 0000000000..ee34919753
--- /dev/null
+++ b/vendor/github.com/creack/goselect/fdset_windows.go
@@ -0,0 +1,57 @@
+// +build windows
+
+package goselect
+
+import "syscall"
+
+const FD_SETSIZE = 64
+
+// FDSet extracted from mingw libs source code
+type FDSet struct {
+ fd_count uint
+ fd_array [FD_SETSIZE]uintptr
+}
+
+// Set adds the fd to the set
+func (fds *FDSet) Set(fd uintptr) {
+ var i uint
+ for i = 0; i < fds.fd_count; i++ {
+ if fds.fd_array[i] == fd {
+ break
+ }
+ }
+ if i == fds.fd_count {
+ if fds.fd_count < FD_SETSIZE {
+ fds.fd_array[i] = fd
+ fds.fd_count++
+ }
+ }
+}
+
+// Clear remove the fd from the set
+func (fds *FDSet) Clear(fd uintptr) {
+ var i uint
+ for i = 0; i < fds.fd_count; i++ {
+ if fds.fd_array[i] == fd {
+ for i < fds.fd_count-1 {
+ fds.fd_array[i] = fds.fd_array[i+1]
+ i++
+ }
+ fds.fd_count--
+ break
+ }
+ }
+}
+
+// IsSet check if the given fd is set
+func (fds *FDSet) IsSet(fd uintptr) bool {
+ if isset, err := __WSAFDIsSet(syscall.Handle(fd), fds); err == nil && isset != 0 {
+ return true
+ }
+ return false
+}
+
+// Zero empties the Set
+func (fds *FDSet) Zero() {
+ fds.fd_count = 0
+}
diff --git a/vendor/github.com/creack/goselect/select.go b/vendor/github.com/creack/goselect/select.go
new file mode 100644
index 0000000000..7f2875e736
--- /dev/null
+++ b/vendor/github.com/creack/goselect/select.go
@@ -0,0 +1,28 @@
+package goselect
+
+import (
+ "syscall"
+ "time"
+)
+
+// Select wraps syscall.Select with Go types
+func Select(n int, r, w, e *FDSet, timeout time.Duration) error {
+ var timeval *syscall.Timeval
+ if timeout >= 0 {
+ t := syscall.NsecToTimeval(timeout.Nanoseconds())
+ timeval = &t
+ }
+
+ return sysSelect(n, r, w, e, timeval)
+}
+
+// RetrySelect wraps syscall.Select with Go types, and retries a number of times, with a given retryDelay.
+func RetrySelect(n int, r, w, e *FDSet, timeout time.Duration, retries int, retryDelay time.Duration) (err error) {
+ for i := 0; i < retries; i++ {
+ if err = Select(n, r, w, e, timeout); err != syscall.EINTR {
+ return err
+ }
+ time.Sleep(retryDelay)
+ }
+ return err
+}
diff --git a/vendor/github.com/creack/goselect/select_linux.go b/vendor/github.com/creack/goselect/select_linux.go
new file mode 100644
index 0000000000..acd569e9dd
--- /dev/null
+++ b/vendor/github.com/creack/goselect/select_linux.go
@@ -0,0 +1,10 @@
+// +build linux
+
+package goselect
+
+import "syscall"
+
+func sysSelect(n int, r, w, e *FDSet, timeout *syscall.Timeval) error {
+ _, err := syscall.Select(n, (*syscall.FdSet)(r), (*syscall.FdSet)(w), (*syscall.FdSet)(e), timeout)
+ return err
+}
diff --git a/vendor/github.com/creack/goselect/select_other.go b/vendor/github.com/creack/goselect/select_other.go
new file mode 100644
index 0000000000..6c82081470
--- /dev/null
+++ b/vendor/github.com/creack/goselect/select_other.go
@@ -0,0 +1,9 @@
+// +build !linux,!windows,!plan9,!solaris
+
+package goselect
+
+import "syscall"
+
+func sysSelect(n int, r, w, e *FDSet, timeout *syscall.Timeval) error {
+ return syscall.Select(n, (*syscall.FdSet)(r), (*syscall.FdSet)(w), (*syscall.FdSet)(e), timeout)
+}
diff --git a/vendor/github.com/creack/goselect/select_unsupported.go b/vendor/github.com/creack/goselect/select_unsupported.go
new file mode 100644
index 0000000000..bea0ad94ad
--- /dev/null
+++ b/vendor/github.com/creack/goselect/select_unsupported.go
@@ -0,0 +1,16 @@
+// +build plan9 solaris
+
+package goselect
+
+import (
+ "fmt"
+ "runtime"
+ "syscall"
+)
+
+// ErrUnsupported .
+var ErrUnsupported = fmt.Errorf("Platofrm %s/%s unsupported", runtime.GOOS, runtime.GOARCH)
+
+func sysSelect(n int, r, w, e *FDSet, timeout *syscall.Timeval) error {
+ return ErrUnsupported
+}
diff --git a/vendor/github.com/creack/goselect/select_windows.go b/vendor/github.com/creack/goselect/select_windows.go
new file mode 100644
index 0000000000..0fb70d5d24
--- /dev/null
+++ b/vendor/github.com/creack/goselect/select_windows.go
@@ -0,0 +1,13 @@
+// +build windows
+
+package goselect
+
+import "syscall"
+
+//sys _select(nfds int, readfds *FDSet, writefds *FDSet, exceptfds *FDSet, timeout *syscall.Timeval) (total int, err error) = ws2_32.select
+//sys __WSAFDIsSet(handle syscall.Handle, fdset *FDSet) (isset int, err error) = ws2_32.__WSAFDIsSet
+
+func sysSelect(n int, r, w, e *FDSet, timeout *syscall.Timeval) error {
+ _, err := _select(n, r, w, e, timeout)
+ return err
+}
diff --git a/vendor/github.com/creack/goselect/test_crosscompile.sh b/vendor/github.com/creack/goselect/test_crosscompile.sh
new file mode 100755
index 0000000000..533ca66470
--- /dev/null
+++ b/vendor/github.com/creack/goselect/test_crosscompile.sh
@@ -0,0 +1,17 @@
+export GOOS=linux; export GOARCH=arm; echo $GOOS/$GOARCH; go build
+export GOOS=linux; export GOARCH=arm64; echo $GOOS/$GOARCH; go build
+export GOOS=linux; export GOARCH=amd64; echo $GOOS/$GOARCH; go build
+export GOOS=linux; export GOARCH=386; echo $GOOS/$GOARCH; go build
+export GOOS=darwin; export GOARCH=arm; echo $GOOS/$GOARCH; go build
+export GOOS=darwin; export GOARCH=arm64; echo $GOOS/$GOARCH; go build
+export GOOS=darwin; export GOARCH=amd64; echo $GOOS/$GOARCH; go build
+export GOOS=darwin; export GOARCH=386; echo $GOOS/$GOARCH; go build
+export GOOS=freebsd; export GOARCH=arm; echo $GOOS/$GOARCH; go build
+export GOOS=freebsd; export GOARCH=amd64; echo $GOOS/$GOARCH; go build
+export GOOS=freebsd; export GOARCH=386; echo $GOOS/$GOARCH; go build
+export GOOS=openbsd; export GOARCH=arm; echo $GOOS/$GOARCH; go build
+export GOOS=openbsd; export GOARCH=amd64; echo $GOOS/$GOARCH; go build
+export GOOS=openbsd; export GOARCH=386; echo $GOOS/$GOARCH; go build
+export GOOS=netbsd; export GOARCH=arm; echo $GOOS/$GOARCH; go build
+export GOOS=netbsd; export GOARCH=amd64; echo $GOOS/$GOARCH; go build
+export GOOS=netbsd; export GOARCH=386; echo $GOOS/$GOARCH; go build
diff --git a/vendor/github.com/creack/goselect/zselect_windows.go b/vendor/github.com/creack/goselect/zselect_windows.go
new file mode 100644
index 0000000000..c3b10e1d03
--- /dev/null
+++ b/vendor/github.com/creack/goselect/zselect_windows.go
@@ -0,0 +1,41 @@
+// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT
+
+package goselect
+
+import "unsafe"
+import "syscall"
+
+var _ unsafe.Pointer
+
+var (
+ modws2_32 = syscall.NewLazyDLL("ws2_32.dll")
+
+ procselect = modws2_32.NewProc("select")
+ proc__WSAFDIsSet = modws2_32.NewProc("__WSAFDIsSet")
+)
+
+func _select(nfds int, readfds *FDSet, writefds *FDSet, exceptfds *FDSet, timeout *syscall.Timeval) (total int, err error) {
+ r0, _, e1 := syscall.Syscall6(procselect.Addr(), 5, uintptr(nfds), uintptr(unsafe.Pointer(readfds)), uintptr(unsafe.Pointer(writefds)), uintptr(unsafe.Pointer(exceptfds)), uintptr(unsafe.Pointer(timeout)), 0)
+ total = int(r0)
+ if total == 0 {
+ if e1 != 0 {
+ err = error(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func __WSAFDIsSet(handle syscall.Handle, fdset *FDSet) (isset int, err error) {
+ r0, _, e1 := syscall.Syscall(proc__WSAFDIsSet.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(fdset)), 0)
+ isset = int(r0)
+ if isset == 0 {
+ if e1 != 0 {
+ err = error(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
index 2a7cfd2bf6..c836416192 100644
--- a/vendor/github.com/davecgh/go-spew/LICENSE
+++ b/vendor/github.com/davecgh/go-spew/LICENSE
@@ -1,4 +1,6 @@
-Copyright (c) 2012-2013 Dave Collins
+ISC License
+
+Copyright (c) 2012-2016 Dave Collins
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
index 565bf5899f..8a4a6589a2 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 Dave Collins
+// Copyright (c) 2015-2016 Dave Collins
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -13,9 +13,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine and "-tags disableunsafe"
-// is not added to the go build command line.
-// +build !appengine,!disableunsafe
+// when the code is not running on Google App Engine, compiled by GopherJS, and
+// "-tags safe" is not added to the go build command line. The "disableunsafe"
+// tag is deprecated and thus should not be used.
+// +build !js,!appengine,!safe,!disableunsafe
package spew
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
deleted file mode 100644
index 457e41235e..0000000000
--- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2015 Dave Collins
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when either the code is running on Google App Engine or "-tags disableunsafe"
-// is added to the go build command line.
-// +build appengine disableunsafe
-
-package spew
-
-import "reflect"
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = true
-)
-
-// unsafeReflectValue typically converts the passed reflect.Value into a one
-// that bypasses the typical safety restrictions preventing access to
-// unaddressable and unexported data. However, doing this relies on access to
-// the unsafe package. This is a stub version which simply returns the passed
-// reflect.Value when the unsafe package is not available.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- return v
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
index 14f02dc15b..7c519ff47a 100644
--- a/vendor/github.com/davecgh/go-spew/spew/common.go
+++ b/vendor/github.com/davecgh/go-spew/spew/common.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go
index ee1ab07b3f..2e3d22f312 100644
--- a/vendor/github.com/davecgh/go-spew/spew/config.go
+++ b/vendor/github.com/davecgh/go-spew/spew/config.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -64,9 +64,18 @@ type ConfigState struct {
// inside these interface methods. As a result, this option relies on
// access to the unsafe package, so it will not have any effect when
// running in environments without access to the unsafe package such as
- // Google App Engine or with the "disableunsafe" build tag specified.
+ // Google App Engine or with the "safe" build tag specified.
DisablePointerMethods bool
+ // DisablePointerAddresses specifies whether to disable the printing of
+ // pointer addresses. This is useful when diffing data structures in tests.
+ DisablePointerAddresses bool
+
+ // DisableCapacities specifies whether to disable the printing of capacities
+ // for arrays, slices, maps and channels. This is useful when diffing
+ // data structures in tests.
+ DisableCapacities bool
+
// ContinueOnMethod specifies whether or not recursion should continue once
// a custom error or Stringer interface is invoked. The default, false,
// means it will print the results of invoking the custom error or Stringer
diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go
index 5be0c40609..aacaac6f1e 100644
--- a/vendor/github.com/davecgh/go-spew/spew/doc.go
+++ b/vendor/github.com/davecgh/go-spew/spew/doc.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -91,6 +91,15 @@ The following configuration options are available:
which only accept pointer receivers from non-pointer variables.
Pointer method invocation is enabled by default.
+ * DisablePointerAddresses
+ DisablePointerAddresses specifies whether to disable the printing of
+ pointer addresses. This is useful when diffing data structures in tests.
+
+ * DisableCapacities
+ DisableCapacities specifies whether to disable the printing of
+ capacities for arrays, slices, maps and channels. This is useful when
+ diffing data structures in tests.
+
* ContinueOnMethod
Enables recursion into types after invoking error and Stringer interface
methods. Recursion after method invocation is disabled by default.
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
index a0ff95e27e..df1d582a72 100644
--- a/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dump.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -129,7 +129,7 @@ func (d *dumpState) dumpPtr(v reflect.Value) {
d.w.Write(closeParenBytes)
// Display pointer information.
- if len(pointerChain) > 0 {
+ if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {
d.w.Write(openParenBytes)
for i, addr := range pointerChain {
if i > 0 {
@@ -282,13 +282,13 @@ func (d *dumpState) dump(v reflect.Value) {
case reflect.Map, reflect.String:
valueLen = v.Len()
}
- if valueLen != 0 || valueCap != 0 {
+ if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {
d.w.Write(openParenBytes)
if valueLen != 0 {
d.w.Write(lenEqualsBytes)
printInt(d.w, int64(valueLen), 10)
}
- if valueCap != 0 {
+ if !d.cs.DisableCapacities && valueCap != 0 {
if valueLen != 0 {
d.w.Write(spaceBytes)
}
diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
index ecf3b80e24..c49875bacb 100644
--- a/vendor/github.com/davecgh/go-spew/spew/format.go
+++ b/vendor/github.com/davecgh/go-spew/spew/format.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go
index d8233f542e..32c0e33882 100644
--- a/vendor/github.com/davecgh/go-spew/spew/spew.go
+++ b/vendor/github.com/davecgh/go-spew/spew/spew.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/docker/docker/pkg/jsonlog/jsonlog.go b/vendor/github.com/docker/docker/pkg/jsonlog/jsonlog.go
new file mode 100644
index 0000000000..4734c31119
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/jsonlog/jsonlog.go
@@ -0,0 +1,42 @@
+package jsonlog
+
+import (
+ "encoding/json"
+ "fmt"
+ "time"
+)
+
+// JSONLog represents a log message, typically a single entry from a given log stream.
+// JSONLogs can be easily serialized to and from JSON and support custom formatting.
+type JSONLog struct {
+ // Log is the log message
+ Log string `json:"log,omitempty"`
+ // Stream is the log source
+ Stream string `json:"stream,omitempty"`
+ // Created is the created timestamp of log
+ Created time.Time `json:"time"`
+ // Attrs is the list of extra attributes provided by the user
+ Attrs map[string]string `json:"attrs,omitempty"`
+}
+
+// Format returns the log formatted according to format
+// If format is nil, returns the log message
+// If format is json, returns the log marshaled in json format
+// By default, returns the log with the log time formatted according to format.
+func (jl *JSONLog) Format(format string) (string, error) {
+ if format == "" {
+ return jl.Log, nil
+ }
+ if format == "json" {
+ m, err := json.Marshal(jl)
+ return string(m), err
+ }
+ return fmt.Sprintf("%s %s", jl.Created.Format(format), jl.Log), nil
+}
+
+// Reset resets the log to nil.
+func (jl *JSONLog) Reset() {
+ jl.Log = ""
+ jl.Stream = ""
+ jl.Created = time.Time{}
+}
diff --git a/vendor/github.com/docker/docker/pkg/jsonlog/jsonlog_marshalling.go b/vendor/github.com/docker/docker/pkg/jsonlog/jsonlog_marshalling.go
new file mode 100644
index 0000000000..83ce684a8e
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/jsonlog/jsonlog_marshalling.go
@@ -0,0 +1,178 @@
+// This code was initially generated by ffjson
+// This code was generated via the following steps:
+// $ go get -u github.com/pquerna/ffjson
+// $ make BIND_DIR=. shell
+// $ ffjson pkg/jsonlog/jsonlog.go
+// $ mv pkg/jsonglog/jsonlog_ffjson.go pkg/jsonlog/jsonlog_marshalling.go
+//
+// It has been modified to improve the performance of time marshalling to JSON
+// and to clean it up.
+// Should this code need to be regenerated when the JSONLog struct is changed,
+// the relevant changes which have been made are:
+// import (
+// "bytes"
+//-
+// "unicode/utf8"
+// )
+//
+// func (mj *JSONLog) MarshalJSON() ([]byte, error) {
+//@@ -20,13 +16,13 @@ func (mj *JSONLog) MarshalJSON() ([]byte, error) {
+// }
+// return buf.Bytes(), nil
+// }
+//+
+// func (mj *JSONLog) MarshalJSONBuf(buf *bytes.Buffer) error {
+//- var err error
+//- var obj []byte
+//- var first bool = true
+//- _ = obj
+//- _ = err
+//- _ = first
+//+ var (
+//+ err error
+//+ timestamp string
+//+ first bool = true
+//+ )
+// buf.WriteString(`{`)
+// if len(mj.Log) != 0 {
+// if first == true {
+//@@ -52,11 +48,11 @@ func (mj *JSONLog) MarshalJSONBuf(buf *bytes.Buffer) error {
+// buf.WriteString(`,`)
+// }
+// buf.WriteString(`"time":`)
+//- obj, err = mj.Created.MarshalJSON()
+//+ timestamp, err = FastTimeMarshalJSON(mj.Created)
+// if err != nil {
+// return err
+// }
+//- buf.Write(obj)
+//+ buf.WriteString(timestamp)
+// buf.WriteString(`}`)
+// return nil
+// }
+// @@ -81,9 +81,10 @@ func (mj *JSONLog) MarshalJSONBuf(buf *bytes.Buffer) error {
+// if len(mj.Log) != 0 {
+// - if first == true {
+// - first = false
+// - } else {
+// - buf.WriteString(`,`)
+// - }
+// + first = false
+// buf.WriteString(`"log":`)
+// ffjsonWriteJSONString(buf, mj.Log)
+// }
+
+package jsonlog
+
+import (
+ "bytes"
+ "unicode/utf8"
+)
+
+// MarshalJSON marshals the JSONLog.
+func (mj *JSONLog) MarshalJSON() ([]byte, error) {
+ var buf bytes.Buffer
+ buf.Grow(1024)
+ if err := mj.MarshalJSONBuf(&buf); err != nil {
+ return nil, err
+ }
+ return buf.Bytes(), nil
+}
+
+// MarshalJSONBuf marshals the JSONLog and stores the result to a bytes.Buffer.
+func (mj *JSONLog) MarshalJSONBuf(buf *bytes.Buffer) error {
+ var (
+ err error
+ timestamp string
+ first = true
+ )
+ buf.WriteString(`{`)
+ if len(mj.Log) != 0 {
+ first = false
+ buf.WriteString(`"log":`)
+ ffjsonWriteJSONString(buf, mj.Log)
+ }
+ if len(mj.Stream) != 0 {
+ if first {
+ first = false
+ } else {
+ buf.WriteString(`,`)
+ }
+ buf.WriteString(`"stream":`)
+ ffjsonWriteJSONString(buf, mj.Stream)
+ }
+ if !first {
+ buf.WriteString(`,`)
+ }
+ buf.WriteString(`"time":`)
+ timestamp, err = FastTimeMarshalJSON(mj.Created)
+ if err != nil {
+ return err
+ }
+ buf.WriteString(timestamp)
+ buf.WriteString(`}`)
+ return nil
+}
+
+func ffjsonWriteJSONString(buf *bytes.Buffer, s string) {
+ const hex = "0123456789abcdef"
+
+ buf.WriteByte('"')
+ start := 0
+ for i := 0; i < len(s); {
+ if b := s[i]; b < utf8.RuneSelf {
+ if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
+ i++
+ continue
+ }
+ if start < i {
+ buf.WriteString(s[start:i])
+ }
+ switch b {
+ case '\\', '"':
+ buf.WriteByte('\\')
+ buf.WriteByte(b)
+ case '\n':
+ buf.WriteByte('\\')
+ buf.WriteByte('n')
+ case '\r':
+ buf.WriteByte('\\')
+ buf.WriteByte('r')
+ default:
+
+ buf.WriteString(`\u00`)
+ buf.WriteByte(hex[b>>4])
+ buf.WriteByte(hex[b&0xF])
+ }
+ i++
+ start = i
+ continue
+ }
+ c, size := utf8.DecodeRuneInString(s[i:])
+ if c == utf8.RuneError && size == 1 {
+ if start < i {
+ buf.WriteString(s[start:i])
+ }
+ buf.WriteString(`\ufffd`)
+ i += size
+ start = i
+ continue
+ }
+
+ if c == '\u2028' || c == '\u2029' {
+ if start < i {
+ buf.WriteString(s[start:i])
+ }
+ buf.WriteString(`\u202`)
+ buf.WriteByte(hex[c&0xF])
+ i += size
+ start = i
+ continue
+ }
+ i += size
+ }
+ if start < len(s) {
+ buf.WriteString(s[start:])
+ }
+ buf.WriteByte('"')
+}
diff --git a/vendor/github.com/docker/docker/pkg/jsonlog/jsonlogbytes.go b/vendor/github.com/docker/docker/pkg/jsonlog/jsonlogbytes.go
new file mode 100644
index 0000000000..df522c0d66
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/jsonlog/jsonlogbytes.go
@@ -0,0 +1,122 @@
+package jsonlog
+
+import (
+ "bytes"
+ "encoding/json"
+ "unicode/utf8"
+)
+
+// JSONLogs is based on JSONLog.
+// It allows marshalling JSONLog from Log as []byte
+// and an already marshalled Created timestamp.
+type JSONLogs struct {
+ Log []byte `json:"log,omitempty"`
+ Stream string `json:"stream,omitempty"`
+ Created string `json:"time"`
+
+ // json-encoded bytes
+ RawAttrs json.RawMessage `json:"attrs,omitempty"`
+}
+
+// MarshalJSONBuf is based on the same method from JSONLog
+// It has been modified to take into account the necessary changes.
+func (mj *JSONLogs) MarshalJSONBuf(buf *bytes.Buffer) error {
+ var first = true
+
+ buf.WriteString(`{`)
+ if len(mj.Log) != 0 {
+ first = false
+ buf.WriteString(`"log":`)
+ ffjsonWriteJSONBytesAsString(buf, mj.Log)
+ }
+ if len(mj.Stream) != 0 {
+ if first == true {
+ first = false
+ } else {
+ buf.WriteString(`,`)
+ }
+ buf.WriteString(`"stream":`)
+ ffjsonWriteJSONString(buf, mj.Stream)
+ }
+ if len(mj.RawAttrs) > 0 {
+ if first {
+ first = false
+ } else {
+ buf.WriteString(`,`)
+ }
+ buf.WriteString(`"attrs":`)
+ buf.Write(mj.RawAttrs)
+ }
+ if !first {
+ buf.WriteString(`,`)
+ }
+ buf.WriteString(`"time":`)
+ buf.WriteString(mj.Created)
+ buf.WriteString(`}`)
+ return nil
+}
+
+// This is based on ffjsonWriteJSONBytesAsString. It has been changed
+// to accept a string passed as a slice of bytes.
+func ffjsonWriteJSONBytesAsString(buf *bytes.Buffer, s []byte) {
+ const hex = "0123456789abcdef"
+
+ buf.WriteByte('"')
+ start := 0
+ for i := 0; i < len(s); {
+ if b := s[i]; b < utf8.RuneSelf {
+ if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
+ i++
+ continue
+ }
+ if start < i {
+ buf.Write(s[start:i])
+ }
+ switch b {
+ case '\\', '"':
+ buf.WriteByte('\\')
+ buf.WriteByte(b)
+ case '\n':
+ buf.WriteByte('\\')
+ buf.WriteByte('n')
+ case '\r':
+ buf.WriteByte('\\')
+ buf.WriteByte('r')
+ default:
+
+ buf.WriteString(`\u00`)
+ buf.WriteByte(hex[b>>4])
+ buf.WriteByte(hex[b&0xF])
+ }
+ i++
+ start = i
+ continue
+ }
+ c, size := utf8.DecodeRune(s[i:])
+ if c == utf8.RuneError && size == 1 {
+ if start < i {
+ buf.Write(s[start:i])
+ }
+ buf.WriteString(`\ufffd`)
+ i += size
+ start = i
+ continue
+ }
+
+ if c == '\u2028' || c == '\u2029' {
+ if start < i {
+ buf.Write(s[start:i])
+ }
+ buf.WriteString(`\u202`)
+ buf.WriteByte(hex[c&0xF])
+ i += size
+ start = i
+ continue
+ }
+ i += size
+ }
+ if start < len(s) {
+ buf.Write(s[start:])
+ }
+ buf.WriteByte('"')
+}
diff --git a/vendor/github.com/docker/docker/pkg/jsonlog/time_marshalling.go b/vendor/github.com/docker/docker/pkg/jsonlog/time_marshalling.go
new file mode 100644
index 0000000000..2117338149
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/jsonlog/time_marshalling.go
@@ -0,0 +1,27 @@
+// Package jsonlog provides helper functions to parse and print time (time.Time) as JSON.
+package jsonlog
+
+import (
+ "errors"
+ "time"
+)
+
+const (
+ // RFC3339NanoFixed is our own version of RFC339Nano because we want one
+ // that pads the nano seconds part with zeros to ensure
+ // the timestamps are aligned in the logs.
+ RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00"
+ // JSONFormat is the format used by FastMarshalJSON
+ JSONFormat = `"` + time.RFC3339Nano + `"`
+)
+
+// FastTimeMarshalJSON avoids one of the extra allocations that
+// time.MarshalJSON is making.
+func FastTimeMarshalJSON(t time.Time) (string, error) {
+ if y := t.Year(); y < 0 || y >= 10000 {
+ // RFC 3339 is clear that years are 4 digits exactly.
+ // See golang.org/issue/4556#c15 for more discussion.
+ return "", errors.New("time.MarshalJSON: year outside of range [0,9999]")
+ }
+ return t.Format(JSONFormat), nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go b/vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go
new file mode 100644
index 0000000000..5481433c56
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go
@@ -0,0 +1,225 @@
+package jsonmessage
+
+import (
+ "encoding/json"
+ "fmt"
+ "io"
+ "strings"
+ "time"
+
+ "github.com/docker/docker/pkg/jsonlog"
+ "github.com/docker/docker/pkg/term"
+ "github.com/docker/go-units"
+)
+
+// JSONError wraps a concrete Code and Message, `Code` is
+// is an integer error code, `Message` is the error message.
+type JSONError struct {
+ Code int `json:"code,omitempty"`
+ Message string `json:"message,omitempty"`
+}
+
+func (e *JSONError) Error() string {
+ return e.Message
+}
+
+// JSONProgress describes a Progress. terminalFd is the fd of the current terminal,
+// Start is the initial value for the operation. Current is the current status and
+// value of the progress made towards Total. Total is the end value describing when
+// we made 100% progress for an operation.
+type JSONProgress struct {
+ terminalFd uintptr
+ Current int64 `json:"current,omitempty"`
+ Total int64 `json:"total,omitempty"`
+ Start int64 `json:"start,omitempty"`
+}
+
+func (p *JSONProgress) String() string {
+ var (
+ width = 200
+ pbBox string
+ numbersBox string
+ timeLeftBox string
+ )
+
+ ws, err := term.GetWinsize(p.terminalFd)
+ if err == nil {
+ width = int(ws.Width)
+ }
+
+ if p.Current <= 0 && p.Total <= 0 {
+ return ""
+ }
+ current := units.HumanSize(float64(p.Current))
+ if p.Total <= 0 {
+ return fmt.Sprintf("%8v", current)
+ }
+ total := units.HumanSize(float64(p.Total))
+ percentage := int(float64(p.Current)/float64(p.Total)*100) / 2
+ if percentage > 50 {
+ percentage = 50
+ }
+ if width > 110 {
+ // this number can't be negative gh#7136
+ numSpaces := 0
+ if 50-percentage > 0 {
+ numSpaces = 50 - percentage
+ }
+ pbBox = fmt.Sprintf("[%s>%s] ", strings.Repeat("=", percentage), strings.Repeat(" ", numSpaces))
+ }
+
+ numbersBox = fmt.Sprintf("%8v/%v", current, total)
+
+ if p.Current > p.Total {
+ // remove total display if the reported current is wonky.
+ numbersBox = fmt.Sprintf("%8v", current)
+ }
+
+ if p.Current > 0 && p.Start > 0 && percentage < 50 {
+ fromStart := time.Now().UTC().Sub(time.Unix(p.Start, 0))
+ perEntry := fromStart / time.Duration(p.Current)
+ left := time.Duration(p.Total-p.Current) * perEntry
+ left = (left / time.Second) * time.Second
+
+ if width > 50 {
+ timeLeftBox = " " + left.String()
+ }
+ }
+ return pbBox + numbersBox + timeLeftBox
+}
+
+// JSONMessage defines a message struct. It describes
+// the created time, where it from, status, ID of the
+// message. It's used for docker events.
+type JSONMessage struct {
+ Stream string `json:"stream,omitempty"`
+ Status string `json:"status,omitempty"`
+ Progress *JSONProgress `json:"progressDetail,omitempty"`
+ ProgressMessage string `json:"progress,omitempty"` //deprecated
+ ID string `json:"id,omitempty"`
+ From string `json:"from,omitempty"`
+ Time int64 `json:"time,omitempty"`
+ TimeNano int64 `json:"timeNano,omitempty"`
+ Error *JSONError `json:"errorDetail,omitempty"`
+ ErrorMessage string `json:"error,omitempty"` //deprecated
+ // Aux contains out-of-band data, such as digests for push signing.
+ Aux *json.RawMessage `json:"aux,omitempty"`
+}
+
+// Display displays the JSONMessage to `out`. `isTerminal` describes if `out`
+// is a terminal. If this is the case, it will erase the entire current line
+// when displaying the progressbar.
+func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error {
+ if jm.Error != nil {
+ if jm.Error.Code == 401 {
+ return fmt.Errorf("Authentication is required.")
+ }
+ return jm.Error
+ }
+ var endl string
+ if isTerminal && jm.Stream == "" && jm.Progress != nil {
+ // [2K = erase entire current line
+ fmt.Fprintf(out, "%c[2K\r", 27)
+ endl = "\r"
+ } else if jm.Progress != nil && jm.Progress.String() != "" { //disable progressbar in non-terminal
+ return nil
+ }
+ if jm.TimeNano != 0 {
+ fmt.Fprintf(out, "%s ", time.Unix(0, jm.TimeNano).Format(jsonlog.RFC3339NanoFixed))
+ } else if jm.Time != 0 {
+ fmt.Fprintf(out, "%s ", time.Unix(jm.Time, 0).Format(jsonlog.RFC3339NanoFixed))
+ }
+ if jm.ID != "" {
+ fmt.Fprintf(out, "%s: ", jm.ID)
+ }
+ if jm.From != "" {
+ fmt.Fprintf(out, "(from %s) ", jm.From)
+ }
+ if jm.Progress != nil && isTerminal {
+ fmt.Fprintf(out, "%s %s%s", jm.Status, jm.Progress.String(), endl)
+ } else if jm.ProgressMessage != "" { //deprecated
+ fmt.Fprintf(out, "%s %s%s", jm.Status, jm.ProgressMessage, endl)
+ } else if jm.Stream != "" {
+ fmt.Fprintf(out, "%s%s", jm.Stream, endl)
+ } else {
+ fmt.Fprintf(out, "%s%s\n", jm.Status, endl)
+ }
+ return nil
+}
+
+// DisplayJSONMessagesStream displays a json message stream from `in` to `out`, `isTerminal`
+// describes if `out` is a terminal. If this is the case, it will print `\n` at the end of
+// each line and move the cursor while displaying.
+func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, auxCallback func(*json.RawMessage)) error {
+ var (
+ dec = json.NewDecoder(in)
+ ids = make(map[string]int)
+ )
+ for {
+ diff := 0
+ var jm JSONMessage
+ if err := dec.Decode(&jm); err != nil {
+ if err == io.EOF {
+ break
+ }
+ return err
+ }
+
+ if jm.Aux != nil {
+ if auxCallback != nil {
+ auxCallback(jm.Aux)
+ }
+ continue
+ }
+
+ if jm.Progress != nil {
+ jm.Progress.terminalFd = terminalFd
+ }
+ if jm.ID != "" && (jm.Progress != nil || jm.ProgressMessage != "") {
+ line, ok := ids[jm.ID]
+ if !ok {
+ // NOTE: This approach of using len(id) to
+ // figure out the number of lines of history
+ // only works as long as we clear the history
+ // when we output something that's not
+ // accounted for in the map, such as a line
+ // with no ID.
+ line = len(ids)
+ ids[jm.ID] = line
+ if isTerminal {
+ fmt.Fprintf(out, "\n")
+ }
+ }
+ diff = len(ids) - line
+ if isTerminal && diff > 0 {
+ fmt.Fprintf(out, "%c[%dA", 27, diff)
+ }
+ } else {
+ // When outputting something that isn't progress
+ // output, clear the history of previous lines. We
+ // don't want progress entries from some previous
+ // operation to be updated (for example, pull -a
+ // with multiple tags).
+ ids = make(map[string]int)
+ }
+ err := jm.Display(out, isTerminal)
+ if jm.ID != "" && isTerminal && diff > 0 {
+ fmt.Fprintf(out, "%c[%dB", 27, diff)
+ }
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+type stream interface {
+ io.Writer
+ FD() uintptr
+ IsTerminal() bool
+}
+
+// DisplayJSONMessagesToStream prints json messages to the output stream
+func DisplayJSONMessagesToStream(in io.Reader, stream stream, auxCallback func(*json.RawMessage)) error {
+ return DisplayJSONMessagesStream(in, stream, stream.FD(), stream.IsTerminal(), auxCallback)
+}
diff --git a/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go b/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go
new file mode 100644
index 0000000000..cfb8157d69
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go
@@ -0,0 +1,590 @@
+package namesgenerator
+
+import (
+ "fmt"
+
+ "github.com/docker/docker/pkg/random"
+)
+
+var (
+ left = [...]string{
+ "admiring",
+ "adoring",
+ "affectionate",
+ "agitated",
+ "amazing",
+ "angry",
+ "awesome",
+ "blissful",
+ "boring",
+ "brave",
+ "clever",
+ "cocky",
+ "compassionate",
+ "competent",
+ "condescending",
+ "confident",
+ "cranky",
+ "dazzling",
+ "determined",
+ "distracted",
+ "dreamy",
+ "eager",
+ "ecstatic",
+ "elastic",
+ "elated",
+ "elegant",
+ "eloquent",
+ "epic",
+ "fervent",
+ "festive",
+ "flamboyant",
+ "focused",
+ "friendly",
+ "frosty",
+ "gallant",
+ "gifted",
+ "goofy",
+ "gracious",
+ "happy",
+ "hardcore",
+ "heuristic",
+ "hopeful",
+ "hungry",
+ "infallible",
+ "inspiring",
+ "jolly",
+ "jovial",
+ "keen",
+ "kickass",
+ "kind",
+ "laughing",
+ "loving",
+ "lucid",
+ "mystifying",
+ "modest",
+ "musing",
+ "naughty",
+ "nervous",
+ "nifty",
+ "nostalgic",
+ "objective",
+ "optimistic",
+ "peaceful",
+ "pedantic",
+ "pensive",
+ "practical",
+ "priceless",
+ "quirky",
+ "quizzical",
+ "relaxed",
+ "reverent",
+ "romantic",
+ "sad",
+ "serene",
+ "sharp",
+ "silly",
+ "sleepy",
+ "stoic",
+ "stupefied",
+ "suspicious",
+ "tender",
+ "thirsty",
+ "trusting",
+ "unruffled",
+ "upbeat",
+ "vibrant",
+ "vigilant",
+ "wizardly",
+ "wonderful",
+ "xenodochial",
+ "youthful",
+ "zealous",
+ "zen",
+ }
+
+ // Docker, starting from 0.7.x, generates names from notable scientists and hackers.
+ // Please, for any amazing man that you add to the list, consider adding an equally amazing woman to it, and vice versa.
+ right = [...]string{
+ // Muhammad ibn Jābir al-Ḥarrānī al-Battānī was a founding father of astronomy. https://en.wikipedia.org/wiki/Mu%E1%B8%A5ammad_ibn_J%C4%81bir_al-%E1%B8%A4arr%C4%81n%C4%AB_al-Batt%C4%81n%C4%AB
+ "albattani",
+
+ // Frances E. Allen, became the first female IBM Fellow in 1989. In 2006, she became the first female recipient of the ACM's Turing Award. https://en.wikipedia.org/wiki/Frances_E._Allen
+ "allen",
+
+ // June Almeida - Scottish virologist who took the first pictures of the rubella virus - https://en.wikipedia.org/wiki/June_Almeida
+ "almeida",
+
+ // Maria Gaetana Agnesi - Italian mathematician, philosopher, theologian and humanitarian. She was the first woman to write a mathematics handbook and the first woman appointed as a Mathematics Professor at a University. https://en.wikipedia.org/wiki/Maria_Gaetana_Agnesi
+ "agnesi",
+
+ // Archimedes was a physicist, engineer and mathematician who invented too many things to list them here. https://en.wikipedia.org/wiki/Archimedes
+ "archimedes",
+
+ // Maria Ardinghelli - Italian translator, mathematician and physicist - https://en.wikipedia.org/wiki/Maria_Ardinghelli
+ "ardinghelli",
+
+ // Aryabhata - Ancient Indian mathematician-astronomer during 476-550 CE https://en.wikipedia.org/wiki/Aryabhata
+ "aryabhata",
+
+ // Wanda Austin - Wanda Austin is the President and CEO of The Aerospace Corporation, a leading architect for the US security space programs. https://en.wikipedia.org/wiki/Wanda_Austin
+ "austin",
+
+ // Charles Babbage invented the concept of a programmable computer. https://en.wikipedia.org/wiki/Charles_Babbage.
+ "babbage",
+
+ // Stefan Banach - Polish mathematician, was one of the founders of modern functional analysis. https://en.wikipedia.org/wiki/Stefan_Banach
+ "banach",
+
+ // John Bardeen co-invented the transistor - https://en.wikipedia.org/wiki/John_Bardeen
+ "bardeen",
+
+ // Jean Bartik, born Betty Jean Jennings, was one of the original programmers for the ENIAC computer. https://en.wikipedia.org/wiki/Jean_Bartik
+ "bartik",
+
+ // Laura Bassi, the world's first female professor https://en.wikipedia.org/wiki/Laura_Bassi
+ "bassi",
+
+ // Hugh Beaver, British engineer, founder of the Guinness Book of World Records https://en.wikipedia.org/wiki/Hugh_Beaver
+ "beaver",
+
+ // Alexander Graham Bell - an eminent Scottish-born scientist, inventor, engineer and innovator who is credited with inventing the first practical telephone - https://en.wikipedia.org/wiki/Alexander_Graham_Bell
+ "bell",
+
+ // Homi J Bhabha - was an Indian nuclear physicist, founding director, and professor of physics at the Tata Institute of Fundamental Research. Colloquially known as "father of Indian nuclear programme"- https://en.wikipedia.org/wiki/Homi_J._Bhabha
+ "bhabha",
+
+ // Bhaskara II - Ancient Indian mathematician-astronomer whose work on calculus predates Newton and Leibniz by over half a millennium - https://en.wikipedia.org/wiki/Bh%C4%81skara_II#Calculus
+ "bhaskara",
+
+ // Elizabeth Blackwell - American doctor and first American woman to receive a medical degree - https://en.wikipedia.org/wiki/Elizabeth_Blackwell
+ "blackwell",
+
+ // Niels Bohr is the father of quantum theory. https://en.wikipedia.org/wiki/Niels_Bohr.
+ "bohr",
+
+ // Kathleen Booth, she's credited with writing the first assembly language. https://en.wikipedia.org/wiki/Kathleen_Booth
+ "booth",
+
+ // Anita Borg - Anita Borg was the founding director of the Institute for Women and Technology (IWT). https://en.wikipedia.org/wiki/Anita_Borg
+ "borg",
+
+ // Satyendra Nath Bose - He provided the foundation for Bose–Einstein statistics and the theory of the Bose–Einstein condensate. - https://en.wikipedia.org/wiki/Satyendra_Nath_Bose
+ "bose",
+
+ // Evelyn Boyd Granville - She was one of the first African-American woman to receive a Ph.D. in mathematics; she earned it in 1949 from Yale University. https://en.wikipedia.org/wiki/Evelyn_Boyd_Granville
+ "boyd",
+
+ // Brahmagupta - Ancient Indian mathematician during 598-670 CE who gave rules to compute with zero - https://en.wikipedia.org/wiki/Brahmagupta#Zero
+ "brahmagupta",
+
+ // Walter Houser Brattain co-invented the transistor - https://en.wikipedia.org/wiki/Walter_Houser_Brattain
+ "brattain",
+
+ // Emmett Brown invented time travel. https://en.wikipedia.org/wiki/Emmett_Brown (thanks Brian Goff)
+ "brown",
+
+ // Rachel Carson - American marine biologist and conservationist, her book Silent Spring and other writings are credited with advancing the global environmental movement. https://en.wikipedia.org/wiki/Rachel_Carson
+ "carson",
+
+ // Subrahmanyan Chandrasekhar - Astrophysicist known for his mathematical theory on different stages and evolution in structures of the stars. He has won nobel prize for physics - https://en.wikipedia.org/wiki/Subrahmanyan_Chandrasekhar
+ "chandrasekhar",
+
+ //Claude Shannon - The father of information theory and founder of digital circuit design theory. (https://en.wikipedia.org/wiki/Claude_Shannon)
+ "shannon",
+
+ // Joan Clarke - Bletchley Park code breaker during the Second World War who pioneered techniques that remained top secret for decades. Also an accomplished numismatist https://en.wikipedia.org/wiki/Joan_Clarke
+ "clarke",
+
+ // Jane Colden - American botanist widely considered the first female American botanist - https://en.wikipedia.org/wiki/Jane_Colden
+ "colden",
+
+ // Gerty Theresa Cori - American biochemist who became the third woman—and first American woman—to win a Nobel Prize in science, and the first woman to be awarded the Nobel Prize in Physiology or Medicine. Cori was born in Prague. https://en.wikipedia.org/wiki/Gerty_Cori
+ "cori",
+
+ // Seymour Roger Cray was an American electrical engineer and supercomputer architect who designed a series of computers that were the fastest in the world for decades. https://en.wikipedia.org/wiki/Seymour_Cray
+ "cray",
+
+ // This entry reflects a husband and wife team who worked together:
+ // Joan Curran was a Welsh scientist who developed radar and invented chaff, a radar countermeasure. https://en.wikipedia.org/wiki/Joan_Curran
+ // Samuel Curran was an Irish physicist who worked alongside his wife during WWII and invented the proximity fuse. https://en.wikipedia.org/wiki/Samuel_Curran
+ "curran",
+
+ // Marie Curie discovered radioactivity. https://en.wikipedia.org/wiki/Marie_Curie.
+ "curie",
+
+ // Charles Darwin established the principles of natural evolution. https://en.wikipedia.org/wiki/Charles_Darwin.
+ "darwin",
+
+ // Leonardo Da Vinci invented too many things to list here. https://en.wikipedia.org/wiki/Leonardo_da_Vinci.
+ "davinci",
+
+ // Edsger Wybe Dijkstra was a Dutch computer scientist and mathematical scientist. https://en.wikipedia.org/wiki/Edsger_W._Dijkstra.
+ "dijkstra",
+
+ // Donna Dubinsky - played an integral role in the development of personal digital assistants (PDAs) serving as CEO of Palm, Inc. and co-founding Handspring. https://en.wikipedia.org/wiki/Donna_Dubinsky
+ "dubinsky",
+
+ // Annie Easley - She was a leading member of the team which developed software for the Centaur rocket stage and one of the first African-Americans in her field. https://en.wikipedia.org/wiki/Annie_Easley
+ "easley",
+
+ // Thomas Alva Edison, prolific inventor https://en.wikipedia.org/wiki/Thomas_Edison
+ "edison",
+
+ // Albert Einstein invented the general theory of relativity. https://en.wikipedia.org/wiki/Albert_Einstein
+ "einstein",
+
+ // Gertrude Elion - American biochemist, pharmacologist and the 1988 recipient of the Nobel Prize in Medicine - https://en.wikipedia.org/wiki/Gertrude_Elion
+ "elion",
+
+ // Douglas Engelbart gave the mother of all demos: https://en.wikipedia.org/wiki/Douglas_Engelbart
+ "engelbart",
+
+ // Euclid invented geometry. https://en.wikipedia.org/wiki/Euclid
+ "euclid",
+
+ // Leonhard Euler invented large parts of modern mathematics. https://de.wikipedia.org/wiki/Leonhard_Euler
+ "euler",
+
+ // Pierre de Fermat pioneered several aspects of modern mathematics. https://en.wikipedia.org/wiki/Pierre_de_Fermat
+ "fermat",
+
+ // Enrico Fermi invented the first nuclear reactor. https://en.wikipedia.org/wiki/Enrico_Fermi.
+ "fermi",
+
+ // Richard Feynman was a key contributor to quantum mechanics and particle physics. https://en.wikipedia.org/wiki/Richard_Feynman
+ "feynman",
+
+ // Benjamin Franklin is famous for his experiments in electricity and the invention of the lightning rod.
+ "franklin",
+
+ // Galileo was a founding father of modern astronomy, and faced politics and obscurantism to establish scientific truth. https://en.wikipedia.org/wiki/Galileo_Galilei
+ "galileo",
+
+ // William Henry "Bill" Gates III is an American business magnate, philanthropist, investor, computer programmer, and inventor. https://en.wikipedia.org/wiki/Bill_Gates
+ "gates",
+
+ // Adele Goldberg, was one of the designers and developers of the Smalltalk language. https://en.wikipedia.org/wiki/Adele_Goldberg_(computer_scientist)
+ "goldberg",
+
+ // Adele Goldstine, born Adele Katz, wrote the complete technical description for the first electronic digital computer, ENIAC. https://en.wikipedia.org/wiki/Adele_Goldstine
+ "goldstine",
+
+ // Shafi Goldwasser is a computer scientist known for creating theoretical foundations of modern cryptography. Winner of 2012 ACM Turing Award. https://en.wikipedia.org/wiki/Shafi_Goldwasser
+ "goldwasser",
+
+ // James Golick, all around gangster.
+ "golick",
+
+ // Jane Goodall - British primatologist, ethologist, and anthropologist who is considered to be the world's foremost expert on chimpanzees - https://en.wikipedia.org/wiki/Jane_Goodall
+ "goodall",
+
+ // Lois Haibt - American computer scientist, part of the team at IBM that developed FORTRAN - https://en.wikipedia.org/wiki/Lois_Haibt
+ "haibt",
+
+ // Margaret Hamilton - Director of the Software Engineering Division of the MIT Instrumentation Laboratory, which developed on-board flight software for the Apollo space program. https://en.wikipedia.org/wiki/Margaret_Hamilton_(scientist)
+ "hamilton",
+
+ // Stephen Hawking pioneered the field of cosmology by combining general relativity and quantum mechanics. https://en.wikipedia.org/wiki/Stephen_Hawking
+ "hawking",
+
+ // Werner Heisenberg was a founding father of quantum mechanics. https://en.wikipedia.org/wiki/Werner_Heisenberg
+ "heisenberg",
+
+ // Jaroslav Heyrovský was the inventor of the polarographic method, father of the electroanalytical method, and recipient of the Nobel Prize in 1959. His main field of work was polarography. https://en.wikipedia.org/wiki/Jaroslav_Heyrovsk%C3%BD
+ "heyrovsky",
+
+ // Dorothy Hodgkin was a British biochemist, credited with the development of protein crystallography. She was awarded the Nobel Prize in Chemistry in 1964. https://en.wikipedia.org/wiki/Dorothy_Hodgkin
+ "hodgkin",
+
+ // Erna Schneider Hoover revolutionized modern communication by inventing a computerized telephone switching method. https://en.wikipedia.org/wiki/Erna_Schneider_Hoover
+ "hoover",
+
+ // Grace Hopper developed the first compiler for a computer programming language and is credited with popularizing the term "debugging" for fixing computer glitches. https://en.wikipedia.org/wiki/Grace_Hopper
+ "hopper",
+
+ // Frances Hugle, she was an American scientist, engineer, and inventor who contributed to the understanding of semiconductors, integrated circuitry, and the unique electrical principles of microscopic materials. https://en.wikipedia.org/wiki/Frances_Hugle
+ "hugle",
+
+ // Hypatia - Greek Alexandrine Neoplatonist philosopher in Egypt who was one of the earliest mothers of mathematics - https://en.wikipedia.org/wiki/Hypatia
+ "hypatia",
+
+ // Yeong-Sil Jang was a Korean scientist and astronomer during the Joseon Dynasty; he invented the first metal printing press and water gauge. https://en.wikipedia.org/wiki/Jang_Yeong-sil
+ "jang",
+
+ // Betty Jennings - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Jean_Bartik
+ "jennings",
+
+ // Mary Lou Jepsen, was the founder and chief technology officer of One Laptop Per Child (OLPC), and the founder of Pixel Qi. https://en.wikipedia.org/wiki/Mary_Lou_Jepsen
+ "jepsen",
+
+ // Irène Joliot-Curie - French scientist who was awarded the Nobel Prize for Chemistry in 1935. Daughter of Marie and Pierre Curie. https://en.wikipedia.org/wiki/Ir%C3%A8ne_Joliot-Curie
+ "joliot",
+
+ // Karen Spärck Jones came up with the concept of inverse document frequency, which is used in most search engines today. https://en.wikipedia.org/wiki/Karen_Sp%C3%A4rck_Jones
+ "jones",
+
+ // A. P. J. Abdul Kalam - is an Indian scientist aka Missile Man of India for his work on the development of ballistic missile and launch vehicle technology - https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam
+ "kalam",
+
+ // Susan Kare, created the icons and many of the interface elements for the original Apple Macintosh in the 1980s, and was an original employee of NeXT, working as the Creative Director. https://en.wikipedia.org/wiki/Susan_Kare
+ "kare",
+
+ // Mary Kenneth Keller, Sister Mary Kenneth Keller became the first American woman to earn a PhD in Computer Science in 1965. https://en.wikipedia.org/wiki/Mary_Kenneth_Keller
+ "keller",
+
+ // Har Gobind Khorana - Indian-American biochemist who shared the 1968 Nobel Prize for Physiology - https://en.wikipedia.org/wiki/Har_Gobind_Khorana
+ "khorana",
+
+ // Jack Kilby invented silicone integrated circuits and gave Silicon Valley its name. - https://en.wikipedia.org/wiki/Jack_Kilby
+ "kilby",
+
+ // Maria Kirch - German astronomer and first woman to discover a comet - https://en.wikipedia.org/wiki/Maria_Margarethe_Kirch
+ "kirch",
+
+ // Donald Knuth - American computer scientist, author of "The Art of Computer Programming" and creator of the TeX typesetting system. https://en.wikipedia.org/wiki/Donald_Knuth
+ "knuth",
+
+ // Sophie Kowalevski - Russian mathematician responsible for important original contributions to analysis, differential equations and mechanics - https://en.wikipedia.org/wiki/Sofia_Kovalevskaya
+ "kowalevski",
+
+ // Marie-Jeanne de Lalande - French astronomer, mathematician and cataloguer of stars - https://en.wikipedia.org/wiki/Marie-Jeanne_de_Lalande
+ "lalande",
+
+ // Hedy Lamarr - Actress and inventor. The principles of her work are now incorporated into modern Wi-Fi, CDMA and Bluetooth technology. https://en.wikipedia.org/wiki/Hedy_Lamarr
+ "lamarr",
+
+ // Leslie B. Lamport - American computer scientist. Lamport is best known for his seminal work in distributed systems and was the winner of the 2013 Turing Award. https://en.wikipedia.org/wiki/Leslie_Lamport
+ "lamport",
+
+ // Mary Leakey - British paleoanthropologist who discovered the first fossilized Proconsul skull - https://en.wikipedia.org/wiki/Mary_Leakey
+ "leakey",
+
+ // Henrietta Swan Leavitt - she was an American astronomer who discovered the relation between the luminosity and the period of Cepheid variable stars. https://en.wikipedia.org/wiki/Henrietta_Swan_Leavitt
+ "leavitt",
+
+ //Daniel Lewin - Mathematician, Akamai co-founder, soldier, 9/11 victim-- Developed optimization techniques for routing traffic on the internet. Died attempting to stop the 9-11 hijackers. https://en.wikipedia.org/wiki/Daniel_Lewin
+ "lewin",
+
+ // Ruth Lichterman - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Ruth_Teitelbaum
+ "lichterman",
+
+ // Barbara Liskov - co-developed the Liskov substitution principle. Liskov was also the winner of the Turing Prize in 2008. - https://en.wikipedia.org/wiki/Barbara_Liskov
+ "liskov",
+
+ // Ada Lovelace invented the first algorithm. https://en.wikipedia.org/wiki/Ada_Lovelace (thanks James Turnbull)
+ "lovelace",
+
+ // Auguste and Louis Lumière - the first filmmakers in history - https://en.wikipedia.org/wiki/Auguste_and_Louis_Lumi%C3%A8re
+ "lumiere",
+
+ // Mahavira - Ancient Indian mathematician during 9th century AD who discovered basic algebraic identities - https://en.wikipedia.org/wiki/Mah%C4%81v%C4%ABra_(mathematician)
+ "mahavira",
+
+ // Maria Mayer - American theoretical physicist and Nobel laureate in Physics for proposing the nuclear shell model of the atomic nucleus - https://en.wikipedia.org/wiki/Maria_Mayer
+ "mayer",
+
+ // John McCarthy invented LISP: https://en.wikipedia.org/wiki/John_McCarthy_(computer_scientist)
+ "mccarthy",
+
+ // Barbara McClintock - a distinguished American cytogeneticist, 1983 Nobel Laureate in Physiology or Medicine for discovering transposons. https://en.wikipedia.org/wiki/Barbara_McClintock
+ "mcclintock",
+
+ // Malcolm McLean invented the modern shipping container: https://en.wikipedia.org/wiki/Malcom_McLean
+ "mclean",
+
+ // Kay McNulty - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Kathleen_Antonelli
+ "mcnulty",
+
+ // Lise Meitner - Austrian/Swedish physicist who was involved in the discovery of nuclear fission. The element meitnerium is named after her - https://en.wikipedia.org/wiki/Lise_Meitner
+ "meitner",
+
+ // Carla Meninsky, was the game designer and programmer for Atari 2600 games Dodge 'Em and Warlords. https://en.wikipedia.org/wiki/Carla_Meninsky
+ "meninsky",
+
+ // Johanna Mestorf - German prehistoric archaeologist and first female museum director in Germany - https://en.wikipedia.org/wiki/Johanna_Mestorf
+ "mestorf",
+
+ // Marvin Minsky - Pioneer in Artificial Intelligence, co-founder of the MIT's AI Lab, won the Turing Award in 1969. https://en.wikipedia.org/wiki/Marvin_Minsky
+ "minsky",
+
+ // Maryam Mirzakhani - an Iranian mathematician and the first woman to win the Fields Medal. https://en.wikipedia.org/wiki/Maryam_Mirzakhani
+ "mirzakhani",
+
+ // Samuel Morse - contributed to the invention of a single-wire telegraph system based on European telegraphs and was a co-developer of the Morse code - https://en.wikipedia.org/wiki/Samuel_Morse
+ "morse",
+
+ // Ian Murdock - founder of the Debian project - https://en.wikipedia.org/wiki/Ian_Murdock
+ "murdock",
+
+ // Isaac Newton invented classic mechanics and modern optics. https://en.wikipedia.org/wiki/Isaac_Newton
+ "newton",
+
+ // Florence Nightingale, more prominently known as a nurse, was also the first female member of the Royal Statistical Society and a pioneer in statistical graphics https://en.wikipedia.org/wiki/Florence_Nightingale#Statistics_and_sanitary_reform
+ "nightingale",
+
+ // Alfred Nobel - a Swedish chemist, engineer, innovator, and armaments manufacturer (inventor of dynamite) - https://en.wikipedia.org/wiki/Alfred_Nobel
+ "nobel",
+
+ // Emmy Noether, German mathematician. Noether's Theorem is named after her. https://en.wikipedia.org/wiki/Emmy_Noether
+ "noether",
+
+ // Poppy Northcutt. Poppy Northcutt was the first woman to work as part of NASA’s Mission Control. http://www.businessinsider.com/poppy-northcutt-helped-apollo-astronauts-2014-12?op=1
+ "northcutt",
+
+ // Robert Noyce invented silicone integrated circuits and gave Silicon Valley its name. - https://en.wikipedia.org/wiki/Robert_Noyce
+ "noyce",
+
+ // Panini - Ancient Indian linguist and grammarian from 4th century CE who worked on the world's first formal system - https://en.wikipedia.org/wiki/P%C4%81%E1%B9%87ini#Comparison_with_modern_formal_systems
+ "panini",
+
+ // Ambroise Pare invented modern surgery. https://en.wikipedia.org/wiki/Ambroise_Par%C3%A9
+ "pare",
+
+ // Louis Pasteur discovered vaccination, fermentation and pasteurization. https://en.wikipedia.org/wiki/Louis_Pasteur.
+ "pasteur",
+
+ // Cecilia Payne-Gaposchkin was an astronomer and astrophysicist who, in 1925, proposed in her Ph.D. thesis an explanation for the composition of stars in terms of the relative abundances of hydrogen and helium. https://en.wikipedia.org/wiki/Cecilia_Payne-Gaposchkin
+ "payne",
+
+ // Radia Perlman is a software designer and network engineer and most famous for her invention of the spanning-tree protocol (STP). https://en.wikipedia.org/wiki/Radia_Perlman
+ "perlman",
+
+ // Rob Pike was a key contributor to Unix, Plan 9, the X graphic system, utf-8, and the Go programming language. https://en.wikipedia.org/wiki/Rob_Pike
+ "pike",
+
+ // Henri Poincaré made fundamental contributions in several fields of mathematics. https://en.wikipedia.org/wiki/Henri_Poincar%C3%A9
+ "poincare",
+
+ // Laura Poitras is a director and producer whose work, made possible by open source crypto tools, advances the causes of truth and freedom of information by reporting disclosures by whistleblowers such as Edward Snowden. https://en.wikipedia.org/wiki/Laura_Poitras
+ "poitras",
+
+ // Claudius Ptolemy - a Greco-Egyptian writer of Alexandria, known as a mathematician, astronomer, geographer, astrologer, and poet of a single epigram in the Greek Anthology - https://en.wikipedia.org/wiki/Ptolemy
+ "ptolemy",
+
+ // C. V. Raman - Indian physicist who won the Nobel Prize in 1930 for proposing the Raman effect. - https://en.wikipedia.org/wiki/C._V._Raman
+ "raman",
+
+ // Srinivasa Ramanujan - Indian mathematician and autodidact who made extraordinary contributions to mathematical analysis, number theory, infinite series, and continued fractions. - https://en.wikipedia.org/wiki/Srinivasa_Ramanujan
+ "ramanujan",
+
+ // Sally Kristen Ride was an American physicist and astronaut. She was the first American woman in space, and the youngest American astronaut. https://en.wikipedia.org/wiki/Sally_Ride
+ "ride",
+
+ // Rita Levi-Montalcini - Won Nobel Prize in Physiology or Medicine jointly with colleague Stanley Cohen for the discovery of nerve growth factor (https://en.wikipedia.org/wiki/Rita_Levi-Montalcini)
+ "montalcini",
+
+ // Dennis Ritchie - co-creator of UNIX and the C programming language. - https://en.wikipedia.org/wiki/Dennis_Ritchie
+ "ritchie",
+
+ // Wilhelm Conrad Röntgen - German physicist who was awarded the first Nobel Prize in Physics in 1901 for the discovery of X-rays (Röntgen rays). https://en.wikipedia.org/wiki/Wilhelm_R%C3%B6ntgen
+ "roentgen",
+
+ // Rosalind Franklin - British biophysicist and X-ray crystallographer whose research was critical to the understanding of DNA - https://en.wikipedia.org/wiki/Rosalind_Franklin
+ "rosalind",
+
+ // Meghnad Saha - Indian astrophysicist best known for his development of the Saha equation, used to describe chemical and physical conditions in stars - https://en.wikipedia.org/wiki/Meghnad_Saha
+ "saha",
+
+ // Jean E. Sammet developed FORMAC, the first widely used computer language for symbolic manipulation of mathematical formulas. https://en.wikipedia.org/wiki/Jean_E._Sammet
+ "sammet",
+
+ // Carol Shaw - Originally an Atari employee, Carol Shaw is said to be the first female video game designer. https://en.wikipedia.org/wiki/Carol_Shaw_(video_game_designer)
+ "shaw",
+
+ // Dame Stephanie "Steve" Shirley - Founded a software company in 1962 employing women working from home. https://en.wikipedia.org/wiki/Steve_Shirley
+ "shirley",
+
+ // William Shockley co-invented the transistor - https://en.wikipedia.org/wiki/William_Shockley
+ "shockley",
+
+ // Françoise Barré-Sinoussi - French virologist and Nobel Prize Laureate in Physiology or Medicine; her work was fundamental in identifying HIV as the cause of AIDS. https://en.wikipedia.org/wiki/Fran%C3%A7oise_Barr%C3%A9-Sinoussi
+ "sinoussi",
+
+ // Betty Snyder - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Betty_Holberton
+ "snyder",
+
+ // Frances Spence - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Frances_Spence
+ "spence",
+
+ // Richard Matthew Stallman - the founder of the Free Software movement, the GNU project, the Free Software Foundation, and the League for Programming Freedom. He also invented the concept of copyleft to protect the ideals of this movement, and enshrined this concept in the widely-used GPL (General Public License) for software. https://en.wikiquote.org/wiki/Richard_Stallman
+ "stallman",
+
+ // Michael Stonebraker is a database research pioneer and architect of Ingres, Postgres, VoltDB and SciDB. Winner of 2014 ACM Turing Award. https://en.wikipedia.org/wiki/Michael_Stonebraker
+ "stonebraker",
+
+ // Janese Swanson (with others) developed the first of the Carmen Sandiego games. She went on to found Girl Tech. https://en.wikipedia.org/wiki/Janese_Swanson
+ "swanson",
+
+ // Aaron Swartz was influential in creating RSS, Markdown, Creative Commons, Reddit, and much of the internet as we know it today. He was devoted to freedom of information on the web. https://en.wikiquote.org/wiki/Aaron_Swartz
+ "swartz",
+
+ // Bertha Swirles was a theoretical physicist who made a number of contributions to early quantum theory. https://en.wikipedia.org/wiki/Bertha_Swirles
+ "swirles",
+
+ // Nikola Tesla invented the AC electric system and every gadget ever used by a James Bond villain. https://en.wikipedia.org/wiki/Nikola_Tesla
+ "tesla",
+
+ // Ken Thompson - co-creator of UNIX and the C programming language - https://en.wikipedia.org/wiki/Ken_Thompson
+ "thompson",
+
+ // Linus Torvalds invented Linux and Git. https://en.wikipedia.org/wiki/Linus_Torvalds
+ "torvalds",
+
+ // Alan Turing was a founding father of computer science. https://en.wikipedia.org/wiki/Alan_Turing.
+ "turing",
+
+ // Varahamihira - Ancient Indian mathematician who discovered trigonometric formulae during 505-587 CE - https://en.wikipedia.org/wiki/Var%C4%81hamihira#Contributions
+ "varahamihira",
+
+ // Sir Mokshagundam Visvesvaraya - is a notable Indian engineer. He is a recipient of the Indian Republic's highest honour, the Bharat Ratna, in 1955. On his birthday, 15 September is celebrated as Engineer's Day in India in his memory - https://en.wikipedia.org/wiki/Visvesvaraya
+ "visvesvaraya",
+
+ // Christiane Nüsslein-Volhard - German biologist, won Nobel Prize in Physiology or Medicine in 1995 for research on the genetic control of embryonic development. https://en.wikipedia.org/wiki/Christiane_N%C3%BCsslein-Volhard
+ "volhard",
+
+ // Marlyn Wescoff - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Marlyn_Meltzer
+ "wescoff",
+
+ // Andrew Wiles - Notable British mathematician who proved the enigmatic Fermat's Last Theorem - https://en.wikipedia.org/wiki/Andrew_Wiles
+ "wiles",
+
+ // Roberta Williams, did pioneering work in graphical adventure games for personal computers, particularly the King's Quest series. https://en.wikipedia.org/wiki/Roberta_Williams
+ "williams",
+
+ // Sophie Wilson designed the first Acorn Micro-Computer and the instruction set for ARM processors. https://en.wikipedia.org/wiki/Sophie_Wilson
+ "wilson",
+
+ // Jeannette Wing - co-developed the Liskov substitution principle. - https://en.wikipedia.org/wiki/Jeannette_Wing
+ "wing",
+
+ // Steve Wozniak invented the Apple I and Apple II. https://en.wikipedia.org/wiki/Steve_Wozniak
+ "wozniak",
+
+ // The Wright brothers, Orville and Wilbur - credited with inventing and building the world's first successful airplane and making the first controlled, powered and sustained heavier-than-air human flight - https://en.wikipedia.org/wiki/Wright_brothers
+ "wright",
+
+ // Rosalyn Sussman Yalow - Rosalyn Sussman Yalow was an American medical physicist, and a co-winner of the 1977 Nobel Prize in Physiology or Medicine for development of the radioimmunoassay technique. https://en.wikipedia.org/wiki/Rosalyn_Sussman_Yalow
+ "yalow",
+
+ // Ada Yonath - an Israeli crystallographer, the first woman from the Middle East to win a Nobel prize in the sciences. https://en.wikipedia.org/wiki/Ada_Yonath
+ "yonath",
+ }
+)
+
+// GetRandomName generates a random name from the list of adjectives and surnames in this package
+// formatted as "adjective_surname". For example 'focused_turing'. If retry is non-zero, a random
+// integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3`
+func GetRandomName(retry int) string {
+ rnd := random.Rand
+begin:
+ name := fmt.Sprintf("%s_%s", left[rnd.Intn(len(left))], right[rnd.Intn(len(right))])
+ if name == "boring_wozniak" /* Steve Wozniak is not boring */ {
+ goto begin
+ }
+
+ if retry > 0 {
+ name = fmt.Sprintf("%s%d", name, rnd.Intn(10))
+ }
+ return name
+}
diff --git a/vendor/github.com/docker/docker/pkg/random/random.go b/vendor/github.com/docker/docker/pkg/random/random.go
new file mode 100644
index 0000000000..70de4d1304
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/random/random.go
@@ -0,0 +1,71 @@
+package random
+
+import (
+ cryptorand "crypto/rand"
+ "io"
+ "math"
+ "math/big"
+ "math/rand"
+ "sync"
+ "time"
+)
+
+// Rand is a global *rand.Rand instance, which initialized with NewSource() source.
+var Rand = rand.New(NewSource())
+
+// Reader is a global, shared instance of a pseudorandom bytes generator.
+// It doesn't consume entropy.
+var Reader io.Reader = &reader{rnd: Rand}
+
+// copypaste from standard math/rand
+type lockedSource struct {
+ lk sync.Mutex
+ src rand.Source
+}
+
+func (r *lockedSource) Int63() (n int64) {
+ r.lk.Lock()
+ n = r.src.Int63()
+ r.lk.Unlock()
+ return
+}
+
+func (r *lockedSource) Seed(seed int64) {
+ r.lk.Lock()
+ r.src.Seed(seed)
+ r.lk.Unlock()
+}
+
+// NewSource returns math/rand.Source safe for concurrent use and initialized
+// with current unix-nano timestamp
+func NewSource() rand.Source {
+ var seed int64
+ if cryptoseed, err := cryptorand.Int(cryptorand.Reader, big.NewInt(math.MaxInt64)); err != nil {
+ // This should not happen, but worst-case fallback to time-based seed.
+ seed = time.Now().UnixNano()
+ } else {
+ seed = cryptoseed.Int64()
+ }
+ return &lockedSource{
+ src: rand.NewSource(seed),
+ }
+}
+
+type reader struct {
+ rnd *rand.Rand
+}
+
+func (r *reader) Read(b []byte) (int, error) {
+ i := 0
+ for {
+ val := r.rnd.Int63()
+ for val > 0 {
+ b[i] = byte(val)
+ i++
+ if i == len(b) {
+ return i, nil
+ }
+ val >>= 8
+ }
+ }
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/ascii.go b/vendor/github.com/docker/docker/pkg/term/ascii.go
new file mode 100644
index 0000000000..f5262bccf5
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/ascii.go
@@ -0,0 +1,66 @@
+package term
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ASCII list the possible supported ASCII key sequence
+var ASCII = []string{
+ "ctrl-@",
+ "ctrl-a",
+ "ctrl-b",
+ "ctrl-c",
+ "ctrl-d",
+ "ctrl-e",
+ "ctrl-f",
+ "ctrl-g",
+ "ctrl-h",
+ "ctrl-i",
+ "ctrl-j",
+ "ctrl-k",
+ "ctrl-l",
+ "ctrl-m",
+ "ctrl-n",
+ "ctrl-o",
+ "ctrl-p",
+ "ctrl-q",
+ "ctrl-r",
+ "ctrl-s",
+ "ctrl-t",
+ "ctrl-u",
+ "ctrl-v",
+ "ctrl-w",
+ "ctrl-x",
+ "ctrl-y",
+ "ctrl-z",
+ "ctrl-[",
+ "ctrl-\\",
+ "ctrl-]",
+ "ctrl-^",
+ "ctrl-_",
+}
+
+// ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code.
+func ToBytes(keys string) ([]byte, error) {
+ codes := []byte{}
+next:
+ for _, key := range strings.Split(keys, ",") {
+ if len(key) != 1 {
+ for code, ctrl := range ASCII {
+ if ctrl == key {
+ codes = append(codes, byte(code))
+ continue next
+ }
+ }
+ if key == "DEL" {
+ codes = append(codes, 127)
+ } else {
+ return nil, fmt.Errorf("Unknown character: '%s'", key)
+ }
+ } else {
+ codes = append(codes, byte(key[0]))
+ }
+ }
+ return codes, nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/tc_linux_cgo.go b/vendor/github.com/docker/docker/pkg/term/tc_linux_cgo.go
new file mode 100644
index 0000000000..59dac5ba8e
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/tc_linux_cgo.go
@@ -0,0 +1,50 @@
+// +build linux,cgo
+
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+// #include
+import "C"
+
+// Termios is the Unix API for terminal I/O.
+// It is passthrough for syscall.Termios in order to make it portable with
+// other platforms where it is not available or handled differently.
+type Termios syscall.Termios
+
+// MakeRaw put the terminal connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be
+// restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ var oldState State
+ if err := tcget(fd, &oldState.termios); err != 0 {
+ return nil, err
+ }
+
+ newState := oldState.termios
+
+ C.cfmakeraw((*C.struct_termios)(unsafe.Pointer(&newState)))
+ if err := tcset(fd, &newState); err != 0 {
+ return nil, err
+ }
+ return &oldState, nil
+}
+
+func tcget(fd uintptr, p *Termios) syscall.Errno {
+ ret, err := C.tcgetattr(C.int(fd), (*C.struct_termios)(unsafe.Pointer(p)))
+ if ret != 0 {
+ return err.(syscall.Errno)
+ }
+ return 0
+}
+
+func tcset(fd uintptr, p *Termios) syscall.Errno {
+ ret, err := C.tcsetattr(C.int(fd), C.TCSANOW, (*C.struct_termios)(unsafe.Pointer(p)))
+ if ret != 0 {
+ return err.(syscall.Errno)
+ }
+ return 0
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/tc_other.go b/vendor/github.com/docker/docker/pkg/term/tc_other.go
new file mode 100644
index 0000000000..750d7c3f60
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/tc_other.go
@@ -0,0 +1,20 @@
+// +build !windows
+// +build !linux !cgo
+// +build !solaris !cgo
+
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func tcget(fd uintptr, p *Termios) syscall.Errno {
+ _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p)))
+ return err
+}
+
+func tcset(fd uintptr, p *Termios) syscall.Errno {
+ _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p)))
+ return err
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/tc_solaris_cgo.go b/vendor/github.com/docker/docker/pkg/term/tc_solaris_cgo.go
new file mode 100644
index 0000000000..c9139d0ca8
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/tc_solaris_cgo.go
@@ -0,0 +1,63 @@
+// +build solaris,cgo
+
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+// #include
+import "C"
+
+// Termios is the Unix API for terminal I/O.
+// It is passthrough for syscall.Termios in order to make it portable with
+// other platforms where it is not available or handled differently.
+type Termios syscall.Termios
+
+// MakeRaw put the terminal connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be
+// restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ var oldState State
+ if err := tcget(fd, &oldState.termios); err != 0 {
+ return nil, err
+ }
+
+ newState := oldState.termios
+
+ newState.Iflag &^= (syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON | syscall.IXANY)
+ newState.Oflag &^= syscall.OPOST
+ newState.Lflag &^= (syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN)
+ newState.Cflag &^= (syscall.CSIZE | syscall.PARENB)
+ newState.Cflag |= syscall.CS8
+
+ /*
+ VMIN is the minimum number of characters that needs to be read in non-canonical mode for it to be returned
+ Since VMIN is overloaded with another element in canonical mode when we switch modes it defaults to 4. It
+ needs to be explicitly set to 1.
+ */
+ newState.Cc[C.VMIN] = 1
+ newState.Cc[C.VTIME] = 0
+
+ if err := tcset(fd, &newState); err != 0 {
+ return nil, err
+ }
+ return &oldState, nil
+}
+
+func tcget(fd uintptr, p *Termios) syscall.Errno {
+ ret, err := C.tcgetattr(C.int(fd), (*C.struct_termios)(unsafe.Pointer(p)))
+ if ret != 0 {
+ return err.(syscall.Errno)
+ }
+ return 0
+}
+
+func tcset(fd uintptr, p *Termios) syscall.Errno {
+ ret, err := C.tcsetattr(C.int(fd), C.TCSANOW, (*C.struct_termios)(unsafe.Pointer(p)))
+ if ret != 0 {
+ return err.(syscall.Errno)
+ }
+ return 0
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/term.go b/vendor/github.com/docker/docker/pkg/term/term.go
new file mode 100644
index 0000000000..816f8d7524
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/term.go
@@ -0,0 +1,123 @@
+// +build !windows
+
+// Package term provides structures and helper functions to work with
+// terminal (state, sizes).
+package term
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "os/signal"
+ "syscall"
+)
+
+var (
+ // ErrInvalidState is returned if the state of the terminal is invalid.
+ ErrInvalidState = errors.New("Invalid terminal state")
+)
+
+// State represents the state of the terminal.
+type State struct {
+ termios Termios
+}
+
+// Winsize represents the size of the terminal window.
+type Winsize struct {
+ Height uint16
+ Width uint16
+ x uint16
+ y uint16
+}
+
+// StdStreams returns the standard streams (stdin, stdout, stderr).
+func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) {
+ return os.Stdin, os.Stdout, os.Stderr
+}
+
+// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal.
+func GetFdInfo(in interface{}) (uintptr, bool) {
+ var inFd uintptr
+ var isTerminalIn bool
+ if file, ok := in.(*os.File); ok {
+ inFd = file.Fd()
+ isTerminalIn = IsTerminal(inFd)
+ }
+ return inFd, isTerminalIn
+}
+
+// IsTerminal returns true if the given file descriptor is a terminal.
+func IsTerminal(fd uintptr) bool {
+ var termios Termios
+ return tcget(fd, &termios) == 0
+}
+
+// RestoreTerminal restores the terminal connected to the given file descriptor
+// to a previous state.
+func RestoreTerminal(fd uintptr, state *State) error {
+ if state == nil {
+ return ErrInvalidState
+ }
+ if err := tcset(fd, &state.termios); err != 0 {
+ return err
+ }
+ return nil
+}
+
+// SaveState saves the state of the terminal connected to the given file descriptor.
+func SaveState(fd uintptr) (*State, error) {
+ var oldState State
+ if err := tcget(fd, &oldState.termios); err != 0 {
+ return nil, err
+ }
+
+ return &oldState, nil
+}
+
+// DisableEcho applies the specified state to the terminal connected to the file
+// descriptor, with echo disabled.
+func DisableEcho(fd uintptr, state *State) error {
+ newState := state.termios
+ newState.Lflag &^= syscall.ECHO
+
+ if err := tcset(fd, &newState); err != 0 {
+ return err
+ }
+ handleInterrupt(fd, state)
+ return nil
+}
+
+// SetRawTerminal puts the terminal connected to the given file descriptor into
+// raw mode and returns the previous state. On UNIX, this puts both the input
+// and output into raw mode. On Windows, it only puts the input into raw mode.
+func SetRawTerminal(fd uintptr) (*State, error) {
+ oldState, err := MakeRaw(fd)
+ if err != nil {
+ return nil, err
+ }
+ handleInterrupt(fd, oldState)
+ return oldState, err
+}
+
+// SetRawTerminalOutput puts the output of terminal connected to the given file
+// descriptor into raw mode. On UNIX, this does nothing and returns nil for the
+// state. On Windows, it disables LF -> CRLF translation.
+func SetRawTerminalOutput(fd uintptr) (*State, error) {
+ return nil, nil
+}
+
+func handleInterrupt(fd uintptr, state *State) {
+ sigchan := make(chan os.Signal, 1)
+ signal.Notify(sigchan, os.Interrupt)
+ go func() {
+ for range sigchan {
+ // quit cleanly and the new terminal item is on a new line
+ fmt.Println()
+ signal.Stop(sigchan)
+ close(sigchan)
+ RestoreTerminal(fd, state)
+ os.Exit(1)
+ }
+ }()
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/term_solaris.go b/vendor/github.com/docker/docker/pkg/term/term_solaris.go
new file mode 100644
index 0000000000..112debbec5
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/term_solaris.go
@@ -0,0 +1,41 @@
+// +build solaris
+
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+/*
+#include
+#include
+#include
+
+// Small wrapper to get rid of variadic args of ioctl()
+int my_ioctl(int fd, int cmd, struct winsize *ws) {
+ return ioctl(fd, cmd, ws);
+}
+*/
+import "C"
+
+// GetWinsize returns the window size based on the specified file descriptor.
+func GetWinsize(fd uintptr) (*Winsize, error) {
+ ws := &Winsize{}
+ ret, err := C.my_ioctl(C.int(fd), C.int(syscall.TIOCGWINSZ), (*C.struct_winsize)(unsafe.Pointer(ws)))
+ // Skip retval = 0
+ if ret == 0 {
+ return ws, nil
+ }
+ return ws, err
+}
+
+// SetWinsize tries to set the specified window size for the specified file descriptor.
+func SetWinsize(fd uintptr, ws *Winsize) error {
+ ret, err := C.my_ioctl(C.int(fd), C.int(syscall.TIOCSWINSZ), (*C.struct_winsize)(unsafe.Pointer(ws)))
+ // Skip retval = 0
+ if ret == 0 {
+ return nil
+ }
+ return err
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/term_unix.go b/vendor/github.com/docker/docker/pkg/term/term_unix.go
new file mode 100644
index 0000000000..ddf87a0e58
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/term_unix.go
@@ -0,0 +1,29 @@
+// +build !solaris,!windows
+
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+// GetWinsize returns the window size based on the specified file descriptor.
+func GetWinsize(fd uintptr) (*Winsize, error) {
+ ws := &Winsize{}
+ _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(ws)))
+ // Skipp errno = 0
+ if err == 0 {
+ return ws, nil
+ }
+ return ws, err
+}
+
+// SetWinsize tries to set the specified window size for the specified file descriptor.
+func SetWinsize(fd uintptr, ws *Winsize) error {
+ _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCSWINSZ), uintptr(unsafe.Pointer(ws)))
+ // Skipp errno = 0
+ if err == 0 {
+ return nil
+ }
+ return err
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/term_windows.go b/vendor/github.com/docker/docker/pkg/term/term_windows.go
new file mode 100644
index 0000000000..62e9a9e692
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/term_windows.go
@@ -0,0 +1,233 @@
+// +build windows
+
+package term
+
+import (
+ "io"
+ "os"
+ "os/signal"
+ "syscall"
+
+ "github.com/Azure/go-ansiterm/winterm"
+ "github.com/docker/docker/pkg/term/windows"
+)
+
+// State holds the console mode for the terminal.
+type State struct {
+ mode uint32
+}
+
+// Winsize is used for window size.
+type Winsize struct {
+ Height uint16
+ Width uint16
+}
+
+const (
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx
+ enableVirtualTerminalInput = 0x0200
+ enableVirtualTerminalProcessing = 0x0004
+ disableNewlineAutoReturn = 0x0008
+)
+
+// vtInputSupported is true if enableVirtualTerminalInput is supported by the console
+var vtInputSupported bool
+
+// StdStreams returns the standard streams (stdin, stdout, stderr).
+func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) {
+ // Turn on VT handling on all std handles, if possible. This might
+ // fail, in which case we will fall back to terminal emulation.
+ var emulateStdin, emulateStdout, emulateStderr bool
+ fd := os.Stdin.Fd()
+ if mode, err := winterm.GetConsoleMode(fd); err == nil {
+ // Validate that enableVirtualTerminalInput is supported, but do not set it.
+ if err = winterm.SetConsoleMode(fd, mode|enableVirtualTerminalInput); err != nil {
+ emulateStdin = true
+ } else {
+ vtInputSupported = true
+ }
+ // Unconditionally set the console mode back even on failure because SetConsoleMode
+ // remembers invalid bits on input handles.
+ winterm.SetConsoleMode(fd, mode)
+ }
+
+ fd = os.Stdout.Fd()
+ if mode, err := winterm.GetConsoleMode(fd); err == nil {
+ // Validate disableNewlineAutoReturn is supported, but do not set it.
+ if err = winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing|disableNewlineAutoReturn); err != nil {
+ emulateStdout = true
+ } else {
+ winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing)
+ }
+ }
+
+ fd = os.Stderr.Fd()
+ if mode, err := winterm.GetConsoleMode(fd); err == nil {
+ // Validate disableNewlineAutoReturn is supported, but do not set it.
+ if err = winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing|disableNewlineAutoReturn); err != nil {
+ emulateStderr = true
+ } else {
+ winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing)
+ }
+ }
+
+ if os.Getenv("ConEmuANSI") == "ON" || os.Getenv("ConsoleZVersion") != "" {
+ // The ConEmu and ConsoleZ terminals emulate ANSI on output streams well.
+ emulateStdin = true
+ emulateStdout = false
+ emulateStderr = false
+ }
+
+ if emulateStdin {
+ stdIn = windows.NewAnsiReader(syscall.STD_INPUT_HANDLE)
+ } else {
+ stdIn = os.Stdin
+ }
+
+ if emulateStdout {
+ stdOut = windows.NewAnsiWriter(syscall.STD_OUTPUT_HANDLE)
+ } else {
+ stdOut = os.Stdout
+ }
+
+ if emulateStderr {
+ stdErr = windows.NewAnsiWriter(syscall.STD_ERROR_HANDLE)
+ } else {
+ stdErr = os.Stderr
+ }
+
+ return
+}
+
+// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal.
+func GetFdInfo(in interface{}) (uintptr, bool) {
+ return windows.GetHandleInfo(in)
+}
+
+// GetWinsize returns the window size based on the specified file descriptor.
+func GetWinsize(fd uintptr) (*Winsize, error) {
+ info, err := winterm.GetConsoleScreenBufferInfo(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ winsize := &Winsize{
+ Width: uint16(info.Window.Right - info.Window.Left + 1),
+ Height: uint16(info.Window.Bottom - info.Window.Top + 1),
+ }
+
+ return winsize, nil
+}
+
+// IsTerminal returns true if the given file descriptor is a terminal.
+func IsTerminal(fd uintptr) bool {
+ return windows.IsConsole(fd)
+}
+
+// RestoreTerminal restores the terminal connected to the given file descriptor
+// to a previous state.
+func RestoreTerminal(fd uintptr, state *State) error {
+ return winterm.SetConsoleMode(fd, state.mode)
+}
+
+// SaveState saves the state of the terminal connected to the given file descriptor.
+func SaveState(fd uintptr) (*State, error) {
+ mode, e := winterm.GetConsoleMode(fd)
+ if e != nil {
+ return nil, e
+ }
+
+ return &State{mode: mode}, nil
+}
+
+// DisableEcho disables echo for the terminal connected to the given file descriptor.
+// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx
+func DisableEcho(fd uintptr, state *State) error {
+ mode := state.mode
+ mode &^= winterm.ENABLE_ECHO_INPUT
+ mode |= winterm.ENABLE_PROCESSED_INPUT | winterm.ENABLE_LINE_INPUT
+ err := winterm.SetConsoleMode(fd, mode)
+ if err != nil {
+ return err
+ }
+
+ // Register an interrupt handler to catch and restore prior state
+ restoreAtInterrupt(fd, state)
+ return nil
+}
+
+// SetRawTerminal puts the terminal connected to the given file descriptor into
+// raw mode and returns the previous state. On UNIX, this puts both the input
+// and output into raw mode. On Windows, it only puts the input into raw mode.
+func SetRawTerminal(fd uintptr) (*State, error) {
+ state, err := MakeRaw(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ // Register an interrupt handler to catch and restore prior state
+ restoreAtInterrupt(fd, state)
+ return state, err
+}
+
+// SetRawTerminalOutput puts the output of terminal connected to the given file
+// descriptor into raw mode. On UNIX, this does nothing and returns nil for the
+// state. On Windows, it disables LF -> CRLF translation.
+func SetRawTerminalOutput(fd uintptr) (*State, error) {
+ state, err := SaveState(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ // Ignore failures, since disableNewlineAutoReturn might not be supported on this
+ // version of Windows.
+ winterm.SetConsoleMode(fd, state.mode|disableNewlineAutoReturn)
+ return state, err
+}
+
+// MakeRaw puts the terminal (Windows Console) connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ state, err := SaveState(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ mode := state.mode
+
+ // See
+ // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx
+ // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx
+
+ // Disable these modes
+ mode &^= winterm.ENABLE_ECHO_INPUT
+ mode &^= winterm.ENABLE_LINE_INPUT
+ mode &^= winterm.ENABLE_MOUSE_INPUT
+ mode &^= winterm.ENABLE_WINDOW_INPUT
+ mode &^= winterm.ENABLE_PROCESSED_INPUT
+
+ // Enable these modes
+ mode |= winterm.ENABLE_EXTENDED_FLAGS
+ mode |= winterm.ENABLE_INSERT_MODE
+ mode |= winterm.ENABLE_QUICK_EDIT_MODE
+ if vtInputSupported {
+ mode |= enableVirtualTerminalInput
+ }
+
+ err = winterm.SetConsoleMode(fd, mode)
+ if err != nil {
+ return nil, err
+ }
+ return state, nil
+}
+
+func restoreAtInterrupt(fd uintptr, state *State) {
+ sigchan := make(chan os.Signal, 1)
+ signal.Notify(sigchan, os.Interrupt)
+
+ go func() {
+ _ = <-sigchan
+ RestoreTerminal(fd, state)
+ os.Exit(0)
+ }()
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/termios_darwin.go b/vendor/github.com/docker/docker/pkg/term/termios_darwin.go
new file mode 100644
index 0000000000..480db900ac
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/termios_darwin.go
@@ -0,0 +1,69 @@
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ getTermios = syscall.TIOCGETA
+ setTermios = syscall.TIOCSETA
+)
+
+// Termios magic numbers, passthrough to the ones defined in syscall.
+const (
+ IGNBRK = syscall.IGNBRK
+ PARMRK = syscall.PARMRK
+ INLCR = syscall.INLCR
+ IGNCR = syscall.IGNCR
+ ECHONL = syscall.ECHONL
+ CSIZE = syscall.CSIZE
+ ICRNL = syscall.ICRNL
+ ISTRIP = syscall.ISTRIP
+ PARENB = syscall.PARENB
+ ECHO = syscall.ECHO
+ ICANON = syscall.ICANON
+ ISIG = syscall.ISIG
+ IXON = syscall.IXON
+ BRKINT = syscall.BRKINT
+ INPCK = syscall.INPCK
+ OPOST = syscall.OPOST
+ CS8 = syscall.CS8
+ IEXTEN = syscall.IEXTEN
+)
+
+// Termios is the Unix API for terminal I/O.
+type Termios struct {
+ Iflag uint64
+ Oflag uint64
+ Cflag uint64
+ Lflag uint64
+ Cc [20]byte
+ Ispeed uint64
+ Ospeed uint64
+}
+
+// MakeRaw put the terminal connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be
+// restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ var oldState State
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(&oldState.termios))); err != 0 {
+ return nil, err
+ }
+
+ newState := oldState.termios
+ newState.Iflag &^= (IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON)
+ newState.Oflag &^= OPOST
+ newState.Lflag &^= (ECHO | ECHONL | ICANON | ISIG | IEXTEN)
+ newState.Cflag &^= (CSIZE | PARENB)
+ newState.Cflag |= CS8
+ newState.Cc[syscall.VMIN] = 1
+ newState.Cc[syscall.VTIME] = 0
+
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(setTermios), uintptr(unsafe.Pointer(&newState))); err != 0 {
+ return nil, err
+ }
+
+ return &oldState, nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/termios_freebsd.go b/vendor/github.com/docker/docker/pkg/term/termios_freebsd.go
new file mode 100644
index 0000000000..ed843ad69c
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/termios_freebsd.go
@@ -0,0 +1,69 @@
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ getTermios = syscall.TIOCGETA
+ setTermios = syscall.TIOCSETA
+)
+
+// Termios magic numbers, passthrough to the ones defined in syscall.
+const (
+ IGNBRK = syscall.IGNBRK
+ PARMRK = syscall.PARMRK
+ INLCR = syscall.INLCR
+ IGNCR = syscall.IGNCR
+ ECHONL = syscall.ECHONL
+ CSIZE = syscall.CSIZE
+ ICRNL = syscall.ICRNL
+ ISTRIP = syscall.ISTRIP
+ PARENB = syscall.PARENB
+ ECHO = syscall.ECHO
+ ICANON = syscall.ICANON
+ ISIG = syscall.ISIG
+ IXON = syscall.IXON
+ BRKINT = syscall.BRKINT
+ INPCK = syscall.INPCK
+ OPOST = syscall.OPOST
+ CS8 = syscall.CS8
+ IEXTEN = syscall.IEXTEN
+)
+
+// Termios is the Unix API for terminal I/O.
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]byte
+ Ispeed uint32
+ Ospeed uint32
+}
+
+// MakeRaw put the terminal connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be
+// restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ var oldState State
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(&oldState.termios))); err != 0 {
+ return nil, err
+ }
+
+ newState := oldState.termios
+ newState.Iflag &^= (IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON)
+ newState.Oflag &^= OPOST
+ newState.Lflag &^= (ECHO | ECHONL | ICANON | ISIG | IEXTEN)
+ newState.Cflag &^= (CSIZE | PARENB)
+ newState.Cflag |= CS8
+ newState.Cc[syscall.VMIN] = 1
+ newState.Cc[syscall.VTIME] = 0
+
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(setTermios), uintptr(unsafe.Pointer(&newState))); err != 0 {
+ return nil, err
+ }
+
+ return &oldState, nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/termios_linux.go b/vendor/github.com/docker/docker/pkg/term/termios_linux.go
new file mode 100644
index 0000000000..22921b6aef
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/termios_linux.go
@@ -0,0 +1,47 @@
+// +build !cgo
+
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ getTermios = syscall.TCGETS
+ setTermios = syscall.TCSETS
+)
+
+// Termios is the Unix API for terminal I/O.
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]byte
+ Ispeed uint32
+ Ospeed uint32
+}
+
+// MakeRaw put the terminal connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be
+// restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ var oldState State
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, getTermios, uintptr(unsafe.Pointer(&oldState.termios))); err != 0 {
+ return nil, err
+ }
+
+ newState := oldState.termios
+
+ newState.Iflag &^= (syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON)
+ newState.Oflag &^= syscall.OPOST
+ newState.Lflag &^= (syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN)
+ newState.Cflag &^= (syscall.CSIZE | syscall.PARENB)
+ newState.Cflag |= syscall.CS8
+
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(&newState))); err != 0 {
+ return nil, err
+ }
+ return &oldState, nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/termios_openbsd.go b/vendor/github.com/docker/docker/pkg/term/termios_openbsd.go
new file mode 100644
index 0000000000..ed843ad69c
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/termios_openbsd.go
@@ -0,0 +1,69 @@
+package term
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ getTermios = syscall.TIOCGETA
+ setTermios = syscall.TIOCSETA
+)
+
+// Termios magic numbers, passthrough to the ones defined in syscall.
+const (
+ IGNBRK = syscall.IGNBRK
+ PARMRK = syscall.PARMRK
+ INLCR = syscall.INLCR
+ IGNCR = syscall.IGNCR
+ ECHONL = syscall.ECHONL
+ CSIZE = syscall.CSIZE
+ ICRNL = syscall.ICRNL
+ ISTRIP = syscall.ISTRIP
+ PARENB = syscall.PARENB
+ ECHO = syscall.ECHO
+ ICANON = syscall.ICANON
+ ISIG = syscall.ISIG
+ IXON = syscall.IXON
+ BRKINT = syscall.BRKINT
+ INPCK = syscall.INPCK
+ OPOST = syscall.OPOST
+ CS8 = syscall.CS8
+ IEXTEN = syscall.IEXTEN
+)
+
+// Termios is the Unix API for terminal I/O.
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]byte
+ Ispeed uint32
+ Ospeed uint32
+}
+
+// MakeRaw put the terminal connected to the given file descriptor into raw
+// mode and returns the previous state of the terminal so that it can be
+// restored.
+func MakeRaw(fd uintptr) (*State, error) {
+ var oldState State
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(&oldState.termios))); err != 0 {
+ return nil, err
+ }
+
+ newState := oldState.termios
+ newState.Iflag &^= (IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON)
+ newState.Oflag &^= OPOST
+ newState.Lflag &^= (ECHO | ECHONL | ICANON | ISIG | IEXTEN)
+ newState.Cflag &^= (CSIZE | PARENB)
+ newState.Cflag |= CS8
+ newState.Cc[syscall.VMIN] = 1
+ newState.Cc[syscall.VTIME] = 0
+
+ if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(setTermios), uintptr(unsafe.Pointer(&newState))); err != 0 {
+ return nil, err
+ }
+
+ return &oldState, nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go b/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go
new file mode 100644
index 0000000000..cb0b88356d
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/windows/ansi_reader.go
@@ -0,0 +1,263 @@
+// +build windows
+
+package windows
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "strings"
+ "unsafe"
+
+ ansiterm "github.com/Azure/go-ansiterm"
+ "github.com/Azure/go-ansiterm/winterm"
+)
+
+const (
+ escapeSequence = ansiterm.KEY_ESC_CSI
+)
+
+// ansiReader wraps a standard input file (e.g., os.Stdin) providing ANSI sequence translation.
+type ansiReader struct {
+ file *os.File
+ fd uintptr
+ buffer []byte
+ cbBuffer int
+ command []byte
+}
+
+// NewAnsiReader returns an io.ReadCloser that provides VT100 terminal emulation on top of a
+// Windows console input handle.
+func NewAnsiReader(nFile int) io.ReadCloser {
+ initLogger()
+ file, fd := winterm.GetStdFile(nFile)
+ return &ansiReader{
+ file: file,
+ fd: fd,
+ command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH),
+ buffer: make([]byte, 0),
+ }
+}
+
+// Close closes the wrapped file.
+func (ar *ansiReader) Close() (err error) {
+ return ar.file.Close()
+}
+
+// Fd returns the file descriptor of the wrapped file.
+func (ar *ansiReader) Fd() uintptr {
+ return ar.fd
+}
+
+// Read reads up to len(p) bytes of translated input events into p.
+func (ar *ansiReader) Read(p []byte) (int, error) {
+ if len(p) == 0 {
+ return 0, nil
+ }
+
+ // Previously read bytes exist, read as much as we can and return
+ if len(ar.buffer) > 0 {
+ logger.Debugf("Reading previously cached bytes")
+
+ originalLength := len(ar.buffer)
+ copiedLength := copy(p, ar.buffer)
+
+ if copiedLength == originalLength {
+ ar.buffer = make([]byte, 0, len(p))
+ } else {
+ ar.buffer = ar.buffer[copiedLength:]
+ }
+
+ logger.Debugf("Read from cache p[%d]: % x", copiedLength, p)
+ return copiedLength, nil
+ }
+
+ // Read and translate key events
+ events, err := readInputEvents(ar.fd, len(p))
+ if err != nil {
+ return 0, err
+ } else if len(events) == 0 {
+ logger.Debug("No input events detected")
+ return 0, nil
+ }
+
+ keyBytes := translateKeyEvents(events, []byte(escapeSequence))
+
+ // Save excess bytes and right-size keyBytes
+ if len(keyBytes) > len(p) {
+ logger.Debugf("Received %d keyBytes, only room for %d bytes", len(keyBytes), len(p))
+ ar.buffer = keyBytes[len(p):]
+ keyBytes = keyBytes[:len(p)]
+ } else if len(keyBytes) == 0 {
+ logger.Debug("No key bytes returned from the translator")
+ return 0, nil
+ }
+
+ copiedLength := copy(p, keyBytes)
+ if copiedLength != len(keyBytes) {
+ return 0, errors.New("unexpected copy length encountered")
+ }
+
+ logger.Debugf("Read p[%d]: % x", copiedLength, p)
+ logger.Debugf("Read keyBytes[%d]: % x", copiedLength, keyBytes)
+ return copiedLength, nil
+}
+
+// readInputEvents polls until at least one event is available.
+func readInputEvents(fd uintptr, maxBytes int) ([]winterm.INPUT_RECORD, error) {
+ // Determine the maximum number of records to retrieve
+ // -- Cast around the type system to obtain the size of a single INPUT_RECORD.
+ // unsafe.Sizeof requires an expression vs. a type-reference; the casting
+ // tricks the type system into believing it has such an expression.
+ recordSize := int(unsafe.Sizeof(*((*winterm.INPUT_RECORD)(unsafe.Pointer(&maxBytes)))))
+ countRecords := maxBytes / recordSize
+ if countRecords > ansiterm.MAX_INPUT_EVENTS {
+ countRecords = ansiterm.MAX_INPUT_EVENTS
+ } else if countRecords == 0 {
+ countRecords = 1
+ }
+ logger.Debugf("[windows] readInputEvents: Reading %v records (buffer size %v, record size %v)", countRecords, maxBytes, recordSize)
+
+ // Wait for and read input events
+ events := make([]winterm.INPUT_RECORD, countRecords)
+ nEvents := uint32(0)
+ eventsExist, err := winterm.WaitForSingleObject(fd, winterm.WAIT_INFINITE)
+ if err != nil {
+ return nil, err
+ }
+
+ if eventsExist {
+ err = winterm.ReadConsoleInput(fd, events, &nEvents)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Return a slice restricted to the number of returned records
+ logger.Debugf("[windows] readInputEvents: Read %v events", nEvents)
+ return events[:nEvents], nil
+}
+
+// KeyEvent Translation Helpers
+
+var arrowKeyMapPrefix = map[uint16]string{
+ winterm.VK_UP: "%s%sA",
+ winterm.VK_DOWN: "%s%sB",
+ winterm.VK_RIGHT: "%s%sC",
+ winterm.VK_LEFT: "%s%sD",
+}
+
+var keyMapPrefix = map[uint16]string{
+ winterm.VK_UP: "\x1B[%sA",
+ winterm.VK_DOWN: "\x1B[%sB",
+ winterm.VK_RIGHT: "\x1B[%sC",
+ winterm.VK_LEFT: "\x1B[%sD",
+ winterm.VK_HOME: "\x1B[1%s~", // showkey shows ^[[1
+ winterm.VK_END: "\x1B[4%s~", // showkey shows ^[[4
+ winterm.VK_INSERT: "\x1B[2%s~",
+ winterm.VK_DELETE: "\x1B[3%s~",
+ winterm.VK_PRIOR: "\x1B[5%s~",
+ winterm.VK_NEXT: "\x1B[6%s~",
+ winterm.VK_F1: "",
+ winterm.VK_F2: "",
+ winterm.VK_F3: "\x1B[13%s~",
+ winterm.VK_F4: "\x1B[14%s~",
+ winterm.VK_F5: "\x1B[15%s~",
+ winterm.VK_F6: "\x1B[17%s~",
+ winterm.VK_F7: "\x1B[18%s~",
+ winterm.VK_F8: "\x1B[19%s~",
+ winterm.VK_F9: "\x1B[20%s~",
+ winterm.VK_F10: "\x1B[21%s~",
+ winterm.VK_F11: "\x1B[23%s~",
+ winterm.VK_F12: "\x1B[24%s~",
+}
+
+// translateKeyEvents converts the input events into the appropriate ANSI string.
+func translateKeyEvents(events []winterm.INPUT_RECORD, escapeSequence []byte) []byte {
+ var buffer bytes.Buffer
+ for _, event := range events {
+ if event.EventType == winterm.KEY_EVENT && event.KeyEvent.KeyDown != 0 {
+ buffer.WriteString(keyToString(&event.KeyEvent, escapeSequence))
+ }
+ }
+
+ return buffer.Bytes()
+}
+
+// keyToString maps the given input event record to the corresponding string.
+func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) string {
+ if keyEvent.UnicodeChar == 0 {
+ return formatVirtualKey(keyEvent.VirtualKeyCode, keyEvent.ControlKeyState, escapeSequence)
+ }
+
+ _, alt, control := getControlKeys(keyEvent.ControlKeyState)
+ if control {
+ // TODO(azlinux): Implement following control sequences
+ // -D Signals the end of input from the keyboard; also exits current shell.
+ // -H Deletes the first character to the left of the cursor. Also called the ERASE key.
+ // -Q Restarts printing after it has been stopped with -s.
+ // -S Suspends printing on the screen (does not stop the program).
+ // -U Deletes all characters on the current line. Also called the KILL key.
+ // -E Quits current command and creates a core
+
+ }
+
+ // +Key generates ESC N Key
+ if !control && alt {
+ return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar))
+ }
+
+ return string(keyEvent.UnicodeChar)
+}
+
+// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string.
+func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) string {
+ shift, alt, control := getControlKeys(controlState)
+ modifier := getControlKeysModifier(shift, alt, control)
+
+ if format, ok := arrowKeyMapPrefix[key]; ok {
+ return fmt.Sprintf(format, escapeSequence, modifier)
+ }
+
+ if format, ok := keyMapPrefix[key]; ok {
+ return fmt.Sprintf(format, modifier)
+ }
+
+ return ""
+}
+
+// getControlKeys extracts the shift, alt, and ctrl key states.
+func getControlKeys(controlState uint32) (shift, alt, control bool) {
+ shift = 0 != (controlState & winterm.SHIFT_PRESSED)
+ alt = 0 != (controlState & (winterm.LEFT_ALT_PRESSED | winterm.RIGHT_ALT_PRESSED))
+ control = 0 != (controlState & (winterm.LEFT_CTRL_PRESSED | winterm.RIGHT_CTRL_PRESSED))
+ return shift, alt, control
+}
+
+// getControlKeysModifier returns the ANSI modifier for the given combination of control keys.
+func getControlKeysModifier(shift, alt, control bool) string {
+ if shift && alt && control {
+ return ansiterm.KEY_CONTROL_PARAM_8
+ }
+ if alt && control {
+ return ansiterm.KEY_CONTROL_PARAM_7
+ }
+ if shift && control {
+ return ansiterm.KEY_CONTROL_PARAM_6
+ }
+ if control {
+ return ansiterm.KEY_CONTROL_PARAM_5
+ }
+ if shift && alt {
+ return ansiterm.KEY_CONTROL_PARAM_4
+ }
+ if alt {
+ return ansiterm.KEY_CONTROL_PARAM_3
+ }
+ if shift {
+ return ansiterm.KEY_CONTROL_PARAM_2
+ }
+ return ""
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go b/vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go
new file mode 100644
index 0000000000..a3ce5697d9
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/windows/ansi_writer.go
@@ -0,0 +1,64 @@
+// +build windows
+
+package windows
+
+import (
+ "io"
+ "os"
+
+ ansiterm "github.com/Azure/go-ansiterm"
+ "github.com/Azure/go-ansiterm/winterm"
+)
+
+// ansiWriter wraps a standard output file (e.g., os.Stdout) providing ANSI sequence translation.
+type ansiWriter struct {
+ file *os.File
+ fd uintptr
+ infoReset *winterm.CONSOLE_SCREEN_BUFFER_INFO
+ command []byte
+ escapeSequence []byte
+ inAnsiSequence bool
+ parser *ansiterm.AnsiParser
+}
+
+// NewAnsiWriter returns an io.Writer that provides VT100 terminal emulation on top of a
+// Windows console output handle.
+func NewAnsiWriter(nFile int) io.Writer {
+ initLogger()
+ file, fd := winterm.GetStdFile(nFile)
+ info, err := winterm.GetConsoleScreenBufferInfo(fd)
+ if err != nil {
+ return nil
+ }
+
+ parser := ansiterm.CreateParser("Ground", winterm.CreateWinEventHandler(fd, file))
+ logger.Infof("newAnsiWriter: parser %p", parser)
+
+ aw := &ansiWriter{
+ file: file,
+ fd: fd,
+ infoReset: info,
+ command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH),
+ escapeSequence: []byte(ansiterm.KEY_ESC_CSI),
+ parser: parser,
+ }
+
+ logger.Infof("newAnsiWriter: aw.parser %p", aw.parser)
+ logger.Infof("newAnsiWriter: %v", aw)
+ return aw
+}
+
+func (aw *ansiWriter) Fd() uintptr {
+ return aw.fd
+}
+
+// Write writes len(p) bytes from p to the underlying data stream.
+func (aw *ansiWriter) Write(p []byte) (total int, err error) {
+ if len(p) == 0 {
+ return 0, nil
+ }
+
+ logger.Infof("Write: % x", p)
+ logger.Infof("Write: %s", string(p))
+ return aw.parser.Parse(p)
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/windows/console.go b/vendor/github.com/docker/docker/pkg/term/windows/console.go
new file mode 100644
index 0000000000..ca5c3b2e53
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/windows/console.go
@@ -0,0 +1,35 @@
+// +build windows
+
+package windows
+
+import (
+ "os"
+
+ "github.com/Azure/go-ansiterm/winterm"
+)
+
+// GetHandleInfo returns file descriptor and bool indicating whether the file is a console.
+func GetHandleInfo(in interface{}) (uintptr, bool) {
+ switch t := in.(type) {
+ case *ansiReader:
+ return t.Fd(), true
+ case *ansiWriter:
+ return t.Fd(), true
+ }
+
+ var inFd uintptr
+ var isTerminal bool
+
+ if file, ok := in.(*os.File); ok {
+ inFd = file.Fd()
+ isTerminal = IsConsole(inFd)
+ }
+ return inFd, isTerminal
+}
+
+// IsConsole returns true if the given file descriptor is a Windows Console.
+// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console.
+func IsConsole(fd uintptr) bool {
+ _, e := winterm.GetConsoleMode(fd)
+ return e == nil
+}
diff --git a/vendor/github.com/docker/docker/pkg/term/windows/windows.go b/vendor/github.com/docker/docker/pkg/term/windows/windows.go
new file mode 100644
index 0000000000..ce4cb5990e
--- /dev/null
+++ b/vendor/github.com/docker/docker/pkg/term/windows/windows.go
@@ -0,0 +1,33 @@
+// These files implement ANSI-aware input and output streams for use by the Docker Windows client.
+// When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create
+// and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls.
+
+package windows
+
+import (
+ "io/ioutil"
+ "os"
+ "sync"
+
+ ansiterm "github.com/Azure/go-ansiterm"
+ "github.com/Sirupsen/logrus"
+)
+
+var logger *logrus.Logger
+var initOnce sync.Once
+
+func initLogger() {
+ initOnce.Do(func() {
+ logFile := ioutil.Discard
+
+ if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" {
+ logFile, _ = os.Create("ansiReaderWriter.log")
+ }
+
+ logger = &logrus.Logger{
+ Out: logFile,
+ Formatter: new(logrus.TextFormatter),
+ Level: logrus.DebugLevel,
+ }
+ })
+}
diff --git a/vendor/github.com/dustin/go-humanize/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE
new file mode 100644
index 0000000000..8d9a94a906
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2005-2008 Dustin Sallings
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown
new file mode 100644
index 0000000000..23dfee0ac5
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/README.markdown
@@ -0,0 +1,92 @@
+# Humane Units [](https://travis-ci.org/dustin/go-humanize) [](https://godoc.org/github.com/dustin/go-humanize)
+
+Just a few functions for helping humanize times and sizes.
+
+`go get` it as `github.com/dustin/go-humanize`, import it as
+`"github.com/dustin/go-humanize"`, use it as `humanize`
+
+See [godoc](https://godoc.org/github.com/dustin/go-humanize) for
+complete documentation.
+
+## Sizes
+
+This lets you take numbers like `82854982` and convert them to useful
+strings like, `83MB` or `79MiB` (whichever you prefer).
+
+Example:
+
+```go
+fmt.Printf("That file is %s.", humanize.Bytes(82854982))
+```
+
+## Times
+
+This lets you take a `time.Time` and spit it out in relative terms.
+For example, `12 seconds ago` or `3 days from now`.
+
+Example:
+
+```go
+fmt.Printf("This was touched %s", humanize.Time(someTimeInstance))
+```
+
+Thanks to Kyle Lemons for the time implementation from an IRC
+conversation one day. It's pretty neat.
+
+## Ordinals
+
+From a [mailing list discussion][odisc] where a user wanted to be able
+to label ordinals.
+
+ 0 -> 0th
+ 1 -> 1st
+ 2 -> 2nd
+ 3 -> 3rd
+ 4 -> 4th
+ [...]
+
+Example:
+
+```go
+fmt.Printf("You're my %s best friend.", humanize.Ordinal(193))
+```
+
+## Commas
+
+Want to shove commas into numbers? Be my guest.
+
+ 0 -> 0
+ 100 -> 100
+ 1000 -> 1,000
+ 1000000000 -> 1,000,000,000
+ -100000 -> -100,000
+
+Example:
+
+```go
+fmt.Printf("You owe $%s.\n", humanize.Comma(6582491))
+```
+
+## Ftoa
+
+Nicer float64 formatter that removes trailing zeros.
+
+```go
+fmt.Printf("%f", 2.24) // 2.240000
+fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
+fmt.Printf("%f", 2.0) // 2.000000
+fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
+```
+
+## SI notation
+
+Format numbers with [SI notation][sinotation].
+
+Example:
+
+```go
+humanize.SI(0.00000000223, "M") // 2.23nM
+```
+
+[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion
+[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix
diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go
new file mode 100644
index 0000000000..f49dc337dc
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/big.go
@@ -0,0 +1,31 @@
+package humanize
+
+import (
+ "math/big"
+)
+
+// order of magnitude (to a max order)
+func oomm(n, b *big.Int, maxmag int) (float64, int) {
+ mag := 0
+ m := &big.Int{}
+ for n.Cmp(b) >= 0 {
+ n.DivMod(n, b, m)
+ mag++
+ if mag == maxmag && maxmag >= 0 {
+ break
+ }
+ }
+ return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag
+}
+
+// total order of magnitude
+// (same as above, but with no upper limit)
+func oom(n, b *big.Int) (float64, int) {
+ mag := 0
+ m := &big.Int{}
+ for n.Cmp(b) >= 0 {
+ n.DivMod(n, b, m)
+ mag++
+ }
+ return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag
+}
diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go
new file mode 100644
index 0000000000..d4fb37142f
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/bigbytes.go
@@ -0,0 +1,173 @@
+package humanize
+
+import (
+ "fmt"
+ "math/big"
+ "strings"
+ "unicode"
+)
+
+var (
+ bigIECExp = big.NewInt(1024)
+
+ // BigByte is one byte in bit.Ints
+ BigByte = big.NewInt(1)
+ // BigKiByte is 1,024 bytes in bit.Ints
+ BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp)
+ // BigMiByte is 1,024 k bytes in bit.Ints
+ BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp)
+ // BigGiByte is 1,024 m bytes in bit.Ints
+ BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp)
+ // BigTiByte is 1,024 g bytes in bit.Ints
+ BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp)
+ // BigPiByte is 1,024 t bytes in bit.Ints
+ BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp)
+ // BigEiByte is 1,024 p bytes in bit.Ints
+ BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp)
+ // BigZiByte is 1,024 e bytes in bit.Ints
+ BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp)
+ // BigYiByte is 1,024 z bytes in bit.Ints
+ BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp)
+)
+
+var (
+ bigSIExp = big.NewInt(1000)
+
+ // BigSIByte is one SI byte in big.Ints
+ BigSIByte = big.NewInt(1)
+ // BigKByte is 1,000 SI bytes in big.Ints
+ BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp)
+ // BigMByte is 1,000 SI k bytes in big.Ints
+ BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp)
+ // BigGByte is 1,000 SI m bytes in big.Ints
+ BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp)
+ // BigTByte is 1,000 SI g bytes in big.Ints
+ BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp)
+ // BigPByte is 1,000 SI t bytes in big.Ints
+ BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp)
+ // BigEByte is 1,000 SI p bytes in big.Ints
+ BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp)
+ // BigZByte is 1,000 SI e bytes in big.Ints
+ BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp)
+ // BigYByte is 1,000 SI z bytes in big.Ints
+ BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp)
+)
+
+var bigBytesSizeTable = map[string]*big.Int{
+ "b": BigByte,
+ "kib": BigKiByte,
+ "kb": BigKByte,
+ "mib": BigMiByte,
+ "mb": BigMByte,
+ "gib": BigGiByte,
+ "gb": BigGByte,
+ "tib": BigTiByte,
+ "tb": BigTByte,
+ "pib": BigPiByte,
+ "pb": BigPByte,
+ "eib": BigEiByte,
+ "eb": BigEByte,
+ "zib": BigZiByte,
+ "zb": BigZByte,
+ "yib": BigYiByte,
+ "yb": BigYByte,
+ // Without suffix
+ "": BigByte,
+ "ki": BigKiByte,
+ "k": BigKByte,
+ "mi": BigMiByte,
+ "m": BigMByte,
+ "gi": BigGiByte,
+ "g": BigGByte,
+ "ti": BigTiByte,
+ "t": BigTByte,
+ "pi": BigPiByte,
+ "p": BigPByte,
+ "ei": BigEiByte,
+ "e": BigEByte,
+ "z": BigZByte,
+ "zi": BigZiByte,
+ "y": BigYByte,
+ "yi": BigYiByte,
+}
+
+var ten = big.NewInt(10)
+
+func humanateBigBytes(s, base *big.Int, sizes []string) string {
+ if s.Cmp(ten) < 0 {
+ return fmt.Sprintf("%d B", s)
+ }
+ c := (&big.Int{}).Set(s)
+ val, mag := oomm(c, base, len(sizes)-1)
+ suffix := sizes[mag]
+ f := "%.0f %s"
+ if val < 10 {
+ f = "%.1f %s"
+ }
+
+ return fmt.Sprintf(f, val, suffix)
+
+}
+
+// BigBytes produces a human readable representation of an SI size.
+//
+// See also: ParseBigBytes.
+//
+// BigBytes(82854982) -> 83MB
+func BigBytes(s *big.Int) string {
+ sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
+ return humanateBigBytes(s, bigSIExp, sizes)
+}
+
+// BigIBytes produces a human readable representation of an IEC size.
+//
+// See also: ParseBigBytes.
+//
+// BigIBytes(82854982) -> 79MiB
+func BigIBytes(s *big.Int) string {
+ sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}
+ return humanateBigBytes(s, bigIECExp, sizes)
+}
+
+// ParseBigBytes parses a string representation of bytes into the number
+// of bytes it represents.
+//
+// See also: BigBytes, BigIBytes.
+//
+// ParseBigBytes("42MB") -> 42000000, nil
+// ParseBigBytes("42mib") -> 44040192, nil
+func ParseBigBytes(s string) (*big.Int, error) {
+ lastDigit := 0
+ hasComma := false
+ for _, r := range s {
+ if !(unicode.IsDigit(r) || r == '.' || r == ',') {
+ break
+ }
+ if r == ',' {
+ hasComma = true
+ }
+ lastDigit++
+ }
+
+ num := s[:lastDigit]
+ if hasComma {
+ num = strings.Replace(num, ",", "", -1)
+ }
+
+ val := &big.Rat{}
+ _, err := fmt.Sscanf(num, "%f", val)
+ if err != nil {
+ return nil, err
+ }
+
+ extra := strings.ToLower(strings.TrimSpace(s[lastDigit:]))
+ if m, ok := bigBytesSizeTable[extra]; ok {
+ mv := (&big.Rat{}).SetInt(m)
+ val.Mul(val, mv)
+ rv := &big.Int{}
+ rv.Div(val.Num(), val.Denom())
+ return rv, nil
+ }
+
+ return nil, fmt.Errorf("unhandled size name: %v", extra)
+}
diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go
new file mode 100644
index 0000000000..190ab65f3d
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/bytes.go
@@ -0,0 +1,143 @@
+package humanize
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+ "strings"
+ "unicode"
+)
+
+// IEC Sizes.
+// kibis of bits
+const (
+ Byte = 1 << (iota * 10)
+ KiByte
+ MiByte
+ GiByte
+ TiByte
+ PiByte
+ EiByte
+)
+
+// SI Sizes.
+const (
+ IByte = 1
+ KByte = IByte * 1000
+ MByte = KByte * 1000
+ GByte = MByte * 1000
+ TByte = GByte * 1000
+ PByte = TByte * 1000
+ EByte = PByte * 1000
+)
+
+var bytesSizeTable = map[string]uint64{
+ "b": Byte,
+ "kib": KiByte,
+ "kb": KByte,
+ "mib": MiByte,
+ "mb": MByte,
+ "gib": GiByte,
+ "gb": GByte,
+ "tib": TiByte,
+ "tb": TByte,
+ "pib": PiByte,
+ "pb": PByte,
+ "eib": EiByte,
+ "eb": EByte,
+ // Without suffix
+ "": Byte,
+ "ki": KiByte,
+ "k": KByte,
+ "mi": MiByte,
+ "m": MByte,
+ "gi": GiByte,
+ "g": GByte,
+ "ti": TiByte,
+ "t": TByte,
+ "pi": PiByte,
+ "p": PByte,
+ "ei": EiByte,
+ "e": EByte,
+}
+
+func logn(n, b float64) float64 {
+ return math.Log(n) / math.Log(b)
+}
+
+func humanateBytes(s uint64, base float64, sizes []string) string {
+ if s < 10 {
+ return fmt.Sprintf("%d B", s)
+ }
+ e := math.Floor(logn(float64(s), base))
+ suffix := sizes[int(e)]
+ val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10
+ f := "%.0f %s"
+ if val < 10 {
+ f = "%.1f %s"
+ }
+
+ return fmt.Sprintf(f, val, suffix)
+}
+
+// Bytes produces a human readable representation of an SI size.
+//
+// See also: ParseBytes.
+//
+// Bytes(82854982) -> 83MB
+func Bytes(s uint64) string {
+ sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"}
+ return humanateBytes(s, 1000, sizes)
+}
+
+// IBytes produces a human readable representation of an IEC size.
+//
+// See also: ParseBytes.
+//
+// IBytes(82854982) -> 79MiB
+func IBytes(s uint64) string {
+ sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}
+ return humanateBytes(s, 1024, sizes)
+}
+
+// ParseBytes parses a string representation of bytes into the number
+// of bytes it represents.
+//
+// See Also: Bytes, IBytes.
+//
+// ParseBytes("42MB") -> 42000000, nil
+// ParseBytes("42mib") -> 44040192, nil
+func ParseBytes(s string) (uint64, error) {
+ lastDigit := 0
+ hasComma := false
+ for _, r := range s {
+ if !(unicode.IsDigit(r) || r == '.' || r == ',') {
+ break
+ }
+ if r == ',' {
+ hasComma = true
+ }
+ lastDigit++
+ }
+
+ num := s[:lastDigit]
+ if hasComma {
+ num = strings.Replace(num, ",", "", -1)
+ }
+
+ f, err := strconv.ParseFloat(num, 64)
+ if err != nil {
+ return 0, err
+ }
+
+ extra := strings.ToLower(strings.TrimSpace(s[lastDigit:]))
+ if m, ok := bytesSizeTable[extra]; ok {
+ f *= float64(m)
+ if f >= math.MaxUint64 {
+ return 0, fmt.Errorf("too large: %v", s)
+ }
+ return uint64(f), nil
+ }
+
+ return 0, fmt.Errorf("unhandled size name: %v", extra)
+}
diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go
new file mode 100644
index 0000000000..eb285cb951
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/comma.go
@@ -0,0 +1,108 @@
+package humanize
+
+import (
+ "bytes"
+ "math"
+ "math/big"
+ "strconv"
+ "strings"
+)
+
+// Comma produces a string form of the given number in base 10 with
+// commas after every three orders of magnitude.
+//
+// e.g. Comma(834142) -> 834,142
+func Comma(v int64) string {
+ sign := ""
+
+ // minin64 can't be negated to a usable value, so it has to be special cased.
+ if v == math.MinInt64 {
+ return "-9,223,372,036,854,775,808"
+ }
+
+ if v < 0 {
+ sign = "-"
+ v = 0 - v
+ }
+
+ parts := []string{"", "", "", "", "", "", ""}
+ j := len(parts) - 1
+
+ for v > 999 {
+ parts[j] = strconv.FormatInt(v%1000, 10)
+ switch len(parts[j]) {
+ case 2:
+ parts[j] = "0" + parts[j]
+ case 1:
+ parts[j] = "00" + parts[j]
+ }
+ v = v / 1000
+ j--
+ }
+ parts[j] = strconv.Itoa(int(v))
+ return sign + strings.Join(parts[j:], ",")
+}
+
+// Commaf produces a string form of the given number in base 10 with
+// commas after every three orders of magnitude.
+//
+// e.g. Commaf(834142.32) -> 834,142.32
+func Commaf(v float64) string {
+ buf := &bytes.Buffer{}
+ if v < 0 {
+ buf.Write([]byte{'-'})
+ v = 0 - v
+ }
+
+ comma := []byte{','}
+
+ parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".")
+ pos := 0
+ if len(parts[0])%3 != 0 {
+ pos += len(parts[0]) % 3
+ buf.WriteString(parts[0][:pos])
+ buf.Write(comma)
+ }
+ for ; pos < len(parts[0]); pos += 3 {
+ buf.WriteString(parts[0][pos : pos+3])
+ buf.Write(comma)
+ }
+ buf.Truncate(buf.Len() - 1)
+
+ if len(parts) > 1 {
+ buf.Write([]byte{'.'})
+ buf.WriteString(parts[1])
+ }
+ return buf.String()
+}
+
+// BigComma produces a string form of the given big.Int in base 10
+// with commas after every three orders of magnitude.
+func BigComma(b *big.Int) string {
+ sign := ""
+ if b.Sign() < 0 {
+ sign = "-"
+ b.Abs(b)
+ }
+
+ athousand := big.NewInt(1000)
+ c := (&big.Int{}).Set(b)
+ _, m := oom(c, athousand)
+ parts := make([]string, m+1)
+ j := len(parts) - 1
+
+ mod := &big.Int{}
+ for b.Cmp(athousand) >= 0 {
+ b.DivMod(b, athousand, mod)
+ parts[j] = strconv.FormatInt(mod.Int64(), 10)
+ switch len(parts[j]) {
+ case 2:
+ parts[j] = "0" + parts[j]
+ case 1:
+ parts[j] = "00" + parts[j]
+ }
+ j--
+ }
+ parts[j] = strconv.Itoa(int(b.Int64()))
+ return sign + strings.Join(parts[j:], ",")
+}
diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go
new file mode 100644
index 0000000000..620690dec7
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/commaf.go
@@ -0,0 +1,40 @@
+// +build go1.6
+
+package humanize
+
+import (
+ "bytes"
+ "math/big"
+ "strings"
+)
+
+// BigCommaf produces a string form of the given big.Float in base 10
+// with commas after every three orders of magnitude.
+func BigCommaf(v *big.Float) string {
+ buf := &bytes.Buffer{}
+ if v.Sign() < 0 {
+ buf.Write([]byte{'-'})
+ v.Abs(v)
+ }
+
+ comma := []byte{','}
+
+ parts := strings.Split(v.Text('f', -1), ".")
+ pos := 0
+ if len(parts[0])%3 != 0 {
+ pos += len(parts[0]) % 3
+ buf.WriteString(parts[0][:pos])
+ buf.Write(comma)
+ }
+ for ; pos < len(parts[0]); pos += 3 {
+ buf.WriteString(parts[0][pos : pos+3])
+ buf.Write(comma)
+ }
+ buf.Truncate(buf.Len() - 1)
+
+ if len(parts) > 1 {
+ buf.Write([]byte{'.'})
+ buf.WriteString(parts[1])
+ }
+ return buf.String()
+}
diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go
new file mode 100644
index 0000000000..c76190b106
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/ftoa.go
@@ -0,0 +1,23 @@
+package humanize
+
+import "strconv"
+
+func stripTrailingZeros(s string) string {
+ offset := len(s) - 1
+ for offset > 0 {
+ if s[offset] == '.' {
+ offset--
+ break
+ }
+ if s[offset] != '0' {
+ break
+ }
+ offset--
+ }
+ return s[:offset+1]
+}
+
+// Ftoa converts a float to a string with no trailing zeros.
+func Ftoa(num float64) string {
+ return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64))
+}
diff --git a/vendor/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go
new file mode 100644
index 0000000000..a69540a06b
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/humanize.go
@@ -0,0 +1,8 @@
+/*
+Package humanize converts boring ugly numbers to human-friendly strings and back.
+
+Durations can be turned into strings such as "3 days ago", numbers
+representing sizes like 82854982 into useful strings like, "83MB" or
+"79MiB" (whichever you prefer).
+*/
+package humanize
diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go
new file mode 100644
index 0000000000..dec6186599
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/number.go
@@ -0,0 +1,192 @@
+package humanize
+
+/*
+Slightly adapted from the source to fit go-humanize.
+
+Author: https://github.com/gorhill
+Source: https://gist.github.com/gorhill/5285193
+
+*/
+
+import (
+ "math"
+ "strconv"
+)
+
+var (
+ renderFloatPrecisionMultipliers = [...]float64{
+ 1,
+ 10,
+ 100,
+ 1000,
+ 10000,
+ 100000,
+ 1000000,
+ 10000000,
+ 100000000,
+ 1000000000,
+ }
+
+ renderFloatPrecisionRounders = [...]float64{
+ 0.5,
+ 0.05,
+ 0.005,
+ 0.0005,
+ 0.00005,
+ 0.000005,
+ 0.0000005,
+ 0.00000005,
+ 0.000000005,
+ 0.0000000005,
+ }
+)
+
+// FormatFloat produces a formatted number as string based on the following user-specified criteria:
+// * thousands separator
+// * decimal separator
+// * decimal precision
+//
+// Usage: s := RenderFloat(format, n)
+// The format parameter tells how to render the number n.
+//
+// See examples: http://play.golang.org/p/LXc1Ddm1lJ
+//
+// Examples of format strings, given n = 12345.6789:
+// "#,###.##" => "12,345.67"
+// "#,###." => "12,345"
+// "#,###" => "12345,678"
+// "#\u202F###,##" => "12 345,68"
+// "#.###,###### => 12.345,678900
+// "" (aka default format) => 12,345.67
+//
+// The highest precision allowed is 9 digits after the decimal symbol.
+// There is also a version for integer number, FormatInteger(),
+// which is convenient for calls within template.
+func FormatFloat(format string, n float64) string {
+ // Special cases:
+ // NaN = "NaN"
+ // +Inf = "+Infinity"
+ // -Inf = "-Infinity"
+ if math.IsNaN(n) {
+ return "NaN"
+ }
+ if n > math.MaxFloat64 {
+ return "Infinity"
+ }
+ if n < -math.MaxFloat64 {
+ return "-Infinity"
+ }
+
+ // default format
+ precision := 2
+ decimalStr := "."
+ thousandStr := ","
+ positiveStr := ""
+ negativeStr := "-"
+
+ if len(format) > 0 {
+ format := []rune(format)
+
+ // If there is an explicit format directive,
+ // then default values are these:
+ precision = 9
+ thousandStr = ""
+
+ // collect indices of meaningful formatting directives
+ formatIndx := []int{}
+ for i, char := range format {
+ if char != '#' && char != '0' {
+ formatIndx = append(formatIndx, i)
+ }
+ }
+
+ if len(formatIndx) > 0 {
+ // Directive at index 0:
+ // Must be a '+'
+ // Raise an error if not the case
+ // index: 0123456789
+ // +0.000,000
+ // +000,000.0
+ // +0000.00
+ // +0000
+ if formatIndx[0] == 0 {
+ if format[formatIndx[0]] != '+' {
+ panic("RenderFloat(): invalid positive sign directive")
+ }
+ positiveStr = "+"
+ formatIndx = formatIndx[1:]
+ }
+
+ // Two directives:
+ // First is thousands separator
+ // Raise an error if not followed by 3-digit
+ // 0123456789
+ // 0.000,000
+ // 000,000.00
+ if len(formatIndx) == 2 {
+ if (formatIndx[1] - formatIndx[0]) != 4 {
+ panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers")
+ }
+ thousandStr = string(format[formatIndx[0]])
+ formatIndx = formatIndx[1:]
+ }
+
+ // One directive:
+ // Directive is decimal separator
+ // The number of digit-specifier following the separator indicates wanted precision
+ // 0123456789
+ // 0.00
+ // 000,0000
+ if len(formatIndx) == 1 {
+ decimalStr = string(format[formatIndx[0]])
+ precision = len(format) - formatIndx[0] - 1
+ }
+ }
+ }
+
+ // generate sign part
+ var signStr string
+ if n >= 0.000000001 {
+ signStr = positiveStr
+ } else if n <= -0.000000001 {
+ signStr = negativeStr
+ n = -n
+ } else {
+ signStr = ""
+ n = 0.0
+ }
+
+ // split number into integer and fractional parts
+ intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision])
+
+ // generate integer part string
+ intStr := strconv.FormatInt(int64(intf), 10)
+
+ // add thousand separator if required
+ if len(thousandStr) > 0 {
+ for i := len(intStr); i > 3; {
+ i -= 3
+ intStr = intStr[:i] + thousandStr + intStr[i:]
+ }
+ }
+
+ // no fractional part, we can leave now
+ if precision == 0 {
+ return signStr + intStr
+ }
+
+ // generate fractional part
+ fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision]))
+ // may need padding
+ if len(fracStr) < precision {
+ fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr
+ }
+
+ return signStr + intStr + decimalStr + fracStr
+}
+
+// FormatInteger produces a formatted number as string.
+// See FormatFloat.
+func FormatInteger(format string, n int) string {
+ return FormatFloat(format, float64(n))
+}
diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go
new file mode 100644
index 0000000000..43d88a8619
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/ordinals.go
@@ -0,0 +1,25 @@
+package humanize
+
+import "strconv"
+
+// Ordinal gives you the input number in a rank/ordinal format.
+//
+// Ordinal(3) -> 3rd
+func Ordinal(x int) string {
+ suffix := "th"
+ switch x % 10 {
+ case 1:
+ if x%100 != 11 {
+ suffix = "st"
+ }
+ case 2:
+ if x%100 != 12 {
+ suffix = "nd"
+ }
+ case 3:
+ if x%100 != 13 {
+ suffix = "rd"
+ }
+ }
+ return strconv.Itoa(x) + suffix
+}
diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go
new file mode 100644
index 0000000000..9cce4e8d39
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/si.go
@@ -0,0 +1,113 @@
+package humanize
+
+import (
+ "errors"
+ "math"
+ "regexp"
+ "strconv"
+)
+
+var siPrefixTable = map[float64]string{
+ -24: "y", // yocto
+ -21: "z", // zepto
+ -18: "a", // atto
+ -15: "f", // femto
+ -12: "p", // pico
+ -9: "n", // nano
+ -6: "µ", // micro
+ -3: "m", // milli
+ 0: "",
+ 3: "k", // kilo
+ 6: "M", // mega
+ 9: "G", // giga
+ 12: "T", // tera
+ 15: "P", // peta
+ 18: "E", // exa
+ 21: "Z", // zetta
+ 24: "Y", // yotta
+}
+
+var revSIPrefixTable = revfmap(siPrefixTable)
+
+// revfmap reverses the map and precomputes the power multiplier
+func revfmap(in map[float64]string) map[string]float64 {
+ rv := map[string]float64{}
+ for k, v := range in {
+ rv[v] = math.Pow(10, k)
+ }
+ return rv
+}
+
+var riParseRegex *regexp.Regexp
+
+func init() {
+ ri := `^([\-0-9.]+)\s?([`
+ for _, v := range siPrefixTable {
+ ri += v
+ }
+ ri += `]?)(.*)`
+
+ riParseRegex = regexp.MustCompile(ri)
+}
+
+// ComputeSI finds the most appropriate SI prefix for the given number
+// and returns the prefix along with the value adjusted to be within
+// that prefix.
+//
+// See also: SI, ParseSI.
+//
+// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p")
+func ComputeSI(input float64) (float64, string) {
+ if input == 0 {
+ return 0, ""
+ }
+ mag := math.Abs(input)
+ exponent := math.Floor(logn(mag, 10))
+ exponent = math.Floor(exponent/3) * 3
+
+ value := mag / math.Pow(10, exponent)
+
+ // Handle special case where value is exactly 1000.0
+ // Should return 1M instead of 1000k
+ if value == 1000.0 {
+ exponent += 3
+ value = mag / math.Pow(10, exponent)
+ }
+
+ value = math.Copysign(value, input)
+
+ prefix := siPrefixTable[exponent]
+ return value, prefix
+}
+
+// SI returns a string with default formatting.
+//
+// SI uses Ftoa to format float value, removing trailing zeros.
+//
+// See also: ComputeSI, ParseSI.
+//
+// e.g. SI(1000000, B) -> 1MB
+// e.g. SI(2.2345e-12, "F") -> 2.2345pF
+func SI(input float64, unit string) string {
+ value, prefix := ComputeSI(input)
+ return Ftoa(value) + " " + prefix + unit
+}
+
+var errInvalid = errors.New("invalid input")
+
+// ParseSI parses an SI string back into the number and unit.
+//
+// See also: SI, ComputeSI.
+//
+// e.g. ParseSI(2.2345pF) -> (2.2345e-12, "F", nil)
+func ParseSI(input string) (float64, string, error) {
+ found := riParseRegex.FindStringSubmatch(input)
+ if len(found) != 4 {
+ return 0, "", errInvalid
+ }
+ mag := revSIPrefixTable[found[2]]
+ unit := found[3]
+
+ base, err := strconv.ParseFloat(found[1], 64)
+ return base * mag, unit, err
+}
diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go
new file mode 100644
index 0000000000..b311f11c80
--- /dev/null
+++ b/vendor/github.com/dustin/go-humanize/times.go
@@ -0,0 +1,117 @@
+package humanize
+
+import (
+ "fmt"
+ "math"
+ "sort"
+ "time"
+)
+
+// Seconds-based time units
+const (
+ Day = 24 * time.Hour
+ Week = 7 * Day
+ Month = 30 * Day
+ Year = 12 * Month
+ LongTime = 37 * Year
+)
+
+// Time formats a time into a relative string.
+//
+// Time(someT) -> "3 weeks ago"
+func Time(then time.Time) string {
+ return RelTime(then, time.Now(), "ago", "from now")
+}
+
+// A RelTimeMagnitude struct contains a relative time point at which
+// the relative format of time will switch to a new format string. A
+// slice of these in ascending order by their "D" field is passed to
+// CustomRelTime to format durations.
+//
+// The Format field is a string that may contain a "%s" which will be
+// replaced with the appropriate signed label (e.g. "ago" or "from
+// now") and a "%d" that will be replaced by the quantity.
+//
+// The DivBy field is the amount of time the time difference must be
+// divided by in order to display correctly.
+//
+// e.g. if D is 2*time.Minute and you want to display "%d minutes %s"
+// DivBy should be time.Minute so whatever the duration is will be
+// expressed in minutes.
+type RelTimeMagnitude struct {
+ D time.Duration
+ Format string
+ DivBy time.Duration
+}
+
+var defaultMagnitudes = []RelTimeMagnitude{
+ {time.Second, "now", time.Second},
+ {2 * time.Second, "1 second %s", 1},
+ {time.Minute, "%d seconds %s", time.Second},
+ {2 * time.Minute, "1 minute %s", 1},
+ {time.Hour, "%d minutes %s", time.Minute},
+ {2 * time.Hour, "1 hour %s", 1},
+ {Day, "%d hours %s", time.Hour},
+ {2 * Day, "1 day %s", 1},
+ {Week, "%d days %s", Day},
+ {2 * Week, "1 week %s", 1},
+ {Month, "%d weeks %s", Week},
+ {2 * Month, "1 month %s", 1},
+ {Year, "%d months %s", Month},
+ {18 * Month, "1 year %s", 1},
+ {2 * Year, "2 years %s", 1},
+ {LongTime, "%d years %s", Year},
+ {math.MaxInt64, "a long while %s", 1},
+}
+
+// RelTime formats a time into a relative string.
+//
+// It takes two times and two labels. In addition to the generic time
+// delta string (e.g. 5 minutes), the labels are used applied so that
+// the label corresponding to the smaller time is applied.
+//
+// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier"
+func RelTime(a, b time.Time, albl, blbl string) string {
+ return CustomRelTime(a, b, albl, blbl, defaultMagnitudes)
+}
+
+// CustomRelTime formats a time into a relative string.
+//
+// It takes two times two labels and a table of relative time formats.
+// In addition to the generic time delta string (e.g. 5 minutes), the
+// labels are used applied so that the label corresponding to the
+// smaller time is applied.
+func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string {
+ lbl := albl
+ diff := b.Sub(a)
+
+ if a.After(b) {
+ lbl = blbl
+ diff = a.Sub(b)
+ }
+
+ n := sort.Search(len(magnitudes), func(i int) bool {
+ return magnitudes[i].D >= diff
+ })
+
+ if n >= len(magnitudes) {
+ n = len(magnitudes) - 1
+ }
+ mag := magnitudes[n]
+ args := []interface{}{}
+ escaped := false
+ for _, ch := range mag.Format {
+ if escaped {
+ switch ch {
+ case 's':
+ args = append(args, lbl)
+ case 'd':
+ args = append(args, diff/mag.DivBy)
+ }
+ escaped = false
+ } else {
+ escaped = ch == '%'
+ }
+ }
+ return fmt.Sprintf(mag.Format, args...)
+}
diff --git a/vendor/github.com/fatih/structs/.gitignore b/vendor/github.com/fatih/structs/.gitignore
deleted file mode 100644
index 836562412f..0000000000
--- a/vendor/github.com/fatih/structs/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
diff --git a/vendor/github.com/fatih/structs/.travis.yml b/vendor/github.com/fatih/structs/.travis.yml
deleted file mode 100644
index 845012b7ab..0000000000
--- a/vendor/github.com/fatih/structs/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: go
-go:
- - 1.6
- - tip
-sudo: false
-before_install:
-- go get github.com/axw/gocov/gocov
-- go get github.com/mattn/goveralls
-- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
-script:
-- $HOME/gopath/bin/goveralls -service=travis-ci
diff --git a/vendor/github.com/fatih/structs/field.go b/vendor/github.com/fatih/structs/field.go
index 566f5497ec..e69783230b 100644
--- a/vendor/github.com/fatih/structs/field.go
+++ b/vendor/github.com/fatih/structs/field.go
@@ -25,7 +25,7 @@ func (f *Field) Tag(key string) string {
return f.field.Tag.Get(key)
}
-// Value returns the underlying value of of the field. It panics if the field
+// Value returns the underlying value of the field. It panics if the field
// is not exported.
func (f *Field) Value() interface{} {
return f.value.Interface()
@@ -114,11 +114,19 @@ func (f *Field) Field(name string) *Field {
return field
}
-// Field returns the field from a nested struct. The boolean returns true if
-// the field was found. It panics if the nested struct is not exported or if
-// the field was not found.
+// FieldOk returns the field from a nested struct. The boolean returns whether
+// the field was found (true) or not (false).
func (f *Field) FieldOk(name string) (*Field, bool) {
- v := strctVal(f.value.Interface())
+ value := &f.value
+ // value must be settable so we need to make sure it holds the address of the
+ // variable and not a copy, so we can pass the pointer to strctVal instead of a
+ // copy (which is not assigned to any variable, hence not settable).
+ // see "https://blog.golang.org/laws-of-reflection#TOC_8."
+ if f.value.Kind() != reflect.Ptr {
+ a := f.value.Addr()
+ value = &a
+ }
+ v := strctVal(value.Interface())
t := v.Type()
field, ok := t.FieldByName(name)
diff --git a/vendor/github.com/fatih/structs/structs.go b/vendor/github.com/fatih/structs/structs.go
index 408d50f283..be3816abc1 100644
--- a/vendor/github.com/fatih/structs/structs.go
+++ b/vendor/github.com/fatih/structs/structs.go
@@ -52,6 +52,12 @@ func New(s interface{}) *Struct {
// // Map will panic if Animal does not implement String().
// Field *Animal `structs:"field,string"`
//
+// A tag value with the option of "flatten" used in a struct field is to flatten its fields
+// in the output map. Example:
+//
+// // The FieldStruct's fields will be flattened into the output map.
+// FieldStruct time.Time `structs:",flatten"`
+//
// A tag value with the option of "omitnested" stops iterating further if the type
// is a struct. Example:
//
@@ -90,7 +96,7 @@ func (s *Struct) FillMap(out map[string]interface{}) {
for _, field := range fields {
name := field.Name
val := s.value.FieldByName(name)
-
+ isSubStruct := false
var finalVal interface{}
tagName, tagOpts := parseTag(field.Tag.Get(s.TagName))
@@ -109,16 +115,17 @@ func (s *Struct) FillMap(out map[string]interface{}) {
}
}
- if IsStruct(val.Interface()) && !tagOpts.Has("omitnested") {
- // look out for embedded structs, and convert them to a
- // map[string]interface{} too
- n := New(val.Interface())
- n.TagName = s.TagName
- m := n.Map()
- if len(m) == 0 {
- finalVal = val.Interface()
- } else {
- finalVal = m
+ if !tagOpts.Has("omitnested") {
+ finalVal = s.nested(val)
+
+ v := reflect.ValueOf(val.Interface())
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
+
+ switch v.Kind() {
+ case reflect.Map, reflect.Struct:
+ isSubStruct = true
}
} else {
finalVal = val.Interface()
@@ -132,7 +139,13 @@ func (s *Struct) FillMap(out map[string]interface{}) {
continue
}
- out[name] = finalVal
+ if isSubStruct && (tagOpts.Has("flatten")) {
+ for k := range finalVal.(map[string]interface{}) {
+ out[k] = finalVal.(map[string]interface{})[k]
+ }
+ } else {
+ out[name] = finalVal
+ }
}
}
@@ -270,7 +283,7 @@ func (s *Struct) Field(name string) *Field {
return f
}
-// Field returns a new Field struct that provides several high level functions
+// FieldOk returns a new Field struct that provides several high level functions
// around a single struct field entity. The boolean returns true if the field
// was found.
func (s *Struct) FieldOk(name string) (*Field, bool) {
@@ -418,7 +431,7 @@ func strctVal(s interface{}) reflect.Value {
v := reflect.ValueOf(s)
// if pointer get the underlying element≤
- if v.Kind() == reflect.Ptr {
+ for v.Kind() == reflect.Ptr {
v = v.Elem()
}
@@ -492,3 +505,82 @@ func IsStruct(s interface{}) bool {
func Name(s interface{}) string {
return New(s).Name()
}
+
+// nested retrieves recursively all types for the given value and returns the
+// nested value.
+func (s *Struct) nested(val reflect.Value) interface{} {
+ var finalVal interface{}
+
+ v := reflect.ValueOf(val.Interface())
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
+
+ switch v.Kind() {
+ case reflect.Struct:
+ n := New(val.Interface())
+ n.TagName = s.TagName
+ m := n.Map()
+
+ // do not add the converted value if there are no exported fields, ie:
+ // time.Time
+ if len(m) == 0 {
+ finalVal = val.Interface()
+ } else {
+ finalVal = m
+ }
+ case reflect.Map:
+ // get the element type of the map
+ mapElem := val.Type()
+ switch val.Type().Kind() {
+ case reflect.Ptr, reflect.Array, reflect.Map,
+ reflect.Slice, reflect.Chan:
+ mapElem = val.Type().Elem()
+ if mapElem.Kind() == reflect.Ptr {
+ mapElem = mapElem.Elem()
+ }
+ }
+
+ // only iterate over struct types, ie: map[string]StructType,
+ // map[string][]StructType,
+ if mapElem.Kind() == reflect.Struct ||
+ (mapElem.Kind() == reflect.Slice &&
+ mapElem.Elem().Kind() == reflect.Struct) {
+ m := make(map[string]interface{}, val.Len())
+ for _, k := range val.MapKeys() {
+ m[k.String()] = s.nested(val.MapIndex(k))
+ }
+ finalVal = m
+ break
+ }
+
+ // TODO(arslan): should this be optional?
+ finalVal = val.Interface()
+ case reflect.Slice, reflect.Array:
+ if val.Type().Kind() == reflect.Interface {
+ finalVal = val.Interface()
+ break
+ }
+
+ // TODO(arslan): should this be optional?
+ // do not iterate of non struct types, just pass the value. Ie: []int,
+ // []string, co... We only iterate further if it's a struct.
+ // i.e []foo or []*foo
+ if val.Type().Elem().Kind() != reflect.Struct &&
+ !(val.Type().Elem().Kind() == reflect.Ptr &&
+ val.Type().Elem().Elem().Kind() == reflect.Struct) {
+ finalVal = val.Interface()
+ break
+ }
+
+ slices := make([]interface{}, val.Len(), val.Len())
+ for x := 0; x < val.Len(); x++ {
+ slices[x] = s.nested(val.Index(x))
+ }
+ finalVal = slices
+ default:
+ finalVal = val.Interface()
+ }
+
+ return finalVal
+}
diff --git a/vendor/github.com/fsouza/go-dockerclient/.gitignore b/vendor/github.com/fsouza/go-dockerclient/.gitignore
deleted file mode 100644
index 5f6b48eae0..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# temporary symlink for testing
-testing/data/symlink
diff --git a/vendor/github.com/fsouza/go-dockerclient/.travis.yml b/vendor/github.com/fsouza/go-dockerclient/.travis.yml
deleted file mode 100644
index 68b137ad28..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: go
-sudo: required
-go:
- - 1.4.2
- - 1.5.3
- - 1.6
- - tip
-os:
- - linux
- - osx
-env:
- - GOARCH=amd64 DOCKER_VERSION=1.8.3
- - GOARCH=386 DOCKER_VERSION=1.8.3
- - GOARCH=amd64 DOCKER_VERSION=1.9.1
- - GOARCH=386 DOCKER_VERSION=1.9.1
- - GOARCH=amd64 DOCKER_VERSION=1.10.3
- - GOARCH=386 DOCKER_VERSION=1.10.3
-install:
- - travis_retry travis-scripts/install.bash
-script:
- - travis-scripts/run-tests.bash
-services:
- - docker
-matrix:
- fast_finish: true
- allow_failures:
- - go: tip
diff --git a/vendor/github.com/fsouza/go-dockerclient/AUTHORS b/vendor/github.com/fsouza/go-dockerclient/AUTHORS
index a874f82afb..942817d294 100644
--- a/vendor/github.com/fsouza/go-dockerclient/AUTHORS
+++ b/vendor/github.com/fsouza/go-dockerclient/AUTHORS
@@ -14,6 +14,7 @@ Andy Goldstein
Anirudh Aithal
Antonio Murdaca
Artem Sidorenko
+Arthur Rodrigues
Ben Marini
Ben McCann
Ben Parees
@@ -51,6 +52,7 @@ Ed
Elias G. Schneevoigt
Erez Horev
Eric Anderson
+Eric Mountain
Ethan Mosbaugh
Ewout Prangsma
Fabio Rehm
@@ -117,6 +119,7 @@ Philippe Lafoucrière
Radek Simko
Rafe Colton
Raphaël Pinson
+Reed Allman
Rob Miller
Robbert Klarenbeek
Robert Williamson
diff --git a/vendor/github.com/fsouza/go-dockerclient/LICENSE b/vendor/github.com/fsouza/go-dockerclient/LICENSE
index 11c9e28897..545174c18f 100644
--- a/vendor/github.com/fsouza/go-dockerclient/LICENSE
+++ b/vendor/github.com/fsouza/go-dockerclient/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013-2016, go-dockerclient authors
+Copyright (c) 2013-2017, go-dockerclient authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/vendor/github.com/fsouza/go-dockerclient/README.markdown b/vendor/github.com/fsouza/go-dockerclient/README.markdown
index c99985aef9..0a460ed476 100644
--- a/vendor/github.com/fsouza/go-dockerclient/README.markdown
+++ b/vendor/github.com/fsouza/go-dockerclient/README.markdown
@@ -13,7 +13,8 @@ passthrough to the libnetwork remote API. Note that docker's network API is
only available in docker 1.8 and above, and only enabled in docker if
DOCKER_EXPERIMENTAL is defined during the docker build process.
-For more details, check the [remote API documentation](http://docs.docker.com/engine/reference/api/docker_remote_api/).
+For more details, check the [remote API
+documentation](http://docs.docker.com/engine/reference/api/docker_remote_api/).
## Example
@@ -28,8 +29,14 @@ import (
func main() {
endpoint := "unix:///var/run/docker.sock"
- client, _ := docker.NewClient(endpoint)
- imgs, _ := client.ListImages(docker.ListImagesOptions{All: false})
+ client, err := docker.NewClient(endpoint)
+ if err != nil {
+ panic(err)
+ }
+ imgs, err := client.ListImages(docker.ListImagesOptions{All: false})
+ if err != nil {
+ panic(err)
+ }
for _, img := range imgs {
fmt.Println("ID: ", img.ID)
fmt.Println("RepoTags: ", img.RepoTags)
@@ -43,7 +50,9 @@ func main() {
## Using with TLS
-In order to instantiate the client for a TLS-enabled daemon, you should use NewTLSClient, passing the endpoint and path for key and certificates as parameters.
+In order to instantiate the client for a TLS-enabled daemon, you should use
+NewTLSClient, passing the endpoint and path for key and certificates as
+parameters.
```go
package main
@@ -65,8 +74,9 @@ func main() {
}
```
-If using [docker-machine](https://docs.docker.com/machine/), or another application that exports environment variables
-`DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH`, you can use NewClientFromEnv.
+If using [docker-machine](https://docs.docker.com/machine/), or another
+application that exports environment variables `DOCKER_HOST`,
+`DOCKER_TLS_VERIFY`, `DOCKER_CERT_PATH`, you can use NewClientFromEnv.
```go
@@ -97,4 +107,6 @@ Commited code must pass:
* [gofmt](https://golang.org/cmd/gofmt)
* [go test](https://golang.org/cmd/go/#hdr-Test_packages)
-Running `make test` will check all of these. If your editor does not automatically call gofmt, `make fmt` will format all go files in this repository.
+Running `make test` will check all of these. If your editor does not
+automatically call ``gofmt -s``, `make fmt` will format all go files in this
+repository.
diff --git a/vendor/github.com/fsouza/go-dockerclient/appveyor.yml b/vendor/github.com/fsouza/go-dockerclient/appveyor.yml
index c6cc73e625..df3700c637 100644
--- a/vendor/github.com/fsouza/go-dockerclient/appveyor.yml
+++ b/vendor/github.com/fsouza/go-dockerclient/appveyor.yml
@@ -4,7 +4,7 @@ clone_depth: 2
clone_folder: c:\gopath\src\github.com\fsouza\go-dockerclient
environment:
GOPATH: c:\gopath
- GOVERSION: 1.7.3
+ GOVERSION: 1.7.4
install:
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- rmdir c:\go /s /q
diff --git a/vendor/github.com/fsouza/go-dockerclient/auth.go b/vendor/github.com/fsouza/go-dockerclient/auth.go
index 5ba9468410..347de7f33b 100644
--- a/vendor/github.com/fsouza/go-dockerclient/auth.go
+++ b/vendor/github.com/fsouza/go-dockerclient/auth.go
@@ -161,7 +161,7 @@ type AuthStatus struct {
func (c *Client) AuthCheck(conf *AuthConfiguration) (AuthStatus, error) {
var authStatus AuthStatus
if conf == nil {
- return authStatus, fmt.Errorf("conf is nil")
+ return authStatus, errors.New("conf is nil")
}
resp, err := c.do("POST", "/auth", doOptions{data: conf})
if err != nil {
diff --git a/vendor/github.com/fsouza/go-dockerclient/client.go b/vendor/github.com/fsouza/go-dockerclient/client.go
index 3532e075dc..f51e1e29f0 100644
--- a/vendor/github.com/fsouza/go-dockerclient/client.go
+++ b/vendor/github.com/fsouza/go-dockerclient/client.go
@@ -31,6 +31,7 @@ import (
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/homedir"
+ "github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/stdcopy"
"github.com/hashicorp/go-cleanhttp"
"golang.org/x/net/context"
@@ -229,17 +230,26 @@ func NewVersionnedTLSClient(endpoint string, cert, key, ca, apiVersionString str
// NewVersionedTLSClient returns a Client instance ready for TLS communications with the givens
// server endpoint, key and certificates, using a specific remote API version.
func NewVersionedTLSClient(endpoint string, cert, key, ca, apiVersionString string) (*Client, error) {
- certPEMBlock, err := ioutil.ReadFile(cert)
- if err != nil {
- return nil, err
+ var certPEMBlock []byte
+ var keyPEMBlock []byte
+ var caPEMCert []byte
+ if _, err := os.Stat(cert); !os.IsNotExist(err) {
+ certPEMBlock, err = ioutil.ReadFile(cert)
+ if err != nil {
+ return nil, err
+ }
}
- keyPEMBlock, err := ioutil.ReadFile(key)
- if err != nil {
- return nil, err
+ if _, err := os.Stat(key); !os.IsNotExist(err) {
+ keyPEMBlock, err = ioutil.ReadFile(key)
+ if err != nil {
+ return nil, err
+ }
}
- caPEMCert, err := ioutil.ReadFile(ca)
- if err != nil {
- return nil, err
+ if _, err := os.Stat(ca); !os.IsNotExist(err) {
+ caPEMCert, err = ioutil.ReadFile(ca)
+ if err != nil {
+ return nil, err
+ }
}
return NewVersionedTLSClientFromBytes(endpoint, certPEMBlock, keyPEMBlock, caPEMCert, apiVersionString)
}
@@ -298,14 +308,14 @@ func NewVersionedTLSClientFromBytes(endpoint string, certPEMBlock, keyPEMBlock,
return nil, err
}
}
- if certPEMBlock == nil || keyPEMBlock == nil {
- return nil, errors.New("Both cert and key are required")
+ tlsConfig := &tls.Config{}
+ if certPEMBlock != nil && keyPEMBlock != nil {
+ tlsCert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock)
+ if err != nil {
+ return nil, err
+ }
+ tlsConfig.Certificates = []tls.Certificate{tlsCert}
}
- tlsCert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock)
- if err != nil {
- return nil, err
- }
- tlsConfig := &tls.Config{Certificates: []tls.Certificate{tlsCert}}
if caPEMCert == nil {
tlsConfig.InsecureSkipVerify = true
} else {
@@ -611,26 +621,16 @@ func handleStreamResponse(resp *http.Response, streamOptions *streamOptions) err
_, err = io.Copy(streamOptions.stdout, resp.Body)
return err
}
- dec := json.NewDecoder(resp.Body)
- for {
- var m jsonMessage
- if err := dec.Decode(&m); err == io.EOF {
- break
- } else if err != nil {
- return err
- }
- if m.Stream != "" {
- fmt.Fprint(streamOptions.stdout, m.Stream)
- } else if m.Progress != "" {
- fmt.Fprintf(streamOptions.stdout, "%s %s\r", m.Status, m.Progress)
- } else if m.Error != "" {
- return errors.New(m.Error)
- }
- if m.Status != "" {
- fmt.Fprintln(streamOptions.stdout, m.Status)
- }
+ if st, ok := streamOptions.stdout.(interface {
+ io.Writer
+ FD() uintptr
+ IsTerminal() bool
+ }); ok {
+ err = jsonmessage.DisplayJSONMessagesToStream(resp.Body, st, nil)
+ } else {
+ err = jsonmessage.DisplayJSONMessagesStream(resp.Body, streamOptions.stdout, 0, false, nil)
}
- return nil
+ return err
}
type proxyWriter struct {
diff --git a/vendor/github.com/fsouza/go-dockerclient/container.go b/vendor/github.com/fsouza/go-dockerclient/container.go
index cb6ed609f9..9bdff247b4 100644
--- a/vendor/github.com/fsouza/go-dockerclient/container.go
+++ b/vendor/github.com/fsouza/go-dockerclient/container.go
@@ -1252,7 +1252,20 @@ func (c *Client) CopyFromContainer(opts CopyFromContainerOptions) error {
//
// See https://goo.gl/4AGweZ for more details.
func (c *Client) WaitContainer(id string) (int, error) {
- resp, err := c.do("POST", "/containers/"+id+"/wait", doOptions{})
+ return c.waitContainer(id, doOptions{})
+}
+
+// WaitContainerWithContext blocks until the given container stops, return the exit code
+// of the container status. The context object can be used to cancel the
+// inspect request.
+//
+// See https://goo.gl/4AGweZ for more details.
+func (c *Client) WaitContainerWithContext(id string, ctx context.Context) (int, error) {
+ return c.waitContainer(id, doOptions{context: ctx})
+}
+
+func (c *Client) waitContainer(id string, opts doOptions) (int, error) {
+ resp, err := c.do("POST", "/containers/"+id+"/wait", opts)
if err != nil {
if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
return 0, &NoSuchContainer{ID: id}
@@ -1392,6 +1405,14 @@ type LogsOptions struct {
// Logs gets stdout and stderr logs from the specified container.
//
+// When LogsOptions.RawTerminal is set to false, go-dockerclient will multiplex
+// the streams and send the containers stdout to LogsOptions.OutputStream, and
+// stderr to LogsOptions.ErrorStream.
+//
+// When LogsOptions.RawTerminal is true, callers will get the raw stream on
+// LogOptions.OutputStream. The caller can use libraries such as dlog
+// (github.com/ahmetalpbalkan/dlog).
+//
// See https://goo.gl/krK0ZH for more details.
func (c *Client) Logs(opts LogsOptions) error {
if opts.Container == "" {
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/CHANGELOG.md b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/CHANGELOG.md
deleted file mode 100644
index ecc843272b..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/CHANGELOG.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# 0.9.0 (Unreleased)
-
-* logrus/text_formatter: don't emit empty msg
-* logrus/hooks/airbrake: move out of main repository
-* logrus/hooks/sentry: move out of main repository
-* logrus/hooks/papertrail: move out of main repository
-* logrus/hooks/bugsnag: move out of main repository
-
-# 0.8.7
-
-* logrus/core: fix possible race (#216)
-* logrus/doc: small typo fixes and doc improvements
-
-
-# 0.8.6
-
-* hooks/raven: allow passing an initialized client
-
-# 0.8.5
-
-* logrus/core: revert #208
-
-# 0.8.4
-
-* formatter/text: fix data race (#218)
-
-# 0.8.3
-
-* logrus/core: fix entry log level (#208)
-* logrus/core: improve performance of text formatter by 40%
-* logrus/core: expose `LevelHooks` type
-* logrus/core: add support for DragonflyBSD and NetBSD
-* formatter/text: print structs more verbosely
-
-# 0.8.2
-
-* logrus: fix more Fatal family functions
-
-# 0.8.1
-
-* logrus: fix not exiting on `Fatalf` and `Fatalln`
-
-# 0.8.0
-
-* logrus: defaults to stderr instead of stdout
-* hooks/sentry: add special field for `*http.Request`
-* formatter/text: ignore Windows for colors
-
-# 0.7.3
-
-* formatter/\*: allow configuration of timestamp layout
-
-# 0.7.2
-
-* formatter/text: Add configuration option for time format (#158)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/README.md b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/README.md
deleted file mode 100644
index 55d3a8d5f6..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/README.md
+++ /dev/null
@@ -1,365 +0,0 @@
-# Logrus
[](https://travis-ci.org/Sirupsen/logrus) [][godoc]
-
-Logrus is a structured logger for Go (golang), completely API compatible with
-the standard library logger. [Godoc][godoc]. **Please note the Logrus API is not
-yet stable (pre 1.0). Logrus itself is completely stable and has been used in
-many large deployments. The core API is unlikely to change much but please
-version control your Logrus to make sure you aren't fetching latest `master` on
-every build.**
-
-Nicely color-coded in development (when a TTY is attached, otherwise just
-plain text):
-
-
-
-With `log.Formatter = new(logrus.JSONFormatter)`, for easy parsing by logstash
-or Splunk:
-
-```json
-{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
-ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
-
-{"level":"warning","msg":"The group's number increased tremendously!",
-"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
-"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
-"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
-
-{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
-"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
-```
-
-With the default `log.Formatter = new(&log.TextFormatter{})` when a TTY is not
-attached, the output is compatible with the
-[logfmt](http://godoc.org/github.com/kr/logfmt) format:
-
-```text
-time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
-time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
-time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
-time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
-time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
-time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
-exit status 1
-```
-
-#### Example
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
-```go
-package main
-
-import (
- log "github.com/Sirupsen/logrus"
-)
-
-func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- }).Info("A walrus appears")
-}
-```
-
-Note that it's completely api-compatible with the stdlib logger, so you can
-replace your `log` imports everywhere with `log "github.com/Sirupsen/logrus"`
-and you'll now have the flexibility of Logrus. You can customize it all you
-want:
-
-```go
-package main
-
-import (
- "os"
- log "github.com/Sirupsen/logrus"
-)
-
-func init() {
- // Log as JSON instead of the default ASCII formatter.
- log.SetFormatter(&log.JSONFormatter{})
-
- // Output to stderr instead of stdout, could also be a file.
- log.SetOutput(os.Stderr)
-
- // Only log the warning severity or above.
- log.SetLevel(log.WarnLevel)
-}
-
-func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(log.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(log.Fields{
- "omg": true,
- "number": 100,
- }).Fatal("The ice breaks!")
-
- // A common pattern is to re-use fields between logging statements by re-using
- // the logrus.Entry returned from WithFields()
- contextLogger := log.WithFields(log.Fields{
- "common": "this is a common field",
- "other": "I also should be logged always",
- })
-
- contextLogger.Info("I'll be logged with common and other field")
- contextLogger.Info("Me too")
-}
-```
-
-For more advanced usage such as logging to multiple locations from the same
-application, you can also create an instance of the `logrus` Logger:
-
-```go
-package main
-
-import (
- "github.com/Sirupsen/logrus"
-)
-
-// Create a new instance of the logger. You can have any number of instances.
-var log = logrus.New()
-
-func main() {
- // The API for setting attributes is a little different than the package level
- // exported logger. See Godoc.
- log.Out = os.Stderr
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-}
-```
-
-#### Fields
-
-Logrus encourages careful, structured logging though logging fields instead of
-long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
-to send event %s to topic %s with key %d")`, you should log the much more
-discoverable:
-
-```go
-log.WithFields(log.Fields{
- "event": event,
- "topic": topic,
- "key": key,
-}).Fatal("Failed to send event")
-```
-
-We've found this API forces you to think about logging in a way that produces
-much more useful logging messages. We've been in countless situations where just
-a single added field to a log statement that was already there would've saved us
-hours. The `WithFields` call is optional.
-
-In general, with Logrus using any of the `printf`-family functions should be
-seen as a hint you should add a field, however, you can still use the
-`printf`-family functions with Logrus.
-
-#### Hooks
-
-You can add hooks for logging levels. For example to send errors to an exception
-tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
-multiple places simultaneously, e.g. syslog.
-
-Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
-`init`:
-
-```go
-import (
- log "github.com/Sirupsen/logrus"
- "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake"
- logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
- "log/syslog"
-)
-
-func init() {
-
- // Use the Airbrake hook to report errors that have Error severity or above to
- // an exception tracker. You can create custom hooks, see the Hooks section.
- log.AddHook(airbrake.NewHook(123, "xyz", "production"))
-
- hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
- if err != nil {
- log.Error("Unable to connect to local syslog daemon")
- } else {
- log.AddHook(hook)
- }
-}
-```
-Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md).
-
-| Hook | Description |
-| ----- | ----------- |
-| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. |
-| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
-| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. |
-| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
-| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
-| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. |
-| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. |
-| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) |
-| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. |
-| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` |
-| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) |
-| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) |
-| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem |
-| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger |
-| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail |
-| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar |
-| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd |
-| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb |
-| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb |
-| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit |
-| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic |
-
-#### Level logging
-
-Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
-
-```go
-log.Debug("Useful debugging information.")
-log.Info("Something noteworthy happened!")
-log.Warn("You should probably take a look at this.")
-log.Error("Something failed but I'm not quitting.")
-// Calls os.Exit(1) after logging
-log.Fatal("Bye.")
-// Calls panic() after logging
-log.Panic("I'm bailing.")
-```
-
-You can set the logging level on a `Logger`, then it will only log entries with
-that severity or anything above it:
-
-```go
-// Will log anything that is info or above (warn, error, fatal, panic). Default.
-log.SetLevel(log.InfoLevel)
-```
-
-It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
-environment if your application has that.
-
-#### Entries
-
-Besides the fields added with `WithField` or `WithFields` some fields are
-automatically added to all logging events:
-
-1. `time`. The timestamp when the entry was created.
-2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
- the `AddFields` call. E.g. `Failed to send event.`
-3. `level`. The logging level. E.g. `info`.
-
-#### Environments
-
-Logrus has no notion of environment.
-
-If you wish for hooks and formatters to only be used in specific environments,
-you should handle that yourself. For example, if your application has a global
-variable `Environment`, which is a string representation of the environment you
-could do:
-
-```go
-import (
- log "github.com/Sirupsen/logrus"
-)
-
-init() {
- // do something here to set environment depending on an environment variable
- // or command-line flag
- if Environment == "production" {
- log.SetFormatter(&log.JSONFormatter{})
- } else {
- // The TextFormatter is default, you don't actually have to do this.
- log.SetFormatter(&log.TextFormatter{})
- }
-}
-```
-
-This configuration is how `logrus` was intended to be used, but JSON in
-production is mostly only useful if you do log aggregation with tools like
-Splunk or Logstash.
-
-#### Formatters
-
-The built-in logging formatters are:
-
-* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
- without colors.
- * *Note:* to force colored output when there is no TTY, set the `ForceColors`
- field to `true`. To force no colored output even if there is a TTY set the
- `DisableColors` field to `true`
-* `logrus.JSONFormatter`. Logs fields as JSON.
-* `logrus/formatters/logstash.LogstashFormatter`. Logs fields as [Logstash](http://logstash.net) Events.
-
- ```go
- logrus.SetFormatter(&logstash.LogstashFormatter{Type: "application_name"})
- ```
-
-Third party logging formatters:
-
-* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
-* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
-
-You can define your formatter by implementing the `Formatter` interface,
-requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
-`Fields` type (`map[string]interface{}`) with all your fields as well as the
-default ones (see Entries section above):
-
-```go
-type MyJSONFormatter struct {
-}
-
-log.SetFormatter(new(MyJSONFormatter))
-
-func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
- // Note this doesn't include Time, Level and Message which are available on
- // the Entry. Consult `godoc` on information about those fields or read the
- // source of the official loggers.
- serialized, err := json.Marshal(entry.Data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
-```
-
-#### Logger as an `io.Writer`
-
-Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
-
-```go
-w := logger.Writer()
-defer w.Close()
-
-srv := http.Server{
- // create a stdlib log.Logger that writes to
- // logrus.Logger.
- ErrorLog: log.New(w, "", 0),
-}
-```
-
-Each line written to that writer will be printed the usual way, using formatters
-and hooks. The level for those entries is `info`.
-
-#### Rotation
-
-Log rotation is not provided with Logrus. Log rotation should be done by an
-external program (like `logrotate(8)`) that can compress and delete old log
-entries. It should not be a feature of the application-level logger.
-
-#### Tools
-
-| Tool | Description |
-| ---- | ----------- |
-|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.|
-
-[godoc]: https://godoc.org/github.com/Sirupsen/logrus
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/doc.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/doc.go
deleted file mode 100644
index dddd5f877b..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/doc.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
-
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
- package main
-
- import (
- log "github.com/Sirupsen/logrus"
- )
-
- func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- "number": 1,
- "size": 10,
- }).Info("A walrus appears")
- }
-
-Output:
- time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
-
-For a full guide visit https://github.com/Sirupsen/logrus
-*/
-package logrus
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/entry.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/entry.go
deleted file mode 100644
index 9ae900bc5e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/entry.go
+++ /dev/null
@@ -1,264 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "time"
-)
-
-// Defines the key when adding errors using WithError.
-var ErrorKey = "error"
-
-// An entry is the final or intermediate Logrus logging entry. It contains all
-// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
-// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
-// passed around as much as you wish to avoid field duplication.
-type Entry struct {
- Logger *Logger
-
- // Contains all the fields set by the user.
- Data Fields
-
- // Time at which the log entry was created
- Time time.Time
-
- // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
- Level Level
-
- // Message passed to Debug, Info, Warn, Error, Fatal or Panic
- Message string
-}
-
-func NewEntry(logger *Logger) *Entry {
- return &Entry{
- Logger: logger,
- // Default is three fields, give a little extra room
- Data: make(Fields, 5),
- }
-}
-
-// Returns a reader for the entry, which is a proxy to the formatter.
-func (entry *Entry) Reader() (*bytes.Buffer, error) {
- serialized, err := entry.Logger.Formatter.Format(entry)
- return bytes.NewBuffer(serialized), err
-}
-
-// Returns the string representation from the reader and ultimately the
-// formatter.
-func (entry *Entry) String() (string, error) {
- reader, err := entry.Reader()
- if err != nil {
- return "", err
- }
-
- return reader.String(), err
-}
-
-// Add an error as single field (using the key defined in ErrorKey) to the Entry.
-func (entry *Entry) WithError(err error) *Entry {
- return entry.WithField(ErrorKey, err)
-}
-
-// Add a single field to the Entry.
-func (entry *Entry) WithField(key string, value interface{}) *Entry {
- return entry.WithFields(Fields{key: value})
-}
-
-// Add a map of fields to the Entry.
-func (entry *Entry) WithFields(fields Fields) *Entry {
- data := Fields{}
- for k, v := range entry.Data {
- data[k] = v
- }
- for k, v := range fields {
- data[k] = v
- }
- return &Entry{Logger: entry.Logger, Data: data}
-}
-
-// This function is not declared with a pointer value because otherwise
-// race conditions will occur when using multiple goroutines
-func (entry Entry) log(level Level, msg string) {
- entry.Time = time.Now()
- entry.Level = level
- entry.Message = msg
-
- if err := entry.Logger.Hooks.Fire(level, &entry); err != nil {
- entry.Logger.mu.Lock()
- fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
- entry.Logger.mu.Unlock()
- }
-
- reader, err := entry.Reader()
- if err != nil {
- entry.Logger.mu.Lock()
- fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
- entry.Logger.mu.Unlock()
- }
-
- entry.Logger.mu.Lock()
- defer entry.Logger.mu.Unlock()
-
- _, err = io.Copy(entry.Logger.Out, reader)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
- }
-
- // To avoid Entry#log() returning a value that only would make sense for
- // panic() to use in Entry#Panic(), we avoid the allocation by checking
- // directly here.
- if level <= PanicLevel {
- panic(&entry)
- }
-}
-
-func (entry *Entry) Debug(args ...interface{}) {
- if entry.Logger.Level >= DebugLevel {
- entry.log(DebugLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Print(args ...interface{}) {
- entry.Info(args...)
-}
-
-func (entry *Entry) Info(args ...interface{}) {
- if entry.Logger.Level >= InfoLevel {
- entry.log(InfoLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Warn(args ...interface{}) {
- if entry.Logger.Level >= WarnLevel {
- entry.log(WarnLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Warning(args ...interface{}) {
- entry.Warn(args...)
-}
-
-func (entry *Entry) Error(args ...interface{}) {
- if entry.Logger.Level >= ErrorLevel {
- entry.log(ErrorLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Fatal(args ...interface{}) {
- if entry.Logger.Level >= FatalLevel {
- entry.log(FatalLevel, fmt.Sprint(args...))
- }
- os.Exit(1)
-}
-
-func (entry *Entry) Panic(args ...interface{}) {
- if entry.Logger.Level >= PanicLevel {
- entry.log(PanicLevel, fmt.Sprint(args...))
- }
- panic(fmt.Sprint(args...))
-}
-
-// Entry Printf family functions
-
-func (entry *Entry) Debugf(format string, args ...interface{}) {
- if entry.Logger.Level >= DebugLevel {
- entry.Debug(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Infof(format string, args ...interface{}) {
- if entry.Logger.Level >= InfoLevel {
- entry.Info(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Printf(format string, args ...interface{}) {
- entry.Infof(format, args...)
-}
-
-func (entry *Entry) Warnf(format string, args ...interface{}) {
- if entry.Logger.Level >= WarnLevel {
- entry.Warn(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Warningf(format string, args ...interface{}) {
- entry.Warnf(format, args...)
-}
-
-func (entry *Entry) Errorf(format string, args ...interface{}) {
- if entry.Logger.Level >= ErrorLevel {
- entry.Error(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Fatalf(format string, args ...interface{}) {
- if entry.Logger.Level >= FatalLevel {
- entry.Fatal(fmt.Sprintf(format, args...))
- }
- os.Exit(1)
-}
-
-func (entry *Entry) Panicf(format string, args ...interface{}) {
- if entry.Logger.Level >= PanicLevel {
- entry.Panic(fmt.Sprintf(format, args...))
- }
-}
-
-// Entry Println family functions
-
-func (entry *Entry) Debugln(args ...interface{}) {
- if entry.Logger.Level >= DebugLevel {
- entry.Debug(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Infoln(args ...interface{}) {
- if entry.Logger.Level >= InfoLevel {
- entry.Info(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Println(args ...interface{}) {
- entry.Infoln(args...)
-}
-
-func (entry *Entry) Warnln(args ...interface{}) {
- if entry.Logger.Level >= WarnLevel {
- entry.Warn(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Warningln(args ...interface{}) {
- entry.Warnln(args...)
-}
-
-func (entry *Entry) Errorln(args ...interface{}) {
- if entry.Logger.Level >= ErrorLevel {
- entry.Error(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Fatalln(args ...interface{}) {
- if entry.Logger.Level >= FatalLevel {
- entry.Fatal(entry.sprintlnn(args...))
- }
- os.Exit(1)
-}
-
-func (entry *Entry) Panicln(args ...interface{}) {
- if entry.Logger.Level >= PanicLevel {
- entry.Panic(entry.sprintlnn(args...))
- }
-}
-
-// Sprintlnn => Sprint no newline. This is to get the behavior of how
-// fmt.Sprintln where spaces are always added between operands, regardless of
-// their type. Instead of vendoring the Sprintln implementation to spare a
-// string allocation, we do the simplest thing.
-func (entry *Entry) sprintlnn(args ...interface{}) string {
- msg := fmt.Sprintln(args...)
- return msg[:len(msg)-1]
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/exported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/exported.go
deleted file mode 100644
index 9a0120ac1d..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/exported.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package logrus
-
-import (
- "io"
-)
-
-var (
- // std is the name of the standard logger in stdlib `log`
- std = New()
-)
-
-func StandardLogger() *Logger {
- return std
-}
-
-// SetOutput sets the standard logger output.
-func SetOutput(out io.Writer) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Out = out
-}
-
-// SetFormatter sets the standard logger formatter.
-func SetFormatter(formatter Formatter) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Formatter = formatter
-}
-
-// SetLevel sets the standard logger level.
-func SetLevel(level Level) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Level = level
-}
-
-// GetLevel returns the standard logger level.
-func GetLevel() Level {
- std.mu.Lock()
- defer std.mu.Unlock()
- return std.Level
-}
-
-// AddHook adds a hook to the standard logger hooks.
-func AddHook(hook Hook) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Hooks.Add(hook)
-}
-
-// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
-func WithError(err error) *Entry {
- return std.WithField(ErrorKey, err)
-}
-
-// WithField creates an entry from the standard logger and adds a field to
-// it. If you want multiple fields, use `WithFields`.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithField(key string, value interface{}) *Entry {
- return std.WithField(key, value)
-}
-
-// WithFields creates an entry from the standard logger and adds multiple
-// fields to it. This is simply a helper for `WithField`, invoking it
-// once for each field.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithFields(fields Fields) *Entry {
- return std.WithFields(fields)
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func Debug(args ...interface{}) {
- std.Debug(args...)
-}
-
-// Print logs a message at level Info on the standard logger.
-func Print(args ...interface{}) {
- std.Print(args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func Info(args ...interface{}) {
- std.Info(args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func Warn(args ...interface{}) {
- std.Warn(args...)
-}
-
-// Warning logs a message at level Warn on the standard logger.
-func Warning(args ...interface{}) {
- std.Warning(args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func Error(args ...interface{}) {
- std.Error(args...)
-}
-
-// Panic logs a message at level Panic on the standard logger.
-func Panic(args ...interface{}) {
- std.Panic(args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func Fatal(args ...interface{}) {
- std.Fatal(args...)
-}
-
-// Debugf logs a message at level Debug on the standard logger.
-func Debugf(format string, args ...interface{}) {
- std.Debugf(format, args...)
-}
-
-// Printf logs a message at level Info on the standard logger.
-func Printf(format string, args ...interface{}) {
- std.Printf(format, args...)
-}
-
-// Infof logs a message at level Info on the standard logger.
-func Infof(format string, args ...interface{}) {
- std.Infof(format, args...)
-}
-
-// Warnf logs a message at level Warn on the standard logger.
-func Warnf(format string, args ...interface{}) {
- std.Warnf(format, args...)
-}
-
-// Warningf logs a message at level Warn on the standard logger.
-func Warningf(format string, args ...interface{}) {
- std.Warningf(format, args...)
-}
-
-// Errorf logs a message at level Error on the standard logger.
-func Errorf(format string, args ...interface{}) {
- std.Errorf(format, args...)
-}
-
-// Panicf logs a message at level Panic on the standard logger.
-func Panicf(format string, args ...interface{}) {
- std.Panicf(format, args...)
-}
-
-// Fatalf logs a message at level Fatal on the standard logger.
-func Fatalf(format string, args ...interface{}) {
- std.Fatalf(format, args...)
-}
-
-// Debugln logs a message at level Debug on the standard logger.
-func Debugln(args ...interface{}) {
- std.Debugln(args...)
-}
-
-// Println logs a message at level Info on the standard logger.
-func Println(args ...interface{}) {
- std.Println(args...)
-}
-
-// Infoln logs a message at level Info on the standard logger.
-func Infoln(args ...interface{}) {
- std.Infoln(args...)
-}
-
-// Warnln logs a message at level Warn on the standard logger.
-func Warnln(args ...interface{}) {
- std.Warnln(args...)
-}
-
-// Warningln logs a message at level Warn on the standard logger.
-func Warningln(args ...interface{}) {
- std.Warningln(args...)
-}
-
-// Errorln logs a message at level Error on the standard logger.
-func Errorln(args ...interface{}) {
- std.Errorln(args...)
-}
-
-// Panicln logs a message at level Panic on the standard logger.
-func Panicln(args ...interface{}) {
- std.Panicln(args...)
-}
-
-// Fatalln logs a message at level Fatal on the standard logger.
-func Fatalln(args ...interface{}) {
- std.Fatalln(args...)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/formatter.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/formatter.go
deleted file mode 100644
index 104d689f18..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/formatter.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package logrus
-
-import "time"
-
-const DefaultTimestampFormat = time.RFC3339
-
-// The Formatter interface is used to implement a custom Formatter. It takes an
-// `Entry`. It exposes all the fields, including the default ones:
-//
-// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
-// * `entry.Data["time"]`. The timestamp.
-// * `entry.Data["level"]. The level the entry was logged at.
-//
-// Any additional fields added with `WithField` or `WithFields` are also in
-// `entry.Data`. Format is expected to return an array of bytes which are then
-// logged to `logger.Out`.
-type Formatter interface {
- Format(*Entry) ([]byte, error)
-}
-
-// This is to not silently overwrite `time`, `msg` and `level` fields when
-// dumping it. If this code wasn't there doing:
-//
-// logrus.WithField("level", 1).Info("hello")
-//
-// Would just silently drop the user provided level. Instead with this code
-// it'll logged as:
-//
-// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
-//
-// It's not exported because it's still using Data in an opinionated way. It's to
-// avoid code duplication between the two default formatters.
-func prefixFieldClashes(data Fields) {
- _, ok := data["time"]
- if ok {
- data["fields.time"] = data["time"]
- }
-
- _, ok = data["msg"]
- if ok {
- data["fields.msg"] = data["msg"]
- }
-
- _, ok = data["level"]
- if ok {
- data["fields.level"] = data["level"]
- }
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/hooks.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/hooks.go
deleted file mode 100644
index 3f151cdc39..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/hooks.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package logrus
-
-// A hook to be fired when logging on the logging levels returned from
-// `Levels()` on your implementation of the interface. Note that this is not
-// fired in a goroutine or a channel with workers, you should handle such
-// functionality yourself if your call is non-blocking and you don't wish for
-// the logging calls for levels returned from `Levels()` to block.
-type Hook interface {
- Levels() []Level
- Fire(*Entry) error
-}
-
-// Internal type for storing the hooks on a logger instance.
-type LevelHooks map[Level][]Hook
-
-// Add a hook to an instance of logger. This is called with
-// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
-func (hooks LevelHooks) Add(hook Hook) {
- for _, level := range hook.Levels() {
- hooks[level] = append(hooks[level], hook)
- }
-}
-
-// Fire all the hooks for the passed level. Used by `entry.log` to fire
-// appropriate hooks for a log entry.
-func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
- for _, hook := range hooks[level] {
- if err := hook.Fire(entry); err != nil {
- return err
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/json_formatter.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/json_formatter.go
deleted file mode 100644
index 2ad6dc5cf4..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/json_formatter.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package logrus
-
-import (
- "encoding/json"
- "fmt"
-)
-
-type JSONFormatter struct {
- // TimestampFormat sets the format used for marshaling timestamps.
- TimestampFormat string
-}
-
-func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
- data := make(Fields, len(entry.Data)+3)
- for k, v := range entry.Data {
- switch v := v.(type) {
- case error:
- // Otherwise errors are ignored by `encoding/json`
- // https://github.com/Sirupsen/logrus/issues/137
- data[k] = v.Error()
- default:
- data[k] = v
- }
- }
- prefixFieldClashes(data)
-
- timestampFormat := f.TimestampFormat
- if timestampFormat == "" {
- timestampFormat = DefaultTimestampFormat
- }
-
- data["time"] = entry.Time.Format(timestampFormat)
- data["msg"] = entry.Message
- data["level"] = entry.Level.String()
-
- serialized, err := json.Marshal(data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/logger.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/logger.go
deleted file mode 100644
index 2fdb231761..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/logger.go
+++ /dev/null
@@ -1,212 +0,0 @@
-package logrus
-
-import (
- "io"
- "os"
- "sync"
-)
-
-type Logger struct {
- // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
- // file, or leave it default which is `os.Stderr`. You can also set this to
- // something more adventorous, such as logging to Kafka.
- Out io.Writer
- // Hooks for the logger instance. These allow firing events based on logging
- // levels and log entries. For example, to send errors to an error tracking
- // service, log to StatsD or dump the core on fatal errors.
- Hooks LevelHooks
- // All log entries pass through the formatter before logged to Out. The
- // included formatters are `TextFormatter` and `JSONFormatter` for which
- // TextFormatter is the default. In development (when a TTY is attached) it
- // logs with colors, but to a file it wouldn't. You can easily implement your
- // own that implements the `Formatter` interface, see the `README` or included
- // formatters for examples.
- Formatter Formatter
- // The logging level the logger should log at. This is typically (and defaults
- // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
- // logged. `logrus.Debug` is useful in
- Level Level
- // Used to sync writing to the log.
- mu sync.Mutex
-}
-
-// Creates a new logger. Configuration should be set by changing `Formatter`,
-// `Out` and `Hooks` directly on the default logger instance. You can also just
-// instantiate your own:
-//
-// var log = &Logger{
-// Out: os.Stderr,
-// Formatter: new(JSONFormatter),
-// Hooks: make(LevelHooks),
-// Level: logrus.DebugLevel,
-// }
-//
-// It's recommended to make this a global instance called `log`.
-func New() *Logger {
- return &Logger{
- Out: os.Stderr,
- Formatter: new(TextFormatter),
- Hooks: make(LevelHooks),
- Level: InfoLevel,
- }
-}
-
-// Adds a field to the log entry, note that you it doesn't log until you call
-// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
-// If you want multiple fields, use `WithFields`.
-func (logger *Logger) WithField(key string, value interface{}) *Entry {
- return NewEntry(logger).WithField(key, value)
-}
-
-// Adds a struct of fields to the log entry. All it does is call `WithField` for
-// each `Field`.
-func (logger *Logger) WithFields(fields Fields) *Entry {
- return NewEntry(logger).WithFields(fields)
-}
-
-// Add an error as single field to the log entry. All it does is call
-// `WithError` for the given `error`.
-func (logger *Logger) WithError(err error) *Entry {
- return NewEntry(logger).WithError(err)
-}
-
-func (logger *Logger) Debugf(format string, args ...interface{}) {
- if logger.Level >= DebugLevel {
- NewEntry(logger).Debugf(format, args...)
- }
-}
-
-func (logger *Logger) Infof(format string, args ...interface{}) {
- if logger.Level >= InfoLevel {
- NewEntry(logger).Infof(format, args...)
- }
-}
-
-func (logger *Logger) Printf(format string, args ...interface{}) {
- NewEntry(logger).Printf(format, args...)
-}
-
-func (logger *Logger) Warnf(format string, args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnf(format, args...)
- }
-}
-
-func (logger *Logger) Warningf(format string, args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnf(format, args...)
- }
-}
-
-func (logger *Logger) Errorf(format string, args ...interface{}) {
- if logger.Level >= ErrorLevel {
- NewEntry(logger).Errorf(format, args...)
- }
-}
-
-func (logger *Logger) Fatalf(format string, args ...interface{}) {
- if logger.Level >= FatalLevel {
- NewEntry(logger).Fatalf(format, args...)
- }
- os.Exit(1)
-}
-
-func (logger *Logger) Panicf(format string, args ...interface{}) {
- if logger.Level >= PanicLevel {
- NewEntry(logger).Panicf(format, args...)
- }
-}
-
-func (logger *Logger) Debug(args ...interface{}) {
- if logger.Level >= DebugLevel {
- NewEntry(logger).Debug(args...)
- }
-}
-
-func (logger *Logger) Info(args ...interface{}) {
- if logger.Level >= InfoLevel {
- NewEntry(logger).Info(args...)
- }
-}
-
-func (logger *Logger) Print(args ...interface{}) {
- NewEntry(logger).Info(args...)
-}
-
-func (logger *Logger) Warn(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warn(args...)
- }
-}
-
-func (logger *Logger) Warning(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warn(args...)
- }
-}
-
-func (logger *Logger) Error(args ...interface{}) {
- if logger.Level >= ErrorLevel {
- NewEntry(logger).Error(args...)
- }
-}
-
-func (logger *Logger) Fatal(args ...interface{}) {
- if logger.Level >= FatalLevel {
- NewEntry(logger).Fatal(args...)
- }
- os.Exit(1)
-}
-
-func (logger *Logger) Panic(args ...interface{}) {
- if logger.Level >= PanicLevel {
- NewEntry(logger).Panic(args...)
- }
-}
-
-func (logger *Logger) Debugln(args ...interface{}) {
- if logger.Level >= DebugLevel {
- NewEntry(logger).Debugln(args...)
- }
-}
-
-func (logger *Logger) Infoln(args ...interface{}) {
- if logger.Level >= InfoLevel {
- NewEntry(logger).Infoln(args...)
- }
-}
-
-func (logger *Logger) Println(args ...interface{}) {
- NewEntry(logger).Println(args...)
-}
-
-func (logger *Logger) Warnln(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnln(args...)
- }
-}
-
-func (logger *Logger) Warningln(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnln(args...)
- }
-}
-
-func (logger *Logger) Errorln(args ...interface{}) {
- if logger.Level >= ErrorLevel {
- NewEntry(logger).Errorln(args...)
- }
-}
-
-func (logger *Logger) Fatalln(args ...interface{}) {
- if logger.Level >= FatalLevel {
- NewEntry(logger).Fatalln(args...)
- }
- os.Exit(1)
-}
-
-func (logger *Logger) Panicln(args ...interface{}) {
- if logger.Level >= PanicLevel {
- NewEntry(logger).Panicln(args...)
- }
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/logrus.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/logrus.go
deleted file mode 100644
index 0c09fbc264..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/logrus.go
+++ /dev/null
@@ -1,98 +0,0 @@
-package logrus
-
-import (
- "fmt"
- "log"
-)
-
-// Fields type, used to pass to `WithFields`.
-type Fields map[string]interface{}
-
-// Level type
-type Level uint8
-
-// Convert the Level to a string. E.g. PanicLevel becomes "panic".
-func (level Level) String() string {
- switch level {
- case DebugLevel:
- return "debug"
- case InfoLevel:
- return "info"
- case WarnLevel:
- return "warning"
- case ErrorLevel:
- return "error"
- case FatalLevel:
- return "fatal"
- case PanicLevel:
- return "panic"
- }
-
- return "unknown"
-}
-
-// ParseLevel takes a string level and returns the Logrus log level constant.
-func ParseLevel(lvl string) (Level, error) {
- switch lvl {
- case "panic":
- return PanicLevel, nil
- case "fatal":
- return FatalLevel, nil
- case "error":
- return ErrorLevel, nil
- case "warn", "warning":
- return WarnLevel, nil
- case "info":
- return InfoLevel, nil
- case "debug":
- return DebugLevel, nil
- }
-
- var l Level
- return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
-}
-
-// These are the different logging levels. You can set the logging level to log
-// on your instance of logger, obtained with `logrus.New()`.
-const (
- // PanicLevel level, highest level of severity. Logs and then calls panic with the
- // message passed to Debug, Info, ...
- PanicLevel Level = iota
- // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
- // logging level is set to Panic.
- FatalLevel
- // ErrorLevel level. Logs. Used for errors that should definitely be noted.
- // Commonly used for hooks to send errors to an error tracking service.
- ErrorLevel
- // WarnLevel level. Non-critical entries that deserve eyes.
- WarnLevel
- // InfoLevel level. General operational entries about what's going on inside the
- // application.
- InfoLevel
- // DebugLevel level. Usually only enabled when debugging. Very verbose logging.
- DebugLevel
-)
-
-// Won't compile if StdLogger can't be realized by a log.Logger
-var (
- _ StdLogger = &log.Logger{}
- _ StdLogger = &Entry{}
- _ StdLogger = &Logger{}
-)
-
-// StdLogger is what your logrus-enabled library should take, that way
-// it'll accept a stdlib logger and a logrus logger. There's no standard
-// interface, this is the closest we get, unfortunately.
-type StdLogger interface {
- Print(...interface{})
- Printf(string, ...interface{})
- Println(...interface{})
-
- Fatal(...interface{})
- Fatalf(string, ...interface{})
- Fatalln(...interface{})
-
- Panic(...interface{})
- Panicf(string, ...interface{})
- Panicln(...interface{})
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_bsd.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_bsd.go
deleted file mode 100644
index 71f8d67a55..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_bsd.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build darwin freebsd openbsd netbsd dragonfly
-
-package logrus
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-type Termios syscall.Termios
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_notwindows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_notwindows.go
deleted file mode 100644
index b343b3a375..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_notwindows.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-package logrus
-
-import (
- "syscall"
- "unsafe"
-)
-
-// IsTerminal returns true if stderr's file descriptor is a terminal.
-func IsTerminal() bool {
- fd := syscall.Stderr
- var termios Termios
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
- return err == 0
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_solaris.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_solaris.go
deleted file mode 100644
index 743df457f4..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_solaris.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// +build solaris
-
-package logrus
-
-import (
- "os"
-
- "github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix"
-)
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal() bool {
- _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
- return err == nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go
deleted file mode 100644
index 0146845d16..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package logrus
-
-import (
- "syscall"
- "unsafe"
-)
-
-var kernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-var (
- procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
-)
-
-// IsTerminal returns true if stderr's file descriptor is a terminal.
-func IsTerminal() bool {
- fd := syscall.Stderr
- var st uint32
- r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
- return r != 0 && e == 0
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/text_formatter.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/text_formatter.go
deleted file mode 100644
index 06ef202337..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/text_formatter.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "runtime"
- "sort"
- "strings"
- "time"
-)
-
-const (
- nocolor = 0
- red = 31
- green = 32
- yellow = 33
- blue = 34
- gray = 37
-)
-
-var (
- baseTimestamp time.Time
- isTerminal bool
-)
-
-func init() {
- baseTimestamp = time.Now()
- isTerminal = IsTerminal()
-}
-
-func miniTS() int {
- return int(time.Since(baseTimestamp) / time.Second)
-}
-
-type TextFormatter struct {
- // Set to true to bypass checking for a TTY before outputting colors.
- ForceColors bool
-
- // Force disabling colors.
- DisableColors bool
-
- // Disable timestamp logging. useful when output is redirected to logging
- // system that already adds timestamps.
- DisableTimestamp bool
-
- // Enable logging the full timestamp when a TTY is attached instead of just
- // the time passed since beginning of execution.
- FullTimestamp bool
-
- // TimestampFormat to use for display when a full timestamp is printed
- TimestampFormat string
-
- // The fields are sorted by default for a consistent output. For applications
- // that log extremely frequently and don't use the JSON formatter this may not
- // be desired.
- DisableSorting bool
-}
-
-func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
- var keys []string = make([]string, 0, len(entry.Data))
- for k := range entry.Data {
- keys = append(keys, k)
- }
-
- if !f.DisableSorting {
- sort.Strings(keys)
- }
-
- b := &bytes.Buffer{}
-
- prefixFieldClashes(entry.Data)
-
- isColorTerminal := isTerminal && (runtime.GOOS != "windows")
- isColored := (f.ForceColors || isColorTerminal) && !f.DisableColors
-
- timestampFormat := f.TimestampFormat
- if timestampFormat == "" {
- timestampFormat = DefaultTimestampFormat
- }
- if isColored {
- f.printColored(b, entry, keys, timestampFormat)
- } else {
- if !f.DisableTimestamp {
- f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
- }
- f.appendKeyValue(b, "level", entry.Level.String())
- if entry.Message != "" {
- f.appendKeyValue(b, "msg", entry.Message)
- }
- for _, key := range keys {
- f.appendKeyValue(b, key, entry.Data[key])
- }
- }
-
- b.WriteByte('\n')
- return b.Bytes(), nil
-}
-
-func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
- var levelColor int
- switch entry.Level {
- case DebugLevel:
- levelColor = gray
- case WarnLevel:
- levelColor = yellow
- case ErrorLevel, FatalLevel, PanicLevel:
- levelColor = red
- default:
- levelColor = blue
- }
-
- levelText := strings.ToUpper(entry.Level.String())[0:4]
-
- if !f.FullTimestamp {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, miniTS(), entry.Message)
- } else {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
- }
- for _, k := range keys {
- v := entry.Data[k]
- fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=%+v", levelColor, k, v)
- }
-}
-
-func needsQuoting(text string) bool {
- for _, ch := range text {
- if !((ch >= 'a' && ch <= 'z') ||
- (ch >= 'A' && ch <= 'Z') ||
- (ch >= '0' && ch <= '9') ||
- ch == '-' || ch == '.') {
- return false
- }
- }
- return true
-}
-
-func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
-
- b.WriteString(key)
- b.WriteByte('=')
-
- switch value := value.(type) {
- case string:
- if needsQuoting(value) {
- b.WriteString(value)
- } else {
- fmt.Fprintf(b, "%q", value)
- }
- case error:
- errmsg := value.Error()
- if needsQuoting(errmsg) {
- b.WriteString(errmsg)
- } else {
- fmt.Fprintf(b, "%q", value)
- }
- default:
- fmt.Fprint(b, value)
- }
-
- b.WriteByte(' ')
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/writer.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/writer.go
deleted file mode 100644
index 1e30b1c753..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/writer.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package logrus
-
-import (
- "bufio"
- "io"
- "runtime"
-)
-
-func (logger *Logger) Writer() *io.PipeWriter {
- reader, writer := io.Pipe()
-
- go logger.writerScanner(reader)
- runtime.SetFinalizer(writer, writerFinalizer)
-
- return writer
-}
-
-func (logger *Logger) writerScanner(reader *io.PipeReader) {
- scanner := bufio.NewScanner(reader)
- for scanner.Scan() {
- logger.Print(scanner.Text())
- }
- if err := scanner.Err(); err != nil {
- logger.Errorf("Error while reading from Writer: %s", err)
- }
- reader.Close()
-}
-
-func writerFinalizer(writer *io.PipeWriter) {
- writer.Close()
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/envfile.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/envfile.go
deleted file mode 100644
index ba8b4f2016..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/envfile.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package opts
-
-import (
- "bufio"
- "fmt"
- "os"
- "strings"
-)
-
-// ParseEnvFile reads a file with environment variables enumerated by lines
-//
-// ``Environment variable names used by the utilities in the Shell and
-// Utilities volume of IEEE Std 1003.1-2001 consist solely of uppercase
-// letters, digits, and the '_' (underscore) from the characters defined in
-// Portable Character Set and do not begin with a digit. *But*, other
-// characters may be permitted by an implementation; applications shall
-// tolerate the presence of such names.''
-// -- http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html
-//
-// As of #16585, it's up to application inside docker to validate or not
-// environment variables, that's why we just strip leading whitespace and
-// nothing more.
-func ParseEnvFile(filename string) ([]string, error) {
- fh, err := os.Open(filename)
- if err != nil {
- return []string{}, err
- }
- defer fh.Close()
-
- lines := []string{}
- scanner := bufio.NewScanner(fh)
- for scanner.Scan() {
- // trim the line from all leading whitespace first
- line := strings.TrimLeft(scanner.Text(), whiteSpaces)
- // line is not empty, and not starting with '#'
- if len(line) > 0 && !strings.HasPrefix(line, "#") {
- data := strings.SplitN(line, "=", 2)
-
- // trim the front of a variable, but nothing else
- variable := strings.TrimLeft(data[0], whiteSpaces)
- if strings.ContainsAny(variable, whiteSpaces) {
- return []string{}, ErrBadEnvVariable{fmt.Sprintf("variable '%s' has white spaces", variable)}
- }
-
- if len(data) > 1 {
-
- // pass the value through, no trimming
- lines = append(lines, fmt.Sprintf("%s=%s", variable, data[1]))
- } else {
- // if only a pass-through variable is given, clean it up.
- lines = append(lines, fmt.Sprintf("%s=%s", strings.TrimSpace(line), os.Getenv(line)))
- }
- }
- }
- return lines, scanner.Err()
-}
-
-var whiteSpaces = " \t"
-
-// ErrBadEnvVariable typed error for bad environment variable
-type ErrBadEnvVariable struct {
- msg string
-}
-
-func (e ErrBadEnvVariable) Error() string {
- return fmt.Sprintf("poorly formatted environment: %s", e.msg)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts.go
deleted file mode 100644
index d1b6985415..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package opts
-
-import (
- "fmt"
- "net"
- "net/url"
- "runtime"
- "strconv"
- "strings"
-)
-
-var (
- // DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. docker daemon -H tcp://
- // TODO Windows. DefaultHTTPPort is only used on Windows if a -H parameter
- // is not supplied. A better longer term solution would be to use a named
- // pipe as the default on the Windows daemon.
- // These are the IANA registered port numbers for use with Docker
- // see http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker
- DefaultHTTPPort = 2375 // Default HTTP Port
- // DefaultTLSHTTPPort Default HTTP Port used when TLS enabled
- DefaultTLSHTTPPort = 2376 // Default TLS encrypted HTTP Port
- // DefaultUnixSocket Path for the unix socket.
- // Docker daemon by default always listens on the default unix socket
- DefaultUnixSocket = "/var/run/docker.sock"
- // DefaultTCPHost constant defines the default host string used by docker on Windows
- DefaultTCPHost = fmt.Sprintf("tcp://%s:%d", DefaultHTTPHost, DefaultHTTPPort)
- // DefaultTLSHost constant defines the default host string used by docker for TLS sockets
- DefaultTLSHost = fmt.Sprintf("tcp://%s:%d", DefaultHTTPHost, DefaultTLSHTTPPort)
-)
-
-// ValidateHost validates that the specified string is a valid host and returns it.
-func ValidateHost(val string) (string, error) {
- _, err := parseDockerDaemonHost(DefaultTCPHost, DefaultTLSHost, DefaultUnixSocket, "", val)
- if err != nil {
- return val, err
- }
- // Note: unlike most flag validators, we don't return the mutated value here
- // we need to know what the user entered later (using ParseHost) to adjust for tls
- return val, nil
-}
-
-// ParseHost and set defaults for a Daemon host string
-func ParseHost(defaultHost, val string) (string, error) {
- host, err := parseDockerDaemonHost(DefaultTCPHost, DefaultTLSHost, DefaultUnixSocket, defaultHost, val)
- if err != nil {
- return val, err
- }
- return host, nil
-}
-
-// parseDockerDaemonHost parses the specified address and returns an address that will be used as the host.
-// Depending of the address specified, will use the defaultTCPAddr or defaultUnixAddr
-// defaultUnixAddr must be a absolute file path (no `unix://` prefix)
-// defaultTCPAddr must be the full `tcp://host:port` form
-func parseDockerDaemonHost(defaultTCPAddr, defaultTLSHost, defaultUnixAddr, defaultAddr, addr string) (string, error) {
- addr = strings.TrimSpace(addr)
- if addr == "" {
- if defaultAddr == defaultTLSHost {
- return defaultTLSHost, nil
- }
- if runtime.GOOS != "windows" {
- return fmt.Sprintf("unix://%s", defaultUnixAddr), nil
- }
- return defaultTCPAddr, nil
- }
- addrParts := strings.Split(addr, "://")
- if len(addrParts) == 1 {
- addrParts = []string{"tcp", addrParts[0]}
- }
-
- switch addrParts[0] {
- case "tcp":
- return parseTCPAddr(addrParts[1], defaultTCPAddr)
- case "unix":
- return parseUnixAddr(addrParts[1], defaultUnixAddr)
- case "fd":
- return addr, nil
- default:
- return "", fmt.Errorf("Invalid bind address format: %s", addr)
- }
-}
-
-// parseUnixAddr parses and validates that the specified address is a valid UNIX
-// socket address. It returns a formatted UNIX socket address, either using the
-// address parsed from addr, or the contents of defaultAddr if addr is a blank
-// string.
-func parseUnixAddr(addr string, defaultAddr string) (string, error) {
- addr = strings.TrimPrefix(addr, "unix://")
- if strings.Contains(addr, "://") {
- return "", fmt.Errorf("Invalid proto, expected unix: %s", addr)
- }
- if addr == "" {
- addr = defaultAddr
- }
- return fmt.Sprintf("unix://%s", addr), nil
-}
-
-// parseTCPAddr parses and validates that the specified address is a valid TCP
-// address. It returns a formatted TCP address, either using the address parsed
-// from tryAddr, or the contents of defaultAddr if tryAddr is a blank string.
-// tryAddr is expected to have already been Trim()'d
-// defaultAddr must be in the full `tcp://host:port` form
-func parseTCPAddr(tryAddr string, defaultAddr string) (string, error) {
- if tryAddr == "" || tryAddr == "tcp://" {
- return defaultAddr, nil
- }
- addr := strings.TrimPrefix(tryAddr, "tcp://")
- if strings.Contains(addr, "://") || addr == "" {
- return "", fmt.Errorf("Invalid proto, expected tcp: %s", tryAddr)
- }
-
- defaultAddr = strings.TrimPrefix(defaultAddr, "tcp://")
- defaultHost, defaultPort, err := net.SplitHostPort(defaultAddr)
- if err != nil {
- return "", err
- }
- // url.Parse fails for trailing colon on IPv6 brackets on Go 1.5, but
- // not 1.4. See https://github.com/golang/go/issues/12200 and
- // https://github.com/golang/go/issues/6530.
- if strings.HasSuffix(addr, "]:") {
- addr += defaultPort
- }
-
- u, err := url.Parse("tcp://" + addr)
- if err != nil {
- return "", err
- }
-
- host, port, err := net.SplitHostPort(u.Host)
- if err != nil {
- return "", fmt.Errorf("Invalid bind address format: %s", tryAddr)
- }
-
- if host == "" {
- host = defaultHost
- }
- if port == "" {
- port = defaultPort
- }
- p, err := strconv.Atoi(port)
- if err != nil && p == 0 {
- return "", fmt.Errorf("Invalid bind address format: %s", tryAddr)
- }
-
- return fmt.Sprintf("tcp://%s%s", net.JoinHostPort(host, port), u.Path), nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_unix.go
deleted file mode 100644
index 611407a9d9..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_unix.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build !windows
-
-package opts
-
-import "fmt"
-
-// DefaultHost constant defines the default host string used by docker on other hosts than Windows
-var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_windows.go
deleted file mode 100644
index ec52e9a70a..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_windows.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// +build windows
-
-package opts
-
-// DefaultHost constant defines the default host string used by docker on Windows
-var DefaultHost = DefaultTCPHost
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/ip.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/ip.go
deleted file mode 100644
index c7b0dc9947..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/ip.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package opts
-
-import (
- "fmt"
- "net"
-)
-
-// IPOpt holds an IP. It is used to store values from CLI flags.
-type IPOpt struct {
- *net.IP
-}
-
-// NewIPOpt creates a new IPOpt from a reference net.IP and a
-// string representation of an IP. If the string is not a valid
-// IP it will fallback to the specified reference.
-func NewIPOpt(ref *net.IP, defaultVal string) *IPOpt {
- o := &IPOpt{
- IP: ref,
- }
- o.Set(defaultVal)
- return o
-}
-
-// Set sets an IPv4 or IPv6 address from a given string. If the given
-// string is not parseable as an IP address it returns an error.
-func (o *IPOpt) Set(val string) error {
- ip := net.ParseIP(val)
- if ip == nil {
- return fmt.Errorf("%s is not an ip address", val)
- }
- *o.IP = ip
- return nil
-}
-
-// String returns the IP address stored in the IPOpt. If stored IP is a
-// nil pointer, it returns an empty string.
-func (o *IPOpt) String() string {
- if *o.IP == nil {
- return ""
- }
- return o.IP.String()
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts.go
deleted file mode 100644
index b244f5a3a9..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts.go
+++ /dev/null
@@ -1,252 +0,0 @@
-package opts
-
-import (
- "fmt"
- "net"
- "os"
- "regexp"
- "strings"
-)
-
-var (
- alphaRegexp = regexp.MustCompile(`[a-zA-Z]`)
- domainRegexp = regexp.MustCompile(`^(:?(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]))(:?\.(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])))*)\.?\s*$`)
-)
-
-// ListOpts holds a list of values and a validation function.
-type ListOpts struct {
- values *[]string
- validator ValidatorFctType
-}
-
-// NewListOpts creates a new ListOpts with the specified validator.
-func NewListOpts(validator ValidatorFctType) ListOpts {
- var values []string
- return *NewListOptsRef(&values, validator)
-}
-
-// NewListOptsRef creates a new ListOpts with the specified values and validator.
-func NewListOptsRef(values *[]string, validator ValidatorFctType) *ListOpts {
- return &ListOpts{
- values: values,
- validator: validator,
- }
-}
-
-func (opts *ListOpts) String() string {
- return fmt.Sprintf("%v", []string((*opts.values)))
-}
-
-// Set validates if needed the input value and add it to the
-// internal slice.
-func (opts *ListOpts) Set(value string) error {
- if opts.validator != nil {
- v, err := opts.validator(value)
- if err != nil {
- return err
- }
- value = v
- }
- (*opts.values) = append((*opts.values), value)
- return nil
-}
-
-// Delete removes the specified element from the slice.
-func (opts *ListOpts) Delete(key string) {
- for i, k := range *opts.values {
- if k == key {
- (*opts.values) = append((*opts.values)[:i], (*opts.values)[i+1:]...)
- return
- }
- }
-}
-
-// GetMap returns the content of values in a map in order to avoid
-// duplicates.
-func (opts *ListOpts) GetMap() map[string]struct{} {
- ret := make(map[string]struct{})
- for _, k := range *opts.values {
- ret[k] = struct{}{}
- }
- return ret
-}
-
-// GetAll returns the values of slice.
-func (opts *ListOpts) GetAll() []string {
- return (*opts.values)
-}
-
-// GetAllOrEmpty returns the values of the slice
-// or an empty slice when there are no values.
-func (opts *ListOpts) GetAllOrEmpty() []string {
- v := *opts.values
- if v == nil {
- return make([]string, 0)
- }
- return v
-}
-
-// Get checks the existence of the specified key.
-func (opts *ListOpts) Get(key string) bool {
- for _, k := range *opts.values {
- if k == key {
- return true
- }
- }
- return false
-}
-
-// Len returns the amount of element in the slice.
-func (opts *ListOpts) Len() int {
- return len((*opts.values))
-}
-
-//MapOpts holds a map of values and a validation function.
-type MapOpts struct {
- values map[string]string
- validator ValidatorFctType
-}
-
-// Set validates if needed the input value and add it to the
-// internal map, by splitting on '='.
-func (opts *MapOpts) Set(value string) error {
- if opts.validator != nil {
- v, err := opts.validator(value)
- if err != nil {
- return err
- }
- value = v
- }
- vals := strings.SplitN(value, "=", 2)
- if len(vals) == 1 {
- (opts.values)[vals[0]] = ""
- } else {
- (opts.values)[vals[0]] = vals[1]
- }
- return nil
-}
-
-// GetAll returns the values of MapOpts as a map.
-func (opts *MapOpts) GetAll() map[string]string {
- return opts.values
-}
-
-func (opts *MapOpts) String() string {
- return fmt.Sprintf("%v", map[string]string((opts.values)))
-}
-
-// NewMapOpts creates a new MapOpts with the specified map of values and a validator.
-func NewMapOpts(values map[string]string, validator ValidatorFctType) *MapOpts {
- if values == nil {
- values = make(map[string]string)
- }
- return &MapOpts{
- values: values,
- validator: validator,
- }
-}
-
-// ValidatorFctType defines a validator function that returns a validated string and/or an error.
-type ValidatorFctType func(val string) (string, error)
-
-// ValidatorFctListType defines a validator function that returns a validated list of string and/or an error
-type ValidatorFctListType func(val string) ([]string, error)
-
-// ValidateAttach validates that the specified string is a valid attach option.
-func ValidateAttach(val string) (string, error) {
- s := strings.ToLower(val)
- for _, str := range []string{"stdin", "stdout", "stderr"} {
- if s == str {
- return s, nil
- }
- }
- return val, fmt.Errorf("valid streams are STDIN, STDOUT and STDERR")
-}
-
-// ValidateEnv validates an environment variable and returns it.
-// If no value is specified, it returns the current value using os.Getenv.
-//
-// As on ParseEnvFile and related to #16585, environment variable names
-// are not validate what so ever, it's up to application inside docker
-// to validate them or not.
-func ValidateEnv(val string) (string, error) {
- arr := strings.Split(val, "=")
- if len(arr) > 1 {
- return val, nil
- }
- if !doesEnvExist(val) {
- return val, nil
- }
- return fmt.Sprintf("%s=%s", val, os.Getenv(val)), nil
-}
-
-// ValidateIPAddress validates an Ip address.
-func ValidateIPAddress(val string) (string, error) {
- var ip = net.ParseIP(strings.TrimSpace(val))
- if ip != nil {
- return ip.String(), nil
- }
- return "", fmt.Errorf("%s is not an ip address", val)
-}
-
-// ValidateMACAddress validates a MAC address.
-func ValidateMACAddress(val string) (string, error) {
- _, err := net.ParseMAC(strings.TrimSpace(val))
- if err != nil {
- return "", err
- }
- return val, nil
-}
-
-// ValidateDNSSearch validates domain for resolvconf search configuration.
-// A zero length domain is represented by a dot (.).
-func ValidateDNSSearch(val string) (string, error) {
- if val = strings.Trim(val, " "); val == "." {
- return val, nil
- }
- return validateDomain(val)
-}
-
-func validateDomain(val string) (string, error) {
- if alphaRegexp.FindString(val) == "" {
- return "", fmt.Errorf("%s is not a valid domain", val)
- }
- ns := domainRegexp.FindSubmatch([]byte(val))
- if len(ns) > 0 && len(ns[1]) < 255 {
- return string(ns[1]), nil
- }
- return "", fmt.Errorf("%s is not a valid domain", val)
-}
-
-// ValidateExtraHost validates that the specified string is a valid extrahost and returns it.
-// ExtraHost are in the form of name:ip where the ip has to be a valid ip (ipv4 or ipv6).
-func ValidateExtraHost(val string) (string, error) {
- // allow for IPv6 addresses in extra hosts by only splitting on first ":"
- arr := strings.SplitN(val, ":", 2)
- if len(arr) != 2 || len(arr[0]) == 0 {
- return "", fmt.Errorf("bad format for add-host: %q", val)
- }
- if _, err := ValidateIPAddress(arr[1]); err != nil {
- return "", fmt.Errorf("invalid IP address in add-host: %q", arr[1])
- }
- return val, nil
-}
-
-// ValidateLabel validates that the specified string is a valid label, and returns it.
-// Labels are in the form on key=value.
-func ValidateLabel(val string) (string, error) {
- if strings.Count(val, "=") < 1 {
- return "", fmt.Errorf("bad attribute format: %s", val)
- }
- return val, nil
-}
-
-func doesEnvExist(name string) bool {
- for _, entry := range os.Environ() {
- parts := strings.SplitN(entry, "=", 2)
- if parts[0] == name {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts_unix.go
deleted file mode 100644
index f1ce844a8f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts_unix.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// +build !windows
-
-package opts
-
-// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080
-const DefaultHTTPHost = "localhost"
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts_windows.go
deleted file mode 100644
index 2a9e2be744..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/opts_windows.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package opts
-
-// TODO Windows. Identify bug in GOLang 1.5.1 and/or Windows Server 2016 TP4.
-// @jhowardmsft, @swernli.
-//
-// On Windows, this mitigates a problem with the default options of running
-// a docker client against a local docker daemon on TP4.
-//
-// What was found that if the default host is "localhost", even if the client
-// (and daemon as this is local) is not physically on a network, and the DNS
-// cache is flushed (ipconfig /flushdns), then the client will pause for
-// exactly one second when connecting to the daemon for calls. For example
-// using docker run windowsservercore cmd, the CLI will send a create followed
-// by an attach. You see the delay between the attach finishing and the attach
-// being seen by the daemon.
-//
-// Here's some daemon debug logs with additional debug spew put in. The
-// AfterWriteJSON log is the very last thing the daemon does as part of the
-// create call. The POST /attach is the second CLI call. Notice the second
-// time gap.
-//
-// time="2015-11-06T13:38:37.259627400-08:00" level=debug msg="After createRootfs"
-// time="2015-11-06T13:38:37.263626300-08:00" level=debug msg="After setHostConfig"
-// time="2015-11-06T13:38:37.267631200-08:00" level=debug msg="before createContainerPl...."
-// time="2015-11-06T13:38:37.271629500-08:00" level=debug msg=ToDiskLocking....
-// time="2015-11-06T13:38:37.275643200-08:00" level=debug msg="loggin event...."
-// time="2015-11-06T13:38:37.277627600-08:00" level=debug msg="logged event...."
-// time="2015-11-06T13:38:37.279631800-08:00" level=debug msg="In defer func"
-// time="2015-11-06T13:38:37.282628100-08:00" level=debug msg="After daemon.create"
-// time="2015-11-06T13:38:37.286651700-08:00" level=debug msg="return 2"
-// time="2015-11-06T13:38:37.289629500-08:00" level=debug msg="Returned from daemon.ContainerCreate"
-// time="2015-11-06T13:38:37.311629100-08:00" level=debug msg="After WriteJSON"
-// ... 1 second gap here....
-// time="2015-11-06T13:38:38.317866200-08:00" level=debug msg="Calling POST /v1.22/containers/984758282b842f779e805664b2c95d563adc9a979c8a3973e68c807843ee4757/attach"
-// time="2015-11-06T13:38:38.326882500-08:00" level=info msg="POST /v1.22/containers/984758282b842f779e805664b2c95d563adc9a979c8a3973e68c807843ee4757/attach?stderr=1&stdin=1&stdout=1&stream=1"
-//
-// We suspect this is either a bug introduced in GOLang 1.5.1, or that a change
-// in GOLang 1.5.1 (from 1.4.3) is exposing a bug in Windows TP4. In theory,
-// the Windows networking stack is supposed to resolve "localhost" internally,
-// without hitting DNS, or even reading the hosts file (which is why localhost
-// is commented out in the hosts file on Windows).
-//
-// We have validated that working around this using the actual IPv4 localhost
-// address does not cause the delay.
-//
-// This does not occur with the docker client built with 1.4.3 on the same
-// Windows TP4 build, regardless of whether the daemon is built using 1.5.1
-// or 1.4.3. It does not occur on Linux. We also verified we see the same thing
-// on a cross-compiled Windows binary (from Linux).
-//
-// Final note: This is a mitigation, not a 'real' fix. It is still susceptible
-// to the delay in TP4 if a user were to do 'docker run -H=tcp://localhost:2375...'
-// explicitly.
-
-// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080
-const DefaultHTTPHost = "127.0.0.1"
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/README.md b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/README.md
deleted file mode 100644
index 7307d9694f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/README.md
+++ /dev/null
@@ -1 +0,0 @@
-This code provides helper functions for dealing with archive files.
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive.go
deleted file mode 100644
index ce84347d30..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive.go
+++ /dev/null
@@ -1,1049 +0,0 @@
-package archive
-
-import (
- "archive/tar"
- "bufio"
- "bytes"
- "compress/bzip2"
- "compress/gzip"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "runtime"
- "strings"
- "syscall"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/promise"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-type (
- // Archive is a type of io.ReadCloser which has two interfaces Read and Closer.
- Archive io.ReadCloser
- // Reader is a type of io.Reader.
- Reader io.Reader
- // Compression is the state represents if compressed or not.
- Compression int
- // TarChownOptions wraps the chown options UID and GID.
- TarChownOptions struct {
- UID, GID int
- }
- // TarOptions wraps the tar options.
- TarOptions struct {
- IncludeFiles []string
- ExcludePatterns []string
- Compression Compression
- NoLchown bool
- UIDMaps []idtools.IDMap
- GIDMaps []idtools.IDMap
- ChownOpts *TarChownOptions
- IncludeSourceDir bool
- // When unpacking, specifies whether overwriting a directory with a
- // non-directory is allowed and vice versa.
- NoOverwriteDirNonDir bool
- // For each include when creating an archive, the included name will be
- // replaced with the matching name from this map.
- RebaseNames map[string]string
- }
-
- // Archiver allows the reuse of most utility functions of this package
- // with a pluggable Untar function. Also, to facilitate the passing of
- // specific id mappings for untar, an archiver can be created with maps
- // which will then be passed to Untar operations
- Archiver struct {
- Untar func(io.Reader, string, *TarOptions) error
- UIDMaps []idtools.IDMap
- GIDMaps []idtools.IDMap
- }
-
- // breakoutError is used to differentiate errors related to breaking out
- // When testing archive breakout in the unit tests, this error is expected
- // in order for the test to pass.
- breakoutError error
-)
-
-var (
- // ErrNotImplemented is the error message of function not implemented.
- ErrNotImplemented = errors.New("Function not implemented")
- defaultArchiver = &Archiver{Untar: Untar, UIDMaps: nil, GIDMaps: nil}
-)
-
-const (
- // HeaderSize is the size in bytes of a tar header
- HeaderSize = 512
-)
-
-const (
- // Uncompressed represents the uncompressed.
- Uncompressed Compression = iota
- // Bzip2 is bzip2 compression algorithm.
- Bzip2
- // Gzip is gzip compression algorithm.
- Gzip
- // Xz is xz compression algorithm.
- Xz
-)
-
-// IsArchive checks for the magic bytes of a tar or any supported compression
-// algorithm.
-func IsArchive(header []byte) bool {
- compression := DetectCompression(header)
- if compression != Uncompressed {
- return true
- }
- r := tar.NewReader(bytes.NewBuffer(header))
- _, err := r.Next()
- return err == nil
-}
-
-// IsArchivePath checks if the (possibly compressed) file at the given path
-// starts with a tar file header.
-func IsArchivePath(path string) bool {
- file, err := os.Open(path)
- if err != nil {
- return false
- }
- defer file.Close()
- rdr, err := DecompressStream(file)
- if err != nil {
- return false
- }
- r := tar.NewReader(rdr)
- _, err = r.Next()
- return err == nil
-}
-
-// DetectCompression detects the compression algorithm of the source.
-func DetectCompression(source []byte) Compression {
- for compression, m := range map[Compression][]byte{
- Bzip2: {0x42, 0x5A, 0x68},
- Gzip: {0x1F, 0x8B, 0x08},
- Xz: {0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00},
- } {
- if len(source) < len(m) {
- logrus.Debugf("Len too short")
- continue
- }
- if bytes.Compare(m, source[:len(m)]) == 0 {
- return compression
- }
- }
- return Uncompressed
-}
-
-func xzDecompress(archive io.Reader) (io.ReadCloser, <-chan struct{}, error) {
- args := []string{"xz", "-d", "-c", "-q"}
-
- return cmdStream(exec.Command(args[0], args[1:]...), archive)
-}
-
-// DecompressStream decompress the archive and returns a ReaderCloser with the decompressed archive.
-func DecompressStream(archive io.Reader) (io.ReadCloser, error) {
- p := pools.BufioReader32KPool
- buf := p.Get(archive)
- bs, err := buf.Peek(10)
- if err != nil && err != io.EOF {
- // Note: we'll ignore any io.EOF error because there are some odd
- // cases where the layer.tar file will be empty (zero bytes) and
- // that results in an io.EOF from the Peek() call. So, in those
- // cases we'll just treat it as a non-compressed stream and
- // that means just create an empty layer.
- // See Issue 18170
- return nil, err
- }
-
- compression := DetectCompression(bs)
- switch compression {
- case Uncompressed:
- readBufWrapper := p.NewReadCloserWrapper(buf, buf)
- return readBufWrapper, nil
- case Gzip:
- gzReader, err := gzip.NewReader(buf)
- if err != nil {
- return nil, err
- }
- readBufWrapper := p.NewReadCloserWrapper(buf, gzReader)
- return readBufWrapper, nil
- case Bzip2:
- bz2Reader := bzip2.NewReader(buf)
- readBufWrapper := p.NewReadCloserWrapper(buf, bz2Reader)
- return readBufWrapper, nil
- case Xz:
- xzReader, chdone, err := xzDecompress(buf)
- if err != nil {
- return nil, err
- }
- readBufWrapper := p.NewReadCloserWrapper(buf, xzReader)
- return ioutils.NewReadCloserWrapper(readBufWrapper, func() error {
- <-chdone
- return readBufWrapper.Close()
- }), nil
- default:
- return nil, fmt.Errorf("Unsupported compression format %s", (&compression).Extension())
- }
-}
-
-// CompressStream compresses the dest with specified compression algorithm.
-func CompressStream(dest io.WriteCloser, compression Compression) (io.WriteCloser, error) {
- p := pools.BufioWriter32KPool
- buf := p.Get(dest)
- switch compression {
- case Uncompressed:
- writeBufWrapper := p.NewWriteCloserWrapper(buf, buf)
- return writeBufWrapper, nil
- case Gzip:
- gzWriter := gzip.NewWriter(dest)
- writeBufWrapper := p.NewWriteCloserWrapper(buf, gzWriter)
- return writeBufWrapper, nil
- case Bzip2, Xz:
- // archive/bzip2 does not support writing, and there is no xz support at all
- // However, this is not a problem as docker only currently generates gzipped tars
- return nil, fmt.Errorf("Unsupported compression format %s", (&compression).Extension())
- default:
- return nil, fmt.Errorf("Unsupported compression format %s", (&compression).Extension())
- }
-}
-
-// Extension returns the extension of a file that uses the specified compression algorithm.
-func (compression *Compression) Extension() string {
- switch *compression {
- case Uncompressed:
- return "tar"
- case Bzip2:
- return "tar.bz2"
- case Gzip:
- return "tar.gz"
- case Xz:
- return "tar.xz"
- }
- return ""
-}
-
-type tarAppender struct {
- TarWriter *tar.Writer
- Buffer *bufio.Writer
-
- // for hardlink mapping
- SeenFiles map[uint64]string
- UIDMaps []idtools.IDMap
- GIDMaps []idtools.IDMap
-}
-
-// canonicalTarName provides a platform-independent and consistent posix-style
-//path for files and directories to be archived regardless of the platform.
-func canonicalTarName(name string, isDir bool) (string, error) {
- name, err := CanonicalTarNameForPath(name)
- if err != nil {
- return "", err
- }
-
- // suffix with '/' for directories
- if isDir && !strings.HasSuffix(name, "/") {
- name += "/"
- }
- return name, nil
-}
-
-func (ta *tarAppender) addTarFile(path, name string) error {
- fi, err := os.Lstat(path)
- if err != nil {
- return err
- }
-
- link := ""
- if fi.Mode()&os.ModeSymlink != 0 {
- if link, err = os.Readlink(path); err != nil {
- return err
- }
- }
-
- hdr, err := tar.FileInfoHeader(fi, link)
- if err != nil {
- return err
- }
- hdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode)))
-
- name, err = canonicalTarName(name, fi.IsDir())
- if err != nil {
- return fmt.Errorf("tar: cannot canonicalize path: %v", err)
- }
- hdr.Name = name
-
- inode, err := setHeaderForSpecialDevice(hdr, ta, name, fi.Sys())
- if err != nil {
- return err
- }
-
- // if it's not a directory and has more than 1 link,
- // it's hardlinked, so set the type flag accordingly
- if !fi.IsDir() && hasHardlinks(fi) {
- // a link should have a name that it links too
- // and that linked name should be first in the tar archive
- if oldpath, ok := ta.SeenFiles[inode]; ok {
- hdr.Typeflag = tar.TypeLink
- hdr.Linkname = oldpath
- hdr.Size = 0 // This Must be here for the writer math to add up!
- } else {
- ta.SeenFiles[inode] = name
- }
- }
-
- capability, _ := system.Lgetxattr(path, "security.capability")
- if capability != nil {
- hdr.Xattrs = make(map[string]string)
- hdr.Xattrs["security.capability"] = string(capability)
- }
-
- //handle re-mapping container ID mappings back to host ID mappings before
- //writing tar headers/files. We skip whiteout files because they were written
- //by the kernel and already have proper ownership relative to the host
- if !strings.HasPrefix(filepath.Base(hdr.Name), WhiteoutPrefix) && (ta.UIDMaps != nil || ta.GIDMaps != nil) {
- uid, gid, err := getFileUIDGID(fi.Sys())
- if err != nil {
- return err
- }
- xUID, err := idtools.ToContainer(uid, ta.UIDMaps)
- if err != nil {
- return err
- }
- xGID, err := idtools.ToContainer(gid, ta.GIDMaps)
- if err != nil {
- return err
- }
- hdr.Uid = xUID
- hdr.Gid = xGID
- }
-
- if err := ta.TarWriter.WriteHeader(hdr); err != nil {
- return err
- }
-
- if hdr.Typeflag == tar.TypeReg {
- file, err := os.Open(path)
- if err != nil {
- return err
- }
-
- ta.Buffer.Reset(ta.TarWriter)
- defer ta.Buffer.Reset(nil)
- _, err = io.Copy(ta.Buffer, file)
- file.Close()
- if err != nil {
- return err
- }
- err = ta.Buffer.Flush()
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, Lchown bool, chownOpts *TarChownOptions) error {
- // hdr.Mode is in linux format, which we can use for sycalls,
- // but for os.Foo() calls we need the mode converted to os.FileMode,
- // so use hdrInfo.Mode() (they differ for e.g. setuid bits)
- hdrInfo := hdr.FileInfo()
-
- switch hdr.Typeflag {
- case tar.TypeDir:
- // Create directory unless it exists as a directory already.
- // In that case we just want to merge the two
- if fi, err := os.Lstat(path); !(err == nil && fi.IsDir()) {
- if err := os.Mkdir(path, hdrInfo.Mode()); err != nil {
- return err
- }
- }
-
- case tar.TypeReg, tar.TypeRegA:
- // Source is regular file
- file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, hdrInfo.Mode())
- if err != nil {
- return err
- }
- if _, err := io.Copy(file, reader); err != nil {
- file.Close()
- return err
- }
- file.Close()
-
- case tar.TypeBlock, tar.TypeChar, tar.TypeFifo:
- // Handle this is an OS-specific way
- if err := handleTarTypeBlockCharFifo(hdr, path); err != nil {
- return err
- }
-
- case tar.TypeLink:
- targetPath := filepath.Join(extractDir, hdr.Linkname)
- // check for hardlink breakout
- if !strings.HasPrefix(targetPath, extractDir) {
- return breakoutError(fmt.Errorf("invalid hardlink %q -> %q", targetPath, hdr.Linkname))
- }
- if err := os.Link(targetPath, path); err != nil {
- return err
- }
-
- case tar.TypeSymlink:
- // path -> hdr.Linkname = targetPath
- // e.g. /extractDir/path/to/symlink -> ../2/file = /extractDir/path/2/file
- targetPath := filepath.Join(filepath.Dir(path), hdr.Linkname)
-
- // the reason we don't need to check symlinks in the path (with FollowSymlinkInScope) is because
- // that symlink would first have to be created, which would be caught earlier, at this very check:
- if !strings.HasPrefix(targetPath, extractDir) {
- return breakoutError(fmt.Errorf("invalid symlink %q -> %q", path, hdr.Linkname))
- }
- if err := os.Symlink(hdr.Linkname, path); err != nil {
- return err
- }
-
- case tar.TypeXGlobalHeader:
- logrus.Debugf("PAX Global Extended Headers found and ignored")
- return nil
-
- default:
- return fmt.Errorf("Unhandled tar header type %d\n", hdr.Typeflag)
- }
-
- // Lchown is not supported on Windows.
- if Lchown && runtime.GOOS != "windows" {
- if chownOpts == nil {
- chownOpts = &TarChownOptions{UID: hdr.Uid, GID: hdr.Gid}
- }
- if err := os.Lchown(path, chownOpts.UID, chownOpts.GID); err != nil {
- return err
- }
- }
-
- for key, value := range hdr.Xattrs {
- if err := system.Lsetxattr(path, key, []byte(value), 0); err != nil {
- return err
- }
- }
-
- // There is no LChmod, so ignore mode for symlink. Also, this
- // must happen after chown, as that can modify the file mode
- if err := handleLChmod(hdr, path, hdrInfo); err != nil {
- return err
- }
-
- aTime := hdr.AccessTime
- if aTime.Before(hdr.ModTime) {
- // Last access time should never be before last modified time.
- aTime = hdr.ModTime
- }
-
- // system.Chtimes doesn't support a NOFOLLOW flag atm
- if hdr.Typeflag == tar.TypeLink {
- if fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) {
- if err := system.Chtimes(path, aTime, hdr.ModTime); err != nil {
- return err
- }
- }
- } else if hdr.Typeflag != tar.TypeSymlink {
- if err := system.Chtimes(path, aTime, hdr.ModTime); err != nil {
- return err
- }
- } else {
- ts := []syscall.Timespec{timeToTimespec(aTime), timeToTimespec(hdr.ModTime)}
- if err := system.LUtimesNano(path, ts); err != nil && err != system.ErrNotSupportedPlatform {
- return err
- }
- }
- return nil
-}
-
-// Tar creates an archive from the directory at `path`, and returns it as a
-// stream of bytes.
-func Tar(path string, compression Compression) (io.ReadCloser, error) {
- return TarWithOptions(path, &TarOptions{Compression: compression})
-}
-
-// TarWithOptions creates an archive from the directory at `path`, only including files whose relative
-// paths are included in `options.IncludeFiles` (if non-nil) or not in `options.ExcludePatterns`.
-func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error) {
-
- // Fix the source path to work with long path names. This is a no-op
- // on platforms other than Windows.
- srcPath = fixVolumePathPrefix(srcPath)
-
- patterns, patDirs, exceptions, err := fileutils.CleanPatterns(options.ExcludePatterns)
-
- if err != nil {
- return nil, err
- }
-
- pipeReader, pipeWriter := io.Pipe()
-
- compressWriter, err := CompressStream(pipeWriter, options.Compression)
- if err != nil {
- return nil, err
- }
-
- go func() {
- ta := &tarAppender{
- TarWriter: tar.NewWriter(compressWriter),
- Buffer: pools.BufioWriter32KPool.Get(nil),
- SeenFiles: make(map[uint64]string),
- UIDMaps: options.UIDMaps,
- GIDMaps: options.GIDMaps,
- }
-
- defer func() {
- // Make sure to check the error on Close.
- if err := ta.TarWriter.Close(); err != nil {
- logrus.Debugf("Can't close tar writer: %s", err)
- }
- if err := compressWriter.Close(); err != nil {
- logrus.Debugf("Can't close compress writer: %s", err)
- }
- if err := pipeWriter.Close(); err != nil {
- logrus.Debugf("Can't close pipe writer: %s", err)
- }
- }()
-
- // this buffer is needed for the duration of this piped stream
- defer pools.BufioWriter32KPool.Put(ta.Buffer)
-
- // In general we log errors here but ignore them because
- // during e.g. a diff operation the container can continue
- // mutating the filesystem and we can see transient errors
- // from this
-
- stat, err := os.Lstat(srcPath)
- if err != nil {
- return
- }
-
- if !stat.IsDir() {
- // We can't later join a non-dir with any includes because the
- // 'walk' will error if "file/." is stat-ed and "file" is not a
- // directory. So, we must split the source path and use the
- // basename as the include.
- if len(options.IncludeFiles) > 0 {
- logrus.Warn("Tar: Can't archive a file with includes")
- }
-
- dir, base := SplitPathDirEntry(srcPath)
- srcPath = dir
- options.IncludeFiles = []string{base}
- }
-
- if len(options.IncludeFiles) == 0 {
- options.IncludeFiles = []string{"."}
- }
-
- seen := make(map[string]bool)
-
- for _, include := range options.IncludeFiles {
- rebaseName := options.RebaseNames[include]
-
- walkRoot := getWalkRoot(srcPath, include)
- filepath.Walk(walkRoot, func(filePath string, f os.FileInfo, err error) error {
- if err != nil {
- logrus.Debugf("Tar: Can't stat file %s to tar: %s", srcPath, err)
- return nil
- }
-
- relFilePath, err := filepath.Rel(srcPath, filePath)
- if err != nil || (!options.IncludeSourceDir && relFilePath == "." && f.IsDir()) {
- // Error getting relative path OR we are looking
- // at the source directory path. Skip in both situations.
- return nil
- }
-
- if options.IncludeSourceDir && include == "." && relFilePath != "." {
- relFilePath = strings.Join([]string{".", relFilePath}, string(filepath.Separator))
- }
-
- skip := false
-
- // If "include" is an exact match for the current file
- // then even if there's an "excludePatterns" pattern that
- // matches it, don't skip it. IOW, assume an explicit 'include'
- // is asking for that file no matter what - which is true
- // for some files, like .dockerignore and Dockerfile (sometimes)
- if include != relFilePath {
- skip, err = fileutils.OptimizedMatches(relFilePath, patterns, patDirs)
- if err != nil {
- logrus.Debugf("Error matching %s: %v", relFilePath, err)
- return err
- }
- }
-
- if skip {
- if !exceptions && f.IsDir() {
- return filepath.SkipDir
- }
- return nil
- }
-
- if seen[relFilePath] {
- return nil
- }
- seen[relFilePath] = true
-
- // Rename the base resource.
- if rebaseName != "" {
- var replacement string
- if rebaseName != string(filepath.Separator) {
- // Special case the root directory to replace with an
- // empty string instead so that we don't end up with
- // double slashes in the paths.
- replacement = rebaseName
- }
-
- relFilePath = strings.Replace(relFilePath, include, replacement, 1)
- }
-
- if err := ta.addTarFile(filePath, relFilePath); err != nil {
- logrus.Debugf("Can't add file %s to tar: %s", filePath, err)
- }
- return nil
- })
- }
- }()
-
- return pipeReader, nil
-}
-
-// Unpack unpacks the decompressedArchive to dest with options.
-func Unpack(decompressedArchive io.Reader, dest string, options *TarOptions) error {
- tr := tar.NewReader(decompressedArchive)
- trBuf := pools.BufioReader32KPool.Get(nil)
- defer pools.BufioReader32KPool.Put(trBuf)
-
- var dirs []*tar.Header
- remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(options.UIDMaps, options.GIDMaps)
- if err != nil {
- return err
- }
-
- // Iterate through the files in the archive.
-loop:
- for {
- hdr, err := tr.Next()
- if err == io.EOF {
- // end of tar archive
- break
- }
- if err != nil {
- return err
- }
-
- // Normalize name, for safety and for a simple is-root check
- // This keeps "../" as-is, but normalizes "/../" to "/". Or Windows:
- // This keeps "..\" as-is, but normalizes "\..\" to "\".
- hdr.Name = filepath.Clean(hdr.Name)
-
- for _, exclude := range options.ExcludePatterns {
- if strings.HasPrefix(hdr.Name, exclude) {
- continue loop
- }
- }
-
- // After calling filepath.Clean(hdr.Name) above, hdr.Name will now be in
- // the filepath format for the OS on which the daemon is running. Hence
- // the check for a slash-suffix MUST be done in an OS-agnostic way.
- if !strings.HasSuffix(hdr.Name, string(os.PathSeparator)) {
- // Not the root directory, ensure that the parent directory exists
- parent := filepath.Dir(hdr.Name)
- parentPath := filepath.Join(dest, parent)
- if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
- err = system.MkdirAll(parentPath, 0777)
- if err != nil {
- return err
- }
- }
- }
-
- path := filepath.Join(dest, hdr.Name)
- rel, err := filepath.Rel(dest, path)
- if err != nil {
- return err
- }
- if strings.HasPrefix(rel, ".."+string(os.PathSeparator)) {
- return breakoutError(fmt.Errorf("%q is outside of %q", hdr.Name, dest))
- }
-
- // If path exits we almost always just want to remove and replace it
- // The only exception is when it is a directory *and* the file from
- // the layer is also a directory. Then we want to merge them (i.e.
- // just apply the metadata from the layer).
- if fi, err := os.Lstat(path); err == nil {
- if options.NoOverwriteDirNonDir && fi.IsDir() && hdr.Typeflag != tar.TypeDir {
- // If NoOverwriteDirNonDir is true then we cannot replace
- // an existing directory with a non-directory from the archive.
- return fmt.Errorf("cannot overwrite directory %q with non-directory %q", path, dest)
- }
-
- if options.NoOverwriteDirNonDir && !fi.IsDir() && hdr.Typeflag == tar.TypeDir {
- // If NoOverwriteDirNonDir is true then we cannot replace
- // an existing non-directory with a directory from the archive.
- return fmt.Errorf("cannot overwrite non-directory %q with directory %q", path, dest)
- }
-
- if fi.IsDir() && hdr.Name == "." {
- continue
- }
-
- if !(fi.IsDir() && hdr.Typeflag == tar.TypeDir) {
- if err := os.RemoveAll(path); err != nil {
- return err
- }
- }
- }
- trBuf.Reset(tr)
-
- // if the options contain a uid & gid maps, convert header uid/gid
- // entries using the maps such that lchown sets the proper mapped
- // uid/gid after writing the file. We only perform this mapping if
- // the file isn't already owned by the remapped root UID or GID, as
- // that specific uid/gid has no mapping from container -> host, and
- // those files already have the proper ownership for inside the
- // container.
- if hdr.Uid != remappedRootUID {
- xUID, err := idtools.ToHost(hdr.Uid, options.UIDMaps)
- if err != nil {
- return err
- }
- hdr.Uid = xUID
- }
- if hdr.Gid != remappedRootGID {
- xGID, err := idtools.ToHost(hdr.Gid, options.GIDMaps)
- if err != nil {
- return err
- }
- hdr.Gid = xGID
- }
-
- if err := createTarFile(path, dest, hdr, trBuf, !options.NoLchown, options.ChownOpts); err != nil {
- return err
- }
-
- // Directory mtimes must be handled at the end to avoid further
- // file creation in them to modify the directory mtime
- if hdr.Typeflag == tar.TypeDir {
- dirs = append(dirs, hdr)
- }
- }
-
- for _, hdr := range dirs {
- path := filepath.Join(dest, hdr.Name)
-
- if err := system.Chtimes(path, hdr.AccessTime, hdr.ModTime); err != nil {
- return err
- }
- }
- return nil
-}
-
-// Untar reads a stream of bytes from `archive`, parses it as a tar archive,
-// and unpacks it into the directory at `dest`.
-// The archive may be compressed with one of the following algorithms:
-// identity (uncompressed), gzip, bzip2, xz.
-// FIXME: specify behavior when target path exists vs. doesn't exist.
-func Untar(tarArchive io.Reader, dest string, options *TarOptions) error {
- return untarHandler(tarArchive, dest, options, true)
-}
-
-// UntarUncompressed reads a stream of bytes from `archive`, parses it as a tar archive,
-// and unpacks it into the directory at `dest`.
-// The archive must be an uncompressed stream.
-func UntarUncompressed(tarArchive io.Reader, dest string, options *TarOptions) error {
- return untarHandler(tarArchive, dest, options, false)
-}
-
-// Handler for teasing out the automatic decompression
-func untarHandler(tarArchive io.Reader, dest string, options *TarOptions, decompress bool) error {
- if tarArchive == nil {
- return fmt.Errorf("Empty archive")
- }
- dest = filepath.Clean(dest)
- if options == nil {
- options = &TarOptions{}
- }
- if options.ExcludePatterns == nil {
- options.ExcludePatterns = []string{}
- }
-
- r := tarArchive
- if decompress {
- decompressedArchive, err := DecompressStream(tarArchive)
- if err != nil {
- return err
- }
- defer decompressedArchive.Close()
- r = decompressedArchive
- }
-
- return Unpack(r, dest, options)
-}
-
-// TarUntar is a convenience function which calls Tar and Untar, with the output of one piped into the other.
-// If either Tar or Untar fails, TarUntar aborts and returns the error.
-func (archiver *Archiver) TarUntar(src, dst string) error {
- logrus.Debugf("TarUntar(%s %s)", src, dst)
- archive, err := TarWithOptions(src, &TarOptions{Compression: Uncompressed})
- if err != nil {
- return err
- }
- defer archive.Close()
-
- var options *TarOptions
- if archiver.UIDMaps != nil || archiver.GIDMaps != nil {
- options = &TarOptions{
- UIDMaps: archiver.UIDMaps,
- GIDMaps: archiver.GIDMaps,
- }
- }
- return archiver.Untar(archive, dst, options)
-}
-
-// TarUntar is a convenience function which calls Tar and Untar, with the output of one piped into the other.
-// If either Tar or Untar fails, TarUntar aborts and returns the error.
-func TarUntar(src, dst string) error {
- return defaultArchiver.TarUntar(src, dst)
-}
-
-// UntarPath untar a file from path to a destination, src is the source tar file path.
-func (archiver *Archiver) UntarPath(src, dst string) error {
- archive, err := os.Open(src)
- if err != nil {
- return err
- }
- defer archive.Close()
- var options *TarOptions
- if archiver.UIDMaps != nil || archiver.GIDMaps != nil {
- options = &TarOptions{
- UIDMaps: archiver.UIDMaps,
- GIDMaps: archiver.GIDMaps,
- }
- }
- return archiver.Untar(archive, dst, options)
-}
-
-// UntarPath is a convenience function which looks for an archive
-// at filesystem path `src`, and unpacks it at `dst`.
-func UntarPath(src, dst string) error {
- return defaultArchiver.UntarPath(src, dst)
-}
-
-// CopyWithTar creates a tar archive of filesystem path `src`, and
-// unpacks it at filesystem path `dst`.
-// The archive is streamed directly with fixed buffering and no
-// intermediary disk IO.
-func (archiver *Archiver) CopyWithTar(src, dst string) error {
- srcSt, err := os.Stat(src)
- if err != nil {
- return err
- }
- if !srcSt.IsDir() {
- return archiver.CopyFileWithTar(src, dst)
- }
- // Create dst, copy src's content into it
- logrus.Debugf("Creating dest directory: %s", dst)
- if err := system.MkdirAll(dst, 0755); err != nil {
- return err
- }
- logrus.Debugf("Calling TarUntar(%s, %s)", src, dst)
- return archiver.TarUntar(src, dst)
-}
-
-// CopyWithTar creates a tar archive of filesystem path `src`, and
-// unpacks it at filesystem path `dst`.
-// The archive is streamed directly with fixed buffering and no
-// intermediary disk IO.
-func CopyWithTar(src, dst string) error {
- return defaultArchiver.CopyWithTar(src, dst)
-}
-
-// CopyFileWithTar emulates the behavior of the 'cp' command-line
-// for a single file. It copies a regular file from path `src` to
-// path `dst`, and preserves all its metadata.
-func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {
- logrus.Debugf("CopyFileWithTar(%s, %s)", src, dst)
- srcSt, err := os.Stat(src)
- if err != nil {
- return err
- }
-
- if srcSt.IsDir() {
- return fmt.Errorf("Can't copy a directory")
- }
-
- // Clean up the trailing slash. This must be done in an operating
- // system specific manner.
- if dst[len(dst)-1] == os.PathSeparator {
- dst = filepath.Join(dst, filepath.Base(src))
- }
- // Create the holding directory if necessary
- if err := system.MkdirAll(filepath.Dir(dst), 0700); err != nil {
- return err
- }
-
- r, w := io.Pipe()
- errC := promise.Go(func() error {
- defer w.Close()
-
- srcF, err := os.Open(src)
- if err != nil {
- return err
- }
- defer srcF.Close()
-
- hdr, err := tar.FileInfoHeader(srcSt, "")
- if err != nil {
- return err
- }
- hdr.Name = filepath.Base(dst)
- hdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode)))
-
- remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(archiver.UIDMaps, archiver.GIDMaps)
- if err != nil {
- return err
- }
-
- // only perform mapping if the file being copied isn't already owned by the
- // uid or gid of the remapped root in the container
- if remappedRootUID != hdr.Uid {
- xUID, err := idtools.ToHost(hdr.Uid, archiver.UIDMaps)
- if err != nil {
- return err
- }
- hdr.Uid = xUID
- }
- if remappedRootGID != hdr.Gid {
- xGID, err := idtools.ToHost(hdr.Gid, archiver.GIDMaps)
- if err != nil {
- return err
- }
- hdr.Gid = xGID
- }
-
- tw := tar.NewWriter(w)
- defer tw.Close()
- if err := tw.WriteHeader(hdr); err != nil {
- return err
- }
- if _, err := io.Copy(tw, srcF); err != nil {
- return err
- }
- return nil
- })
- defer func() {
- if er := <-errC; err != nil {
- err = er
- }
- }()
-
- err = archiver.Untar(r, filepath.Dir(dst), nil)
- if err != nil {
- r.CloseWithError(err)
- }
- return err
-}
-
-// CopyFileWithTar emulates the behavior of the 'cp' command-line
-// for a single file. It copies a regular file from path `src` to
-// path `dst`, and preserves all its metadata.
-//
-// Destination handling is in an operating specific manner depending
-// where the daemon is running. If `dst` ends with a trailing slash
-// the final destination path will be `dst/base(src)` (Linux) or
-// `dst\base(src)` (Windows).
-func CopyFileWithTar(src, dst string) (err error) {
- return defaultArchiver.CopyFileWithTar(src, dst)
-}
-
-// cmdStream executes a command, and returns its stdout as a stream.
-// If the command fails to run or doesn't complete successfully, an error
-// will be returned, including anything written on stderr.
-func cmdStream(cmd *exec.Cmd, input io.Reader) (io.ReadCloser, <-chan struct{}, error) {
- chdone := make(chan struct{})
- cmd.Stdin = input
- pipeR, pipeW := io.Pipe()
- cmd.Stdout = pipeW
- var errBuf bytes.Buffer
- cmd.Stderr = &errBuf
-
- // Run the command and return the pipe
- if err := cmd.Start(); err != nil {
- return nil, nil, err
- }
-
- // Copy stdout to the returned pipe
- go func() {
- if err := cmd.Wait(); err != nil {
- pipeW.CloseWithError(fmt.Errorf("%s: %s", err, errBuf.String()))
- } else {
- pipeW.Close()
- }
- close(chdone)
- }()
-
- return pipeR, chdone, nil
-}
-
-// NewTempArchive reads the content of src into a temporary file, and returns the contents
-// of that file as an archive. The archive can only be read once - as soon as reading completes,
-// the file will be deleted.
-func NewTempArchive(src Archive, dir string) (*TempArchive, error) {
- f, err := ioutil.TempFile(dir, "")
- if err != nil {
- return nil, err
- }
- if _, err := io.Copy(f, src); err != nil {
- return nil, err
- }
- if _, err := f.Seek(0, 0); err != nil {
- return nil, err
- }
- st, err := f.Stat()
- if err != nil {
- return nil, err
- }
- size := st.Size()
- return &TempArchive{File: f, Size: size}, nil
-}
-
-// TempArchive is a temporary archive. The archive can only be read once - as soon as reading completes,
-// the file will be deleted.
-type TempArchive struct {
- *os.File
- Size int64 // Pre-computed from Stat().Size() as a convenience
- read int64
- closed bool
-}
-
-// Close closes the underlying file if it's still open, or does a no-op
-// to allow callers to try to close the TempArchive multiple times safely.
-func (archive *TempArchive) Close() error {
- if archive.closed {
- return nil
- }
-
- archive.closed = true
-
- return archive.File.Close()
-}
-
-func (archive *TempArchive) Read(data []byte) (int, error) {
- n, err := archive.File.Read(data)
- archive.read += int64(n)
- if err != nil || archive.read == archive.Size {
- archive.Close()
- os.Remove(archive.File.Name())
- }
- return n, err
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive_unix.go
deleted file mode 100644
index 86c6888253..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive_unix.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// +build !windows
-
-package archive
-
-import (
- "archive/tar"
- "errors"
- "os"
- "path/filepath"
- "syscall"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-// fixVolumePathPrefix does platform specific processing to ensure that if
-// the path being passed in is not in a volume path format, convert it to one.
-func fixVolumePathPrefix(srcPath string) string {
- return srcPath
-}
-
-// getWalkRoot calculates the root path when performing a TarWithOptions.
-// We use a separate function as this is platform specific. On Linux, we
-// can't use filepath.Join(srcPath,include) because this will clean away
-// a trailing "." or "/" which may be important.
-func getWalkRoot(srcPath string, include string) string {
- return srcPath + string(filepath.Separator) + include
-}
-
-// CanonicalTarNameForPath returns platform-specific filepath
-// to canonical posix-style path for tar archival. p is relative
-// path.
-func CanonicalTarNameForPath(p string) (string, error) {
- return p, nil // already unix-style
-}
-
-// chmodTarEntry is used to adjust the file permissions used in tar header based
-// on the platform the archival is done.
-
-func chmodTarEntry(perm os.FileMode) os.FileMode {
- return perm // noop for unix as golang APIs provide perm bits correctly
-}
-
-func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (inode uint64, err error) {
- s, ok := stat.(*syscall.Stat_t)
-
- if !ok {
- err = errors.New("cannot convert stat value to syscall.Stat_t")
- return
- }
-
- inode = uint64(s.Ino)
-
- // Currently go does not fill in the major/minors
- if s.Mode&syscall.S_IFBLK != 0 ||
- s.Mode&syscall.S_IFCHR != 0 {
- hdr.Devmajor = int64(major(uint64(s.Rdev)))
- hdr.Devminor = int64(minor(uint64(s.Rdev)))
- }
-
- return
-}
-
-func getFileUIDGID(stat interface{}) (int, int, error) {
- s, ok := stat.(*syscall.Stat_t)
-
- if !ok {
- return -1, -1, errors.New("cannot convert stat value to syscall.Stat_t")
- }
- return int(s.Uid), int(s.Gid), nil
-}
-
-func major(device uint64) uint64 {
- return (device >> 8) & 0xfff
-}
-
-func minor(device uint64) uint64 {
- return (device & 0xff) | ((device >> 12) & 0xfff00)
-}
-
-// handleTarTypeBlockCharFifo is an OS-specific helper function used by
-// createTarFile to handle the following types of header: Block; Char; Fifo
-func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error {
- mode := uint32(hdr.Mode & 07777)
- switch hdr.Typeflag {
- case tar.TypeBlock:
- mode |= syscall.S_IFBLK
- case tar.TypeChar:
- mode |= syscall.S_IFCHR
- case tar.TypeFifo:
- mode |= syscall.S_IFIFO
- }
-
- if err := system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor))); err != nil {
- return err
- }
- return nil
-}
-
-func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error {
- if hdr.Typeflag == tar.TypeLink {
- if fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) {
- if err := os.Chmod(path, hdrInfo.Mode()); err != nil {
- return err
- }
- }
- } else if hdr.Typeflag != tar.TypeSymlink {
- if err := os.Chmod(path, hdrInfo.Mode()); err != nil {
- return err
- }
- }
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive_windows.go
deleted file mode 100644
index 23d60aa41a..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/archive_windows.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// +build windows
-
-package archive
-
-import (
- "archive/tar"
- "fmt"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath"
-)
-
-// fixVolumePathPrefix does platform specific processing to ensure that if
-// the path being passed in is not in a volume path format, convert it to one.
-func fixVolumePathPrefix(srcPath string) string {
- return longpath.AddPrefix(srcPath)
-}
-
-// getWalkRoot calculates the root path when performing a TarWithOptions.
-// We use a separate function as this is platform specific.
-func getWalkRoot(srcPath string, include string) string {
- return filepath.Join(srcPath, include)
-}
-
-// CanonicalTarNameForPath returns platform-specific filepath
-// to canonical posix-style path for tar archival. p is relative
-// path.
-func CanonicalTarNameForPath(p string) (string, error) {
- // windows: convert windows style relative path with backslashes
- // into forward slashes. Since windows does not allow '/' or '\'
- // in file names, it is mostly safe to replace however we must
- // check just in case
- if strings.Contains(p, "/") {
- return "", fmt.Errorf("Windows path contains forward slash: %s", p)
- }
- return strings.Replace(p, string(os.PathSeparator), "/", -1), nil
-
-}
-
-// chmodTarEntry is used to adjust the file permissions used in tar header based
-// on the platform the archival is done.
-func chmodTarEntry(perm os.FileMode) os.FileMode {
- perm &= 0755
- // Add the x bit: make everything +x from windows
- perm |= 0111
-
- return perm
-}
-
-func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (inode uint64, err error) {
- // do nothing. no notion of Rdev, Inode, Nlink in stat on Windows
- return
-}
-
-// handleTarTypeBlockCharFifo is an OS-specific helper function used by
-// createTarFile to handle the following types of header: Block; Char; Fifo
-func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error {
- return nil
-}
-
-func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error {
- return nil
-}
-
-func getFileUIDGID(stat interface{}) (int, int, error) {
- // no notion of file ownership mapping yet on Windows
- return 0, 0, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes.go
deleted file mode 100644
index a2a1dc36e4..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes.go
+++ /dev/null
@@ -1,416 +0,0 @@
-package archive
-
-import (
- "archive/tar"
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "syscall"
- "time"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-// ChangeType represents the change type.
-type ChangeType int
-
-const (
- // ChangeModify represents the modify operation.
- ChangeModify = iota
- // ChangeAdd represents the add operation.
- ChangeAdd
- // ChangeDelete represents the delete operation.
- ChangeDelete
-)
-
-func (c ChangeType) String() string {
- switch c {
- case ChangeModify:
- return "C"
- case ChangeAdd:
- return "A"
- case ChangeDelete:
- return "D"
- }
- return ""
-}
-
-// Change represents a change, it wraps the change type and path.
-// It describes changes of the files in the path respect to the
-// parent layers. The change could be modify, add, delete.
-// This is used for layer diff.
-type Change struct {
- Path string
- Kind ChangeType
-}
-
-func (change *Change) String() string {
- return fmt.Sprintf("%s %s", change.Kind, change.Path)
-}
-
-// for sort.Sort
-type changesByPath []Change
-
-func (c changesByPath) Less(i, j int) bool { return c[i].Path < c[j].Path }
-func (c changesByPath) Len() int { return len(c) }
-func (c changesByPath) Swap(i, j int) { c[j], c[i] = c[i], c[j] }
-
-// Gnu tar and the go tar writer don't have sub-second mtime
-// precision, which is problematic when we apply changes via tar
-// files, we handle this by comparing for exact times, *or* same
-// second count and either a or b having exactly 0 nanoseconds
-func sameFsTime(a, b time.Time) bool {
- return a == b ||
- (a.Unix() == b.Unix() &&
- (a.Nanosecond() == 0 || b.Nanosecond() == 0))
-}
-
-func sameFsTimeSpec(a, b syscall.Timespec) bool {
- return a.Sec == b.Sec &&
- (a.Nsec == b.Nsec || a.Nsec == 0 || b.Nsec == 0)
-}
-
-// Changes walks the path rw and determines changes for the files in the path,
-// with respect to the parent layers
-func Changes(layers []string, rw string) ([]Change, error) {
- var (
- changes []Change
- changedDirs = make(map[string]struct{})
- )
-
- err := filepath.Walk(rw, func(path string, f os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- // Rebase path
- path, err = filepath.Rel(rw, path)
- if err != nil {
- return err
- }
-
- // As this runs on the daemon side, file paths are OS specific.
- path = filepath.Join(string(os.PathSeparator), path)
-
- // Skip root
- if path == string(os.PathSeparator) {
- return nil
- }
-
- // Skip AUFS metadata
- if matched, err := filepath.Match(string(os.PathSeparator)+WhiteoutMetaPrefix+"*", path); err != nil || matched {
- return err
- }
-
- change := Change{
- Path: path,
- }
-
- // Find out what kind of modification happened
- file := filepath.Base(path)
- // If there is a whiteout, then the file was removed
- if strings.HasPrefix(file, WhiteoutPrefix) {
- originalFile := file[len(WhiteoutPrefix):]
- change.Path = filepath.Join(filepath.Dir(path), originalFile)
- change.Kind = ChangeDelete
- } else {
- // Otherwise, the file was added
- change.Kind = ChangeAdd
-
- // ...Unless it already existed in a top layer, in which case, it's a modification
- for _, layer := range layers {
- stat, err := os.Stat(filepath.Join(layer, path))
- if err != nil && !os.IsNotExist(err) {
- return err
- }
- if err == nil {
- // The file existed in the top layer, so that's a modification
-
- // However, if it's a directory, maybe it wasn't actually modified.
- // If you modify /foo/bar/baz, then /foo will be part of the changed files only because it's the parent of bar
- if stat.IsDir() && f.IsDir() {
- if f.Size() == stat.Size() && f.Mode() == stat.Mode() && sameFsTime(f.ModTime(), stat.ModTime()) {
- // Both directories are the same, don't record the change
- return nil
- }
- }
- change.Kind = ChangeModify
- break
- }
- }
- }
-
- // If /foo/bar/file.txt is modified, then /foo/bar must be part of the changed files.
- // This block is here to ensure the change is recorded even if the
- // modify time, mode and size of the parent directory in the rw and ro layers are all equal.
- // Check https://github.com/docker/docker/pull/13590 for details.
- if f.IsDir() {
- changedDirs[path] = struct{}{}
- }
- if change.Kind == ChangeAdd || change.Kind == ChangeDelete {
- parent := filepath.Dir(path)
- if _, ok := changedDirs[parent]; !ok && parent != "/" {
- changes = append(changes, Change{Path: parent, Kind: ChangeModify})
- changedDirs[parent] = struct{}{}
- }
- }
-
- // Record change
- changes = append(changes, change)
- return nil
- })
- if err != nil && !os.IsNotExist(err) {
- return nil, err
- }
- return changes, nil
-}
-
-// FileInfo describes the information of a file.
-type FileInfo struct {
- parent *FileInfo
- name string
- stat *system.StatT
- children map[string]*FileInfo
- capability []byte
- added bool
-}
-
-// LookUp looks up the file information of a file.
-func (info *FileInfo) LookUp(path string) *FileInfo {
- // As this runs on the daemon side, file paths are OS specific.
- parent := info
- if path == string(os.PathSeparator) {
- return info
- }
-
- pathElements := strings.Split(path, string(os.PathSeparator))
- for _, elem := range pathElements {
- if elem != "" {
- child := parent.children[elem]
- if child == nil {
- return nil
- }
- parent = child
- }
- }
- return parent
-}
-
-func (info *FileInfo) path() string {
- if info.parent == nil {
- // As this runs on the daemon side, file paths are OS specific.
- return string(os.PathSeparator)
- }
- return filepath.Join(info.parent.path(), info.name)
-}
-
-func (info *FileInfo) addChanges(oldInfo *FileInfo, changes *[]Change) {
-
- sizeAtEntry := len(*changes)
-
- if oldInfo == nil {
- // add
- change := Change{
- Path: info.path(),
- Kind: ChangeAdd,
- }
- *changes = append(*changes, change)
- info.added = true
- }
-
- // We make a copy so we can modify it to detect additions
- // also, we only recurse on the old dir if the new info is a directory
- // otherwise any previous delete/change is considered recursive
- oldChildren := make(map[string]*FileInfo)
- if oldInfo != nil && info.isDir() {
- for k, v := range oldInfo.children {
- oldChildren[k] = v
- }
- }
-
- for name, newChild := range info.children {
- oldChild, _ := oldChildren[name]
- if oldChild != nil {
- // change?
- oldStat := oldChild.stat
- newStat := newChild.stat
- // Note: We can't compare inode or ctime or blocksize here, because these change
- // when copying a file into a container. However, that is not generally a problem
- // because any content change will change mtime, and any status change should
- // be visible when actually comparing the stat fields. The only time this
- // breaks down is if some code intentionally hides a change by setting
- // back mtime
- if statDifferent(oldStat, newStat) ||
- bytes.Compare(oldChild.capability, newChild.capability) != 0 {
- change := Change{
- Path: newChild.path(),
- Kind: ChangeModify,
- }
- *changes = append(*changes, change)
- newChild.added = true
- }
-
- // Remove from copy so we can detect deletions
- delete(oldChildren, name)
- }
-
- newChild.addChanges(oldChild, changes)
- }
- for _, oldChild := range oldChildren {
- // delete
- change := Change{
- Path: oldChild.path(),
- Kind: ChangeDelete,
- }
- *changes = append(*changes, change)
- }
-
- // If there were changes inside this directory, we need to add it, even if the directory
- // itself wasn't changed. This is needed to properly save and restore filesystem permissions.
- // As this runs on the daemon side, file paths are OS specific.
- if len(*changes) > sizeAtEntry && info.isDir() && !info.added && info.path() != string(os.PathSeparator) {
- change := Change{
- Path: info.path(),
- Kind: ChangeModify,
- }
- // Let's insert the directory entry before the recently added entries located inside this dir
- *changes = append(*changes, change) // just to resize the slice, will be overwritten
- copy((*changes)[sizeAtEntry+1:], (*changes)[sizeAtEntry:])
- (*changes)[sizeAtEntry] = change
- }
-
-}
-
-// Changes add changes to file information.
-func (info *FileInfo) Changes(oldInfo *FileInfo) []Change {
- var changes []Change
-
- info.addChanges(oldInfo, &changes)
-
- return changes
-}
-
-func newRootFileInfo() *FileInfo {
- // As this runs on the daemon side, file paths are OS specific.
- root := &FileInfo{
- name: string(os.PathSeparator),
- children: make(map[string]*FileInfo),
- }
- return root
-}
-
-// ChangesDirs compares two directories and generates an array of Change objects describing the changes.
-// If oldDir is "", then all files in newDir will be Add-Changes.
-func ChangesDirs(newDir, oldDir string) ([]Change, error) {
- var (
- oldRoot, newRoot *FileInfo
- )
- if oldDir == "" {
- emptyDir, err := ioutil.TempDir("", "empty")
- if err != nil {
- return nil, err
- }
- defer os.Remove(emptyDir)
- oldDir = emptyDir
- }
- oldRoot, newRoot, err := collectFileInfoForChanges(oldDir, newDir)
- if err != nil {
- return nil, err
- }
-
- return newRoot.Changes(oldRoot), nil
-}
-
-// ChangesSize calculates the size in bytes of the provided changes, based on newDir.
-func ChangesSize(newDir string, changes []Change) int64 {
- var (
- size int64
- sf = make(map[uint64]struct{})
- )
- for _, change := range changes {
- if change.Kind == ChangeModify || change.Kind == ChangeAdd {
- file := filepath.Join(newDir, change.Path)
- fileInfo, err := os.Lstat(file)
- if err != nil {
- logrus.Errorf("Can not stat %q: %s", file, err)
- continue
- }
-
- if fileInfo != nil && !fileInfo.IsDir() {
- if hasHardlinks(fileInfo) {
- inode := getIno(fileInfo)
- if _, ok := sf[inode]; !ok {
- size += fileInfo.Size()
- sf[inode] = struct{}{}
- }
- } else {
- size += fileInfo.Size()
- }
- }
- }
- }
- return size
-}
-
-// ExportChanges produces an Archive from the provided changes, relative to dir.
-func ExportChanges(dir string, changes []Change, uidMaps, gidMaps []idtools.IDMap) (Archive, error) {
- reader, writer := io.Pipe()
- go func() {
- ta := &tarAppender{
- TarWriter: tar.NewWriter(writer),
- Buffer: pools.BufioWriter32KPool.Get(nil),
- SeenFiles: make(map[uint64]string),
- UIDMaps: uidMaps,
- GIDMaps: gidMaps,
- }
- // this buffer is needed for the duration of this piped stream
- defer pools.BufioWriter32KPool.Put(ta.Buffer)
-
- sort.Sort(changesByPath(changes))
-
- // In general we log errors here but ignore them because
- // during e.g. a diff operation the container can continue
- // mutating the filesystem and we can see transient errors
- // from this
- for _, change := range changes {
- if change.Kind == ChangeDelete {
- whiteOutDir := filepath.Dir(change.Path)
- whiteOutBase := filepath.Base(change.Path)
- whiteOut := filepath.Join(whiteOutDir, WhiteoutPrefix+whiteOutBase)
- timestamp := time.Now()
- hdr := &tar.Header{
- Name: whiteOut[1:],
- Size: 0,
- ModTime: timestamp,
- AccessTime: timestamp,
- ChangeTime: timestamp,
- }
- if err := ta.TarWriter.WriteHeader(hdr); err != nil {
- logrus.Debugf("Can't write whiteout header: %s", err)
- }
- } else {
- path := filepath.Join(dir, change.Path)
- if err := ta.addTarFile(path, change.Path[1:]); err != nil {
- logrus.Debugf("Can't add file %s to tar: %s", path, err)
- }
- }
- }
-
- // Make sure to check the error on Close.
- if err := ta.TarWriter.Close(); err != nil {
- logrus.Debugf("Can't close layer: %s", err)
- }
- if err := writer.Close(); err != nil {
- logrus.Debugf("failed close Changes writer: %s", err)
- }
- }()
- return reader, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_linux.go
deleted file mode 100644
index 378cc09c85..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_linux.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package archive
-
-import (
- "bytes"
- "fmt"
- "os"
- "path/filepath"
- "sort"
- "syscall"
- "unsafe"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-// walker is used to implement collectFileInfoForChanges on linux. Where this
-// method in general returns the entire contents of two directory trees, we
-// optimize some FS calls out on linux. In particular, we take advantage of the
-// fact that getdents(2) returns the inode of each file in the directory being
-// walked, which, when walking two trees in parallel to generate a list of
-// changes, can be used to prune subtrees without ever having to lstat(2) them
-// directly. Eliminating stat calls in this way can save up to seconds on large
-// images.
-type walker struct {
- dir1 string
- dir2 string
- root1 *FileInfo
- root2 *FileInfo
-}
-
-// collectFileInfoForChanges returns a complete representation of the trees
-// rooted at dir1 and dir2, with one important exception: any subtree or
-// leaf where the inode and device numbers are an exact match between dir1
-// and dir2 will be pruned from the results. This method is *only* to be used
-// to generating a list of changes between the two directories, as it does not
-// reflect the full contents.
-func collectFileInfoForChanges(dir1, dir2 string) (*FileInfo, *FileInfo, error) {
- w := &walker{
- dir1: dir1,
- dir2: dir2,
- root1: newRootFileInfo(),
- root2: newRootFileInfo(),
- }
-
- i1, err := os.Lstat(w.dir1)
- if err != nil {
- return nil, nil, err
- }
- i2, err := os.Lstat(w.dir2)
- if err != nil {
- return nil, nil, err
- }
-
- if err := w.walk("/", i1, i2); err != nil {
- return nil, nil, err
- }
-
- return w.root1, w.root2, nil
-}
-
-// Given a FileInfo, its path info, and a reference to the root of the tree
-// being constructed, register this file with the tree.
-func walkchunk(path string, fi os.FileInfo, dir string, root *FileInfo) error {
- if fi == nil {
- return nil
- }
- parent := root.LookUp(filepath.Dir(path))
- if parent == nil {
- return fmt.Errorf("collectFileInfoForChanges: Unexpectedly no parent for %s", path)
- }
- info := &FileInfo{
- name: filepath.Base(path),
- children: make(map[string]*FileInfo),
- parent: parent,
- }
- cpath := filepath.Join(dir, path)
- stat, err := system.FromStatT(fi.Sys().(*syscall.Stat_t))
- if err != nil {
- return err
- }
- info.stat = stat
- info.capability, _ = system.Lgetxattr(cpath, "security.capability") // lgetxattr(2): fs access
- parent.children[info.name] = info
- return nil
-}
-
-// Walk a subtree rooted at the same path in both trees being iterated. For
-// example, /docker/overlay/1234/a/b/c/d and /docker/overlay/8888/a/b/c/d
-func (w *walker) walk(path string, i1, i2 os.FileInfo) (err error) {
- // Register these nodes with the return trees, unless we're still at the
- // (already-created) roots:
- if path != "/" {
- if err := walkchunk(path, i1, w.dir1, w.root1); err != nil {
- return err
- }
- if err := walkchunk(path, i2, w.dir2, w.root2); err != nil {
- return err
- }
- }
-
- is1Dir := i1 != nil && i1.IsDir()
- is2Dir := i2 != nil && i2.IsDir()
-
- sameDevice := false
- if i1 != nil && i2 != nil {
- si1 := i1.Sys().(*syscall.Stat_t)
- si2 := i2.Sys().(*syscall.Stat_t)
- if si1.Dev == si2.Dev {
- sameDevice = true
- }
- }
-
- // If these files are both non-existent, or leaves (non-dirs), we are done.
- if !is1Dir && !is2Dir {
- return nil
- }
-
- // Fetch the names of all the files contained in both directories being walked:
- var names1, names2 []nameIno
- if is1Dir {
- names1, err = readdirnames(filepath.Join(w.dir1, path)) // getdents(2): fs access
- if err != nil {
- return err
- }
- }
- if is2Dir {
- names2, err = readdirnames(filepath.Join(w.dir2, path)) // getdents(2): fs access
- if err != nil {
- return err
- }
- }
-
- // We have lists of the files contained in both parallel directories, sorted
- // in the same order. Walk them in parallel, generating a unique merged list
- // of all items present in either or both directories.
- var names []string
- ix1 := 0
- ix2 := 0
-
- for {
- if ix1 >= len(names1) {
- break
- }
- if ix2 >= len(names2) {
- break
- }
-
- ni1 := names1[ix1]
- ni2 := names2[ix2]
-
- switch bytes.Compare([]byte(ni1.name), []byte(ni2.name)) {
- case -1: // ni1 < ni2 -- advance ni1
- // we will not encounter ni1 in names2
- names = append(names, ni1.name)
- ix1++
- case 0: // ni1 == ni2
- if ni1.ino != ni2.ino || !sameDevice {
- names = append(names, ni1.name)
- }
- ix1++
- ix2++
- case 1: // ni1 > ni2 -- advance ni2
- // we will not encounter ni2 in names1
- names = append(names, ni2.name)
- ix2++
- }
- }
- for ix1 < len(names1) {
- names = append(names, names1[ix1].name)
- ix1++
- }
- for ix2 < len(names2) {
- names = append(names, names2[ix2].name)
- ix2++
- }
-
- // For each of the names present in either or both of the directories being
- // iterated, stat the name under each root, and recurse the pair of them:
- for _, name := range names {
- fname := filepath.Join(path, name)
- var cInfo1, cInfo2 os.FileInfo
- if is1Dir {
- cInfo1, err = os.Lstat(filepath.Join(w.dir1, fname)) // lstat(2): fs access
- if err != nil && !os.IsNotExist(err) {
- return err
- }
- }
- if is2Dir {
- cInfo2, err = os.Lstat(filepath.Join(w.dir2, fname)) // lstat(2): fs access
- if err != nil && !os.IsNotExist(err) {
- return err
- }
- }
- if err = w.walk(fname, cInfo1, cInfo2); err != nil {
- return err
- }
- }
- return nil
-}
-
-// {name,inode} pairs used to support the early-pruning logic of the walker type
-type nameIno struct {
- name string
- ino uint64
-}
-
-type nameInoSlice []nameIno
-
-func (s nameInoSlice) Len() int { return len(s) }
-func (s nameInoSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s nameInoSlice) Less(i, j int) bool { return s[i].name < s[j].name }
-
-// readdirnames is a hacked-apart version of the Go stdlib code, exposing inode
-// numbers further up the stack when reading directory contents. Unlike
-// os.Readdirnames, which returns a list of filenames, this function returns a
-// list of {filename,inode} pairs.
-func readdirnames(dirname string) (names []nameIno, err error) {
- var (
- size = 100
- buf = make([]byte, 4096)
- nbuf int
- bufp int
- nb int
- )
-
- f, err := os.Open(dirname)
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- names = make([]nameIno, 0, size) // Empty with room to grow.
- for {
- // Refill the buffer if necessary
- if bufp >= nbuf {
- bufp = 0
- nbuf, err = syscall.ReadDirent(int(f.Fd()), buf) // getdents on linux
- if nbuf < 0 {
- nbuf = 0
- }
- if err != nil {
- return nil, os.NewSyscallError("readdirent", err)
- }
- if nbuf <= 0 {
- break // EOF
- }
- }
-
- // Drain the buffer
- nb, names = parseDirent(buf[bufp:nbuf], names)
- bufp += nb
- }
-
- sl := nameInoSlice(names)
- sort.Sort(sl)
- return sl, nil
-}
-
-// parseDirent is a minor modification of syscall.ParseDirent (linux version)
-// which returns {name,inode} pairs instead of just names.
-func parseDirent(buf []byte, names []nameIno) (consumed int, newnames []nameIno) {
- origlen := len(buf)
- for len(buf) > 0 {
- dirent := (*syscall.Dirent)(unsafe.Pointer(&buf[0]))
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- names = append(names, nameIno{name, dirent.Ino})
- }
- return origlen - len(buf), names
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_other.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_other.go
deleted file mode 100644
index 35832f087d..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_other.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// +build !linux
-
-package archive
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "runtime"
- "strings"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-func collectFileInfoForChanges(oldDir, newDir string) (*FileInfo, *FileInfo, error) {
- var (
- oldRoot, newRoot *FileInfo
- err1, err2 error
- errs = make(chan error, 2)
- )
- go func() {
- oldRoot, err1 = collectFileInfo(oldDir)
- errs <- err1
- }()
- go func() {
- newRoot, err2 = collectFileInfo(newDir)
- errs <- err2
- }()
-
- // block until both routines have returned
- for i := 0; i < 2; i++ {
- if err := <-errs; err != nil {
- return nil, nil, err
- }
- }
-
- return oldRoot, newRoot, nil
-}
-
-func collectFileInfo(sourceDir string) (*FileInfo, error) {
- root := newRootFileInfo()
-
- err := filepath.Walk(sourceDir, func(path string, f os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- // Rebase path
- relPath, err := filepath.Rel(sourceDir, path)
- if err != nil {
- return err
- }
-
- // As this runs on the daemon side, file paths are OS specific.
- relPath = filepath.Join(string(os.PathSeparator), relPath)
-
- // See https://github.com/golang/go/issues/9168 - bug in filepath.Join.
- // Temporary workaround. If the returned path starts with two backslashes,
- // trim it down to a single backslash. Only relevant on Windows.
- if runtime.GOOS == "windows" {
- if strings.HasPrefix(relPath, `\\`) {
- relPath = relPath[1:]
- }
- }
-
- if relPath == string(os.PathSeparator) {
- return nil
- }
-
- parent := root.LookUp(filepath.Dir(relPath))
- if parent == nil {
- return fmt.Errorf("collectFileInfo: Unexpectedly no parent for %s", relPath)
- }
-
- info := &FileInfo{
- name: filepath.Base(relPath),
- children: make(map[string]*FileInfo),
- parent: parent,
- }
-
- s, err := system.Lstat(path)
- if err != nil {
- return err
- }
- info.stat = s
-
- info.capability, _ = system.Lgetxattr(path, "security.capability")
-
- parent.children[info.name] = info
-
- return nil
- })
- if err != nil {
- return nil, err
- }
- return root, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_unix.go
deleted file mode 100644
index 6646b4dfda..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_unix.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// +build !windows
-
-package archive
-
-import (
- "os"
- "syscall"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool {
- // Don't look at size for dirs, its not a good measure of change
- if oldStat.Mode() != newStat.Mode() ||
- oldStat.UID() != newStat.UID() ||
- oldStat.GID() != newStat.GID() ||
- oldStat.Rdev() != newStat.Rdev() ||
- // Don't look at size for dirs, its not a good measure of change
- (oldStat.Mode()&syscall.S_IFDIR != syscall.S_IFDIR &&
- (!sameFsTimeSpec(oldStat.Mtim(), newStat.Mtim()) || (oldStat.Size() != newStat.Size()))) {
- return true
- }
- return false
-}
-
-func (info *FileInfo) isDir() bool {
- return info.parent == nil || info.stat.Mode()&syscall.S_IFDIR != 0
-}
-
-func getIno(fi os.FileInfo) uint64 {
- return uint64(fi.Sys().(*syscall.Stat_t).Ino)
-}
-
-func hasHardlinks(fi os.FileInfo) bool {
- return fi.Sys().(*syscall.Stat_t).Nlink > 1
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_windows.go
deleted file mode 100644
index 2d8708d0ae..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_windows.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package archive
-
-import (
- "os"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool {
-
- // Don't look at size for dirs, its not a good measure of change
- if oldStat.ModTime() != newStat.ModTime() ||
- oldStat.Mode() != newStat.Mode() ||
- oldStat.Size() != newStat.Size() && !oldStat.IsDir() {
- return true
- }
- return false
-}
-
-func (info *FileInfo) isDir() bool {
- return info.parent == nil || info.stat.IsDir()
-}
-
-func getIno(fi os.FileInfo) (inode uint64) {
- return
-}
-
-func hasHardlinks(fi os.FileInfo) bool {
- return false
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy.go
deleted file mode 100644
index e950912643..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy.go
+++ /dev/null
@@ -1,458 +0,0 @@
-package archive
-
-import (
- "archive/tar"
- "errors"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-// Errors used or returned by this file.
-var (
- ErrNotDirectory = errors.New("not a directory")
- ErrDirNotExists = errors.New("no such directory")
- ErrCannotCopyDir = errors.New("cannot copy directory")
- ErrInvalidCopySource = errors.New("invalid copy source content")
-)
-
-// PreserveTrailingDotOrSeparator returns the given cleaned path (after
-// processing using any utility functions from the path or filepath stdlib
-// packages) and appends a trailing `/.` or `/` if its corresponding original
-// path (from before being processed by utility functions from the path or
-// filepath stdlib packages) ends with a trailing `/.` or `/`. If the cleaned
-// path already ends in a `.` path segment, then another is not added. If the
-// clean path already ends in a path separator, then another is not added.
-func PreserveTrailingDotOrSeparator(cleanedPath, originalPath string) string {
- // Ensure paths are in platform semantics
- cleanedPath = normalizePath(cleanedPath)
- originalPath = normalizePath(originalPath)
-
- if !specifiesCurrentDir(cleanedPath) && specifiesCurrentDir(originalPath) {
- if !hasTrailingPathSeparator(cleanedPath) {
- // Add a separator if it doesn't already end with one (a cleaned
- // path would only end in a separator if it is the root).
- cleanedPath += string(filepath.Separator)
- }
- cleanedPath += "."
- }
-
- if !hasTrailingPathSeparator(cleanedPath) && hasTrailingPathSeparator(originalPath) {
- cleanedPath += string(filepath.Separator)
- }
-
- return cleanedPath
-}
-
-// assertsDirectory returns whether the given path is
-// asserted to be a directory, i.e., the path ends with
-// a trailing '/' or `/.`, assuming a path separator of `/`.
-func assertsDirectory(path string) bool {
- return hasTrailingPathSeparator(path) || specifiesCurrentDir(path)
-}
-
-// hasTrailingPathSeparator returns whether the given
-// path ends with the system's path separator character.
-func hasTrailingPathSeparator(path string) bool {
- return len(path) > 0 && os.IsPathSeparator(path[len(path)-1])
-}
-
-// specifiesCurrentDir returns whether the given path specifies
-// a "current directory", i.e., the last path segment is `.`.
-func specifiesCurrentDir(path string) bool {
- return filepath.Base(path) == "."
-}
-
-// SplitPathDirEntry splits the given path between its directory name and its
-// basename by first cleaning the path but preserves a trailing "." if the
-// original path specified the current directory.
-func SplitPathDirEntry(path string) (dir, base string) {
- cleanedPath := filepath.Clean(normalizePath(path))
-
- if specifiesCurrentDir(path) {
- cleanedPath += string(filepath.Separator) + "."
- }
-
- return filepath.Dir(cleanedPath), filepath.Base(cleanedPath)
-}
-
-// TarResource archives the resource described by the given CopyInfo to a Tar
-// archive. A non-nil error is returned if sourcePath does not exist or is
-// asserted to be a directory but exists as another type of file.
-//
-// This function acts as a convenient wrapper around TarWithOptions, which
-// requires a directory as the source path. TarResource accepts either a
-// directory or a file path and correctly sets the Tar options.
-func TarResource(sourceInfo CopyInfo) (content Archive, err error) {
- return TarResourceRebase(sourceInfo.Path, sourceInfo.RebaseName)
-}
-
-// TarResourceRebase is like TarResource but renames the first path element of
-// items in the resulting tar archive to match the given rebaseName if not "".
-func TarResourceRebase(sourcePath, rebaseName string) (content Archive, err error) {
- sourcePath = normalizePath(sourcePath)
- if _, err = os.Lstat(sourcePath); err != nil {
- // Catches the case where the source does not exist or is not a
- // directory if asserted to be a directory, as this also causes an
- // error.
- return
- }
-
- // Separate the source path between it's directory and
- // the entry in that directory which we are archiving.
- sourceDir, sourceBase := SplitPathDirEntry(sourcePath)
-
- filter := []string{sourceBase}
-
- logrus.Debugf("copying %q from %q", sourceBase, sourceDir)
-
- return TarWithOptions(sourceDir, &TarOptions{
- Compression: Uncompressed,
- IncludeFiles: filter,
- IncludeSourceDir: true,
- RebaseNames: map[string]string{
- sourceBase: rebaseName,
- },
- })
-}
-
-// CopyInfo holds basic info about the source
-// or destination path of a copy operation.
-type CopyInfo struct {
- Path string
- Exists bool
- IsDir bool
- RebaseName string
-}
-
-// CopyInfoSourcePath stats the given path to create a CopyInfo
-// struct representing that resource for the source of an archive copy
-// operation. The given path should be an absolute local path. A source path
-// has all symlinks evaluated that appear before the last path separator ("/"
-// on Unix). As it is to be a copy source, the path must exist.
-func CopyInfoSourcePath(path string, followLink bool) (CopyInfo, error) {
- // normalize the file path and then evaluate the symbol link
- // we will use the target file instead of the symbol link if
- // followLink is set
- path = normalizePath(path)
-
- resolvedPath, rebaseName, err := ResolveHostSourcePath(path, followLink)
- if err != nil {
- return CopyInfo{}, err
- }
-
- stat, err := os.Lstat(resolvedPath)
- if err != nil {
- return CopyInfo{}, err
- }
-
- return CopyInfo{
- Path: resolvedPath,
- Exists: true,
- IsDir: stat.IsDir(),
- RebaseName: rebaseName,
- }, nil
-}
-
-// CopyInfoDestinationPath stats the given path to create a CopyInfo
-// struct representing that resource for the destination of an archive copy
-// operation. The given path should be an absolute local path.
-func CopyInfoDestinationPath(path string) (info CopyInfo, err error) {
- maxSymlinkIter := 10 // filepath.EvalSymlinks uses 255, but 10 already seems like a lot.
- path = normalizePath(path)
- originalPath := path
-
- stat, err := os.Lstat(path)
-
- if err == nil && stat.Mode()&os.ModeSymlink == 0 {
- // The path exists and is not a symlink.
- return CopyInfo{
- Path: path,
- Exists: true,
- IsDir: stat.IsDir(),
- }, nil
- }
-
- // While the path is a symlink.
- for n := 0; err == nil && stat.Mode()&os.ModeSymlink != 0; n++ {
- if n > maxSymlinkIter {
- // Don't follow symlinks more than this arbitrary number of times.
- return CopyInfo{}, errors.New("too many symlinks in " + originalPath)
- }
-
- // The path is a symbolic link. We need to evaluate it so that the
- // destination of the copy operation is the link target and not the
- // link itself. This is notably different than CopyInfoSourcePath which
- // only evaluates symlinks before the last appearing path separator.
- // Also note that it is okay if the last path element is a broken
- // symlink as the copy operation should create the target.
- var linkTarget string
-
- linkTarget, err = os.Readlink(path)
- if err != nil {
- return CopyInfo{}, err
- }
-
- if !system.IsAbs(linkTarget) {
- // Join with the parent directory.
- dstParent, _ := SplitPathDirEntry(path)
- linkTarget = filepath.Join(dstParent, linkTarget)
- }
-
- path = linkTarget
- stat, err = os.Lstat(path)
- }
-
- if err != nil {
- // It's okay if the destination path doesn't exist. We can still
- // continue the copy operation if the parent directory exists.
- if !os.IsNotExist(err) {
- return CopyInfo{}, err
- }
-
- // Ensure destination parent dir exists.
- dstParent, _ := SplitPathDirEntry(path)
-
- parentDirStat, err := os.Lstat(dstParent)
- if err != nil {
- return CopyInfo{}, err
- }
- if !parentDirStat.IsDir() {
- return CopyInfo{}, ErrNotDirectory
- }
-
- return CopyInfo{Path: path}, nil
- }
-
- // The path exists after resolving symlinks.
- return CopyInfo{
- Path: path,
- Exists: true,
- IsDir: stat.IsDir(),
- }, nil
-}
-
-// PrepareArchiveCopy prepares the given srcContent archive, which should
-// contain the archived resource described by srcInfo, to the destination
-// described by dstInfo. Returns the possibly modified content archive along
-// with the path to the destination directory which it should be extracted to.
-func PrepareArchiveCopy(srcContent Reader, srcInfo, dstInfo CopyInfo) (dstDir string, content Archive, err error) {
- // Ensure in platform semantics
- srcInfo.Path = normalizePath(srcInfo.Path)
- dstInfo.Path = normalizePath(dstInfo.Path)
-
- // Separate the destination path between its directory and base
- // components in case the source archive contents need to be rebased.
- dstDir, dstBase := SplitPathDirEntry(dstInfo.Path)
- _, srcBase := SplitPathDirEntry(srcInfo.Path)
-
- switch {
- case dstInfo.Exists && dstInfo.IsDir:
- // The destination exists as a directory. No alteration
- // to srcContent is needed as its contents can be
- // simply extracted to the destination directory.
- return dstInfo.Path, ioutil.NopCloser(srcContent), nil
- case dstInfo.Exists && srcInfo.IsDir:
- // The destination exists as some type of file and the source
- // content is a directory. This is an error condition since
- // you cannot copy a directory to an existing file location.
- return "", nil, ErrCannotCopyDir
- case dstInfo.Exists:
- // The destination exists as some type of file and the source content
- // is also a file. The source content entry will have to be renamed to
- // have a basename which matches the destination path's basename.
- if len(srcInfo.RebaseName) != 0 {
- srcBase = srcInfo.RebaseName
- }
- return dstDir, RebaseArchiveEntries(srcContent, srcBase, dstBase), nil
- case srcInfo.IsDir:
- // The destination does not exist and the source content is an archive
- // of a directory. The archive should be extracted to the parent of
- // the destination path instead, and when it is, the directory that is
- // created as a result should take the name of the destination path.
- // The source content entries will have to be renamed to have a
- // basename which matches the destination path's basename.
- if len(srcInfo.RebaseName) != 0 {
- srcBase = srcInfo.RebaseName
- }
- return dstDir, RebaseArchiveEntries(srcContent, srcBase, dstBase), nil
- case assertsDirectory(dstInfo.Path):
- // The destination does not exist and is asserted to be created as a
- // directory, but the source content is not a directory. This is an
- // error condition since you cannot create a directory from a file
- // source.
- return "", nil, ErrDirNotExists
- default:
- // The last remaining case is when the destination does not exist, is
- // not asserted to be a directory, and the source content is not an
- // archive of a directory. It this case, the destination file will need
- // to be created when the archive is extracted and the source content
- // entry will have to be renamed to have a basename which matches the
- // destination path's basename.
- if len(srcInfo.RebaseName) != 0 {
- srcBase = srcInfo.RebaseName
- }
- return dstDir, RebaseArchiveEntries(srcContent, srcBase, dstBase), nil
- }
-
-}
-
-// RebaseArchiveEntries rewrites the given srcContent archive replacing
-// an occurrence of oldBase with newBase at the beginning of entry names.
-func RebaseArchiveEntries(srcContent Reader, oldBase, newBase string) Archive {
- if oldBase == string(os.PathSeparator) {
- // If oldBase specifies the root directory, use an empty string as
- // oldBase instead so that newBase doesn't replace the path separator
- // that all paths will start with.
- oldBase = ""
- }
-
- rebased, w := io.Pipe()
-
- go func() {
- srcTar := tar.NewReader(srcContent)
- rebasedTar := tar.NewWriter(w)
-
- for {
- hdr, err := srcTar.Next()
- if err == io.EOF {
- // Signals end of archive.
- rebasedTar.Close()
- w.Close()
- return
- }
- if err != nil {
- w.CloseWithError(err)
- return
- }
-
- hdr.Name = strings.Replace(hdr.Name, oldBase, newBase, 1)
-
- if err = rebasedTar.WriteHeader(hdr); err != nil {
- w.CloseWithError(err)
- return
- }
-
- if _, err = io.Copy(rebasedTar, srcTar); err != nil {
- w.CloseWithError(err)
- return
- }
- }
- }()
-
- return rebased
-}
-
-// CopyResource performs an archive copy from the given source path to the
-// given destination path. The source path MUST exist and the destination
-// path's parent directory must exist.
-func CopyResource(srcPath, dstPath string, followLink bool) error {
- var (
- srcInfo CopyInfo
- err error
- )
-
- // Ensure in platform semantics
- srcPath = normalizePath(srcPath)
- dstPath = normalizePath(dstPath)
-
- // Clean the source and destination paths.
- srcPath = PreserveTrailingDotOrSeparator(filepath.Clean(srcPath), srcPath)
- dstPath = PreserveTrailingDotOrSeparator(filepath.Clean(dstPath), dstPath)
-
- if srcInfo, err = CopyInfoSourcePath(srcPath, followLink); err != nil {
- return err
- }
-
- content, err := TarResource(srcInfo)
- if err != nil {
- return err
- }
- defer content.Close()
-
- return CopyTo(content, srcInfo, dstPath)
-}
-
-// CopyTo handles extracting the given content whose
-// entries should be sourced from srcInfo to dstPath.
-func CopyTo(content Reader, srcInfo CopyInfo, dstPath string) error {
- // The destination path need not exist, but CopyInfoDestinationPath will
- // ensure that at least the parent directory exists.
- dstInfo, err := CopyInfoDestinationPath(normalizePath(dstPath))
- if err != nil {
- return err
- }
-
- dstDir, copyArchive, err := PrepareArchiveCopy(content, srcInfo, dstInfo)
- if err != nil {
- return err
- }
- defer copyArchive.Close()
-
- options := &TarOptions{
- NoLchown: true,
- NoOverwriteDirNonDir: true,
- }
-
- return Untar(copyArchive, dstDir, options)
-}
-
-// ResolveHostSourcePath decides real path need to be copied with parameters such as
-// whether to follow symbol link or not, if followLink is true, resolvedPath will return
-// link target of any symbol link file, else it will only resolve symlink of directory
-// but return symbol link file itself without resolving.
-func ResolveHostSourcePath(path string, followLink bool) (resolvedPath, rebaseName string, err error) {
- if followLink {
- resolvedPath, err = filepath.EvalSymlinks(path)
- if err != nil {
- return
- }
-
- resolvedPath, rebaseName = GetRebaseName(path, resolvedPath)
- } else {
- dirPath, basePath := filepath.Split(path)
-
- // if not follow symbol link, then resolve symbol link of parent dir
- var resolvedDirPath string
- resolvedDirPath, err = filepath.EvalSymlinks(dirPath)
- if err != nil {
- return
- }
- // resolvedDirPath will have been cleaned (no trailing path separators) so
- // we can manually join it with the base path element.
- resolvedPath = resolvedDirPath + string(filepath.Separator) + basePath
- if hasTrailingPathSeparator(path) && filepath.Base(path) != filepath.Base(resolvedPath) {
- rebaseName = filepath.Base(path)
- }
- }
- return resolvedPath, rebaseName, nil
-}
-
-// GetRebaseName normalizes and compares path and resolvedPath,
-// return completed resolved path and rebased file name
-func GetRebaseName(path, resolvedPath string) (string, string) {
- // linkTarget will have been cleaned (no trailing path separators and dot) so
- // we can manually join it with them
- var rebaseName string
- if specifiesCurrentDir(path) && !specifiesCurrentDir(resolvedPath) {
- resolvedPath += string(filepath.Separator) + "."
- }
-
- if hasTrailingPathSeparator(path) && !hasTrailingPathSeparator(resolvedPath) {
- resolvedPath += string(filepath.Separator)
- }
-
- if filepath.Base(path) != filepath.Base(resolvedPath) {
- // In the case where the path had a trailing separator and a symlink
- // evaluation has changed the last path component, we will need to
- // rebase the name in the archive that is being copied to match the
- // originally requested name.
- rebaseName = filepath.Base(path)
- }
- return resolvedPath, rebaseName
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy_unix.go
deleted file mode 100644
index e305b5e4af..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy_unix.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build !windows
-
-package archive
-
-import (
- "path/filepath"
-)
-
-func normalizePath(path string) string {
- return filepath.ToSlash(path)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy_windows.go
deleted file mode 100644
index 2b775b45c4..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/copy_windows.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package archive
-
-import (
- "path/filepath"
-)
-
-func normalizePath(path string) string {
- return filepath.FromSlash(path)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/diff.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/diff.go
deleted file mode 100644
index 887dd54ccf..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/diff.go
+++ /dev/null
@@ -1,279 +0,0 @@
-package archive
-
-import (
- "archive/tar"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "runtime"
- "strings"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-// UnpackLayer unpack `layer` to a `dest`. The stream `layer` can be
-// compressed or uncompressed.
-// Returns the size in bytes of the contents of the layer.
-func UnpackLayer(dest string, layer Reader, options *TarOptions) (size int64, err error) {
- tr := tar.NewReader(layer)
- trBuf := pools.BufioReader32KPool.Get(tr)
- defer pools.BufioReader32KPool.Put(trBuf)
-
- var dirs []*tar.Header
- unpackedPaths := make(map[string]struct{})
-
- if options == nil {
- options = &TarOptions{}
- }
- if options.ExcludePatterns == nil {
- options.ExcludePatterns = []string{}
- }
- remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(options.UIDMaps, options.GIDMaps)
- if err != nil {
- return 0, err
- }
-
- aufsTempdir := ""
- aufsHardlinks := make(map[string]*tar.Header)
-
- if options == nil {
- options = &TarOptions{}
- }
- // Iterate through the files in the archive.
- for {
- hdr, err := tr.Next()
- if err == io.EOF {
- // end of tar archive
- break
- }
- if err != nil {
- return 0, err
- }
-
- size += hdr.Size
-
- // Normalize name, for safety and for a simple is-root check
- hdr.Name = filepath.Clean(hdr.Name)
-
- // Windows does not support filenames with colons in them. Ignore
- // these files. This is not a problem though (although it might
- // appear that it is). Let's suppose a client is running docker pull.
- // The daemon it points to is Windows. Would it make sense for the
- // client to be doing a docker pull Ubuntu for example (which has files
- // with colons in the name under /usr/share/man/man3)? No, absolutely
- // not as it would really only make sense that they were pulling a
- // Windows image. However, for development, it is necessary to be able
- // to pull Linux images which are in the repository.
- //
- // TODO Windows. Once the registry is aware of what images are Windows-
- // specific or Linux-specific, this warning should be changed to an error
- // to cater for the situation where someone does manage to upload a Linux
- // image but have it tagged as Windows inadvertently.
- if runtime.GOOS == "windows" {
- if strings.Contains(hdr.Name, ":") {
- logrus.Warnf("Windows: Ignoring %s (is this a Linux image?)", hdr.Name)
- continue
- }
- }
-
- // Note as these operations are platform specific, so must the slash be.
- if !strings.HasSuffix(hdr.Name, string(os.PathSeparator)) {
- // Not the root directory, ensure that the parent directory exists.
- // This happened in some tests where an image had a tarfile without any
- // parent directories.
- parent := filepath.Dir(hdr.Name)
- parentPath := filepath.Join(dest, parent)
-
- if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
- err = system.MkdirAll(parentPath, 0600)
- if err != nil {
- return 0, err
- }
- }
- }
-
- // Skip AUFS metadata dirs
- if strings.HasPrefix(hdr.Name, WhiteoutMetaPrefix) {
- // Regular files inside /.wh..wh.plnk can be used as hardlink targets
- // We don't want this directory, but we need the files in them so that
- // such hardlinks can be resolved.
- if strings.HasPrefix(hdr.Name, WhiteoutLinkDir) && hdr.Typeflag == tar.TypeReg {
- basename := filepath.Base(hdr.Name)
- aufsHardlinks[basename] = hdr
- if aufsTempdir == "" {
- if aufsTempdir, err = ioutil.TempDir("", "dockerplnk"); err != nil {
- return 0, err
- }
- defer os.RemoveAll(aufsTempdir)
- }
- if err := createTarFile(filepath.Join(aufsTempdir, basename), dest, hdr, tr, true, nil); err != nil {
- return 0, err
- }
- }
-
- if hdr.Name != WhiteoutOpaqueDir {
- continue
- }
- }
- path := filepath.Join(dest, hdr.Name)
- rel, err := filepath.Rel(dest, path)
- if err != nil {
- return 0, err
- }
-
- // Note as these operations are platform specific, so must the slash be.
- if strings.HasPrefix(rel, ".."+string(os.PathSeparator)) {
- return 0, breakoutError(fmt.Errorf("%q is outside of %q", hdr.Name, dest))
- }
- base := filepath.Base(path)
-
- if strings.HasPrefix(base, WhiteoutPrefix) {
- dir := filepath.Dir(path)
- if base == WhiteoutOpaqueDir {
- _, err := os.Lstat(dir)
- if err != nil {
- return 0, err
- }
- err = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
- if err != nil {
- if os.IsNotExist(err) {
- err = nil // parent was deleted
- }
- return err
- }
- if path == dir {
- return nil
- }
- if _, exists := unpackedPaths[path]; !exists {
- err := os.RemoveAll(path)
- return err
- }
- return nil
- })
- if err != nil {
- return 0, err
- }
- } else {
- originalBase := base[len(WhiteoutPrefix):]
- originalPath := filepath.Join(dir, originalBase)
- if err := os.RemoveAll(originalPath); err != nil {
- return 0, err
- }
- }
- } else {
- // If path exits we almost always just want to remove and replace it.
- // The only exception is when it is a directory *and* the file from
- // the layer is also a directory. Then we want to merge them (i.e.
- // just apply the metadata from the layer).
- if fi, err := os.Lstat(path); err == nil {
- if !(fi.IsDir() && hdr.Typeflag == tar.TypeDir) {
- if err := os.RemoveAll(path); err != nil {
- return 0, err
- }
- }
- }
-
- trBuf.Reset(tr)
- srcData := io.Reader(trBuf)
- srcHdr := hdr
-
- // Hard links into /.wh..wh.plnk don't work, as we don't extract that directory, so
- // we manually retarget these into the temporary files we extracted them into
- if hdr.Typeflag == tar.TypeLink && strings.HasPrefix(filepath.Clean(hdr.Linkname), WhiteoutLinkDir) {
- linkBasename := filepath.Base(hdr.Linkname)
- srcHdr = aufsHardlinks[linkBasename]
- if srcHdr == nil {
- return 0, fmt.Errorf("Invalid aufs hardlink")
- }
- tmpFile, err := os.Open(filepath.Join(aufsTempdir, linkBasename))
- if err != nil {
- return 0, err
- }
- defer tmpFile.Close()
- srcData = tmpFile
- }
-
- // if the options contain a uid & gid maps, convert header uid/gid
- // entries using the maps such that lchown sets the proper mapped
- // uid/gid after writing the file. We only perform this mapping if
- // the file isn't already owned by the remapped root UID or GID, as
- // that specific uid/gid has no mapping from container -> host, and
- // those files already have the proper ownership for inside the
- // container.
- if srcHdr.Uid != remappedRootUID {
- xUID, err := idtools.ToHost(srcHdr.Uid, options.UIDMaps)
- if err != nil {
- return 0, err
- }
- srcHdr.Uid = xUID
- }
- if srcHdr.Gid != remappedRootGID {
- xGID, err := idtools.ToHost(srcHdr.Gid, options.GIDMaps)
- if err != nil {
- return 0, err
- }
- srcHdr.Gid = xGID
- }
- if err := createTarFile(path, dest, srcHdr, srcData, true, nil); err != nil {
- return 0, err
- }
-
- // Directory mtimes must be handled at the end to avoid further
- // file creation in them to modify the directory mtime
- if hdr.Typeflag == tar.TypeDir {
- dirs = append(dirs, hdr)
- }
- unpackedPaths[path] = struct{}{}
- }
- }
-
- for _, hdr := range dirs {
- path := filepath.Join(dest, hdr.Name)
- if err := system.Chtimes(path, hdr.AccessTime, hdr.ModTime); err != nil {
- return 0, err
- }
- }
-
- return size, nil
-}
-
-// ApplyLayer parses a diff in the standard layer format from `layer`,
-// and applies it to the directory `dest`. The stream `layer` can be
-// compressed or uncompressed.
-// Returns the size in bytes of the contents of the layer.
-func ApplyLayer(dest string, layer Reader) (int64, error) {
- return applyLayerHandler(dest, layer, &TarOptions{}, true)
-}
-
-// ApplyUncompressedLayer parses a diff in the standard layer format from
-// `layer`, and applies it to the directory `dest`. The stream `layer`
-// can only be uncompressed.
-// Returns the size in bytes of the contents of the layer.
-func ApplyUncompressedLayer(dest string, layer Reader, options *TarOptions) (int64, error) {
- return applyLayerHandler(dest, layer, options, false)
-}
-
-// do the bulk load of ApplyLayer, but allow for not calling DecompressStream
-func applyLayerHandler(dest string, layer Reader, options *TarOptions, decompress bool) (int64, error) {
- dest = filepath.Clean(dest)
-
- // We need to be able to set any perms
- oldmask, err := system.Umask(0)
- if err != nil {
- return 0, err
- }
- defer system.Umask(oldmask) // ignore err, ErrNotSupportedPlatform
-
- if decompress {
- layer, err = DecompressStream(layer)
- if err != nil {
- return 0, err
- }
- }
- return UnpackLayer(dest, layer, options)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/example_changes.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/example_changes.go
deleted file mode 100644
index a5e08e4ee9..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/example_changes.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// +build ignore
-
-// Simple tool to create an archive stream from an old and new directory
-//
-// By default it will stream the comparison of two temporary directories with junk files
-package main
-
-import (
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive"
-)
-
-var (
- flDebug = flag.Bool("D", false, "debugging output")
- flNewDir = flag.String("newdir", "", "")
- flOldDir = flag.String("olddir", "", "")
- log = logrus.New()
-)
-
-func main() {
- flag.Usage = func() {
- fmt.Println("Produce a tar from comparing two directory paths. By default a demo tar is created of around 200 files (including hardlinks)")
- fmt.Printf("%s [OPTIONS]\n", os.Args[0])
- flag.PrintDefaults()
- }
- flag.Parse()
- log.Out = os.Stderr
- if (len(os.Getenv("DEBUG")) > 0) || *flDebug {
- logrus.SetLevel(logrus.DebugLevel)
- }
- var newDir, oldDir string
-
- if len(*flNewDir) == 0 {
- var err error
- newDir, err = ioutil.TempDir("", "docker-test-newDir")
- if err != nil {
- log.Fatal(err)
- }
- defer os.RemoveAll(newDir)
- if _, err := prepareUntarSourceDirectory(100, newDir, true); err != nil {
- log.Fatal(err)
- }
- } else {
- newDir = *flNewDir
- }
-
- if len(*flOldDir) == 0 {
- oldDir, err := ioutil.TempDir("", "docker-test-oldDir")
- if err != nil {
- log.Fatal(err)
- }
- defer os.RemoveAll(oldDir)
- } else {
- oldDir = *flOldDir
- }
-
- changes, err := archive.ChangesDirs(newDir, oldDir)
- if err != nil {
- log.Fatal(err)
- }
-
- a, err := archive.ExportChanges(newDir, changes)
- if err != nil {
- log.Fatal(err)
- }
- defer a.Close()
-
- i, err := io.Copy(os.Stdout, a)
- if err != nil && err != io.EOF {
- log.Fatal(err)
- }
- fmt.Fprintf(os.Stderr, "wrote archive of %d bytes", i)
-}
-
-func prepareUntarSourceDirectory(numberOfFiles int, targetPath string, makeLinks bool) (int, error) {
- fileData := []byte("fooo")
- for n := 0; n < numberOfFiles; n++ {
- fileName := fmt.Sprintf("file-%d", n)
- if err := ioutil.WriteFile(path.Join(targetPath, fileName), fileData, 0700); err != nil {
- return 0, err
- }
- if makeLinks {
- if err := os.Link(path.Join(targetPath, fileName), path.Join(targetPath, fileName+"-link")); err != nil {
- return 0, err
- }
- }
- }
- totalSize := numberOfFiles * len(fileData)
- return totalSize, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/time_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/time_linux.go
deleted file mode 100644
index 3448569b1e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/time_linux.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package archive
-
-import (
- "syscall"
- "time"
-)
-
-func timeToTimespec(time time.Time) (ts syscall.Timespec) {
- if time.IsZero() {
- // Return UTIME_OMIT special value
- ts.Sec = 0
- ts.Nsec = ((1 << 30) - 2)
- return
- }
- return syscall.NsecToTimespec(time.UnixNano())
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/time_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/time_unsupported.go
deleted file mode 100644
index e85aac0540..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/time_unsupported.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build !linux
-
-package archive
-
-import (
- "syscall"
- "time"
-)
-
-func timeToTimespec(time time.Time) (ts syscall.Timespec) {
- nsec := int64(0)
- if !time.IsZero() {
- nsec = time.UnixNano()
- }
- return syscall.NsecToTimespec(nsec)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/whiteouts.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/whiteouts.go
deleted file mode 100644
index d20478a10d..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/whiteouts.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package archive
-
-// Whiteouts are files with a special meaning for the layered filesystem.
-// Docker uses AUFS whiteout files inside exported archives. In other
-// filesystems these files are generated/handled on tar creation/extraction.
-
-// WhiteoutPrefix prefix means file is a whiteout. If this is followed by a
-// filename this means that file has been removed from the base layer.
-const WhiteoutPrefix = ".wh."
-
-// WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not
-// for removing an actual file. Normally these files are excluded from exported
-// archives.
-const WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix
-
-// WhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other
-// layers. Normally these should not go into exported archives and all changed
-// hardlinks should be copied to the top layer.
-const WhiteoutLinkDir = WhiteoutMetaPrefix + "plnk"
-
-// WhiteoutOpaqueDir file means directory has been made opaque - meaning
-// readdir calls to this directory do not follow to lower layers.
-const WhiteoutOpaqueDir = WhiteoutMetaPrefix + ".opq"
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/wrap.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/wrap.go
deleted file mode 100644
index dfb335c0b6..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/wrap.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package archive
-
-import (
- "archive/tar"
- "bytes"
- "io/ioutil"
-)
-
-// Generate generates a new archive from the content provided
-// as input.
-//
-// `files` is a sequence of path/content pairs. A new file is
-// added to the archive for each pair.
-// If the last pair is incomplete, the file is created with an
-// empty content. For example:
-//
-// Generate("foo.txt", "hello world", "emptyfile")
-//
-// The above call will return an archive with 2 files:
-// * ./foo.txt with content "hello world"
-// * ./empty with empty content
-//
-// FIXME: stream content instead of buffering
-// FIXME: specify permissions and other archive metadata
-func Generate(input ...string) (Archive, error) {
- files := parseStringPairs(input...)
- buf := new(bytes.Buffer)
- tw := tar.NewWriter(buf)
- for _, file := range files {
- name, content := file[0], file[1]
- hdr := &tar.Header{
- Name: name,
- Size: int64(len(content)),
- }
- if err := tw.WriteHeader(hdr); err != nil {
- return nil, err
- }
- if _, err := tw.Write([]byte(content)); err != nil {
- return nil, err
- }
- }
- if err := tw.Close(); err != nil {
- return nil, err
- }
- return ioutil.NopCloser(buf), nil
-}
-
-func parseStringPairs(input ...string) (output [][2]string) {
- output = make([][2]string, 0, len(input)/2+1)
- for i := 0; i < len(input); i += 2 {
- var pair [2]string
- pair[0] = input[i]
- if i+1 < len(input) {
- pair[1] = input[i+1]
- }
- output = append(output, pair)
- }
- return
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils.go
deleted file mode 100644
index a15cf4bc5e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils.go
+++ /dev/null
@@ -1,279 +0,0 @@
-package fileutils
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "regexp"
- "strings"
- "text/scanner"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
-)
-
-// exclusion return true if the specified pattern is an exclusion
-func exclusion(pattern string) bool {
- return pattern[0] == '!'
-}
-
-// empty return true if the specified pattern is empty
-func empty(pattern string) bool {
- return pattern == ""
-}
-
-// CleanPatterns takes a slice of patterns returns a new
-// slice of patterns cleaned with filepath.Clean, stripped
-// of any empty patterns and lets the caller know whether the
-// slice contains any exception patterns (prefixed with !).
-func CleanPatterns(patterns []string) ([]string, [][]string, bool, error) {
- // Loop over exclusion patterns and:
- // 1. Clean them up.
- // 2. Indicate whether we are dealing with any exception rules.
- // 3. Error if we see a single exclusion marker on it's own (!).
- cleanedPatterns := []string{}
- patternDirs := [][]string{}
- exceptions := false
- for _, pattern := range patterns {
- // Eliminate leading and trailing whitespace.
- pattern = strings.TrimSpace(pattern)
- if empty(pattern) {
- continue
- }
- if exclusion(pattern) {
- if len(pattern) == 1 {
- return nil, nil, false, errors.New("Illegal exclusion pattern: !")
- }
- exceptions = true
- }
- pattern = filepath.Clean(pattern)
- cleanedPatterns = append(cleanedPatterns, pattern)
- if exclusion(pattern) {
- pattern = pattern[1:]
- }
- patternDirs = append(patternDirs, strings.Split(pattern, "/"))
- }
-
- return cleanedPatterns, patternDirs, exceptions, nil
-}
-
-// Matches returns true if file matches any of the patterns
-// and isn't excluded by any of the subsequent patterns.
-func Matches(file string, patterns []string) (bool, error) {
- file = filepath.Clean(file)
-
- if file == "." {
- // Don't let them exclude everything, kind of silly.
- return false, nil
- }
-
- patterns, patDirs, _, err := CleanPatterns(patterns)
- if err != nil {
- return false, err
- }
-
- return OptimizedMatches(file, patterns, patDirs)
-}
-
-// OptimizedMatches is basically the same as fileutils.Matches() but optimized for archive.go.
-// It will assume that the inputs have been preprocessed and therefore the function
-// doesn't need to do as much error checking and clean-up. This was done to avoid
-// repeating these steps on each file being checked during the archive process.
-// The more generic fileutils.Matches() can't make these assumptions.
-func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool, error) {
- matched := false
- parentPath := filepath.Dir(file)
- parentPathDirs := strings.Split(parentPath, "/")
-
- for i, pattern := range patterns {
- negative := false
-
- if exclusion(pattern) {
- negative = true
- pattern = pattern[1:]
- }
-
- match, err := regexpMatch(pattern, file)
- if err != nil {
- return false, fmt.Errorf("Error in pattern (%s): %s", pattern, err)
- }
-
- if !match && parentPath != "." {
- // Check to see if the pattern matches one of our parent dirs.
- if len(patDirs[i]) <= len(parentPathDirs) {
- match, _ = regexpMatch(strings.Join(patDirs[i], "/"),
- strings.Join(parentPathDirs[:len(patDirs[i])], "/"))
- }
- }
-
- if match {
- matched = !negative
- }
- }
-
- if matched {
- logrus.Debugf("Skipping excluded path: %s", file)
- }
-
- return matched, nil
-}
-
-// regexpMatch tries to match the logic of filepath.Match but
-// does so using regexp logic. We do this so that we can expand the
-// wildcard set to include other things, like "**" to mean any number
-// of directories. This means that we should be backwards compatible
-// with filepath.Match(). We'll end up supporting more stuff, due to
-// the fact that we're using regexp, but that's ok - it does no harm.
-func regexpMatch(pattern, path string) (bool, error) {
- regStr := "^"
-
- // Do some syntax checking on the pattern.
- // filepath's Match() has some really weird rules that are inconsistent
- // so instead of trying to dup their logic, just call Match() for its
- // error state and if there is an error in the pattern return it.
- // If this becomes an issue we can remove this since its really only
- // needed in the error (syntax) case - which isn't really critical.
- if _, err := filepath.Match(pattern, path); err != nil {
- return false, err
- }
-
- // Go through the pattern and convert it to a regexp.
- // We use a scanner so we can support utf-8 chars.
- var scan scanner.Scanner
- scan.Init(strings.NewReader(pattern))
-
- sl := string(os.PathSeparator)
- escSL := sl
- if sl == `\` {
- escSL += `\`
- }
-
- for scan.Peek() != scanner.EOF {
- ch := scan.Next()
-
- if ch == '*' {
- if scan.Peek() == '*' {
- // is some flavor of "**"
- scan.Next()
-
- if scan.Peek() == scanner.EOF {
- // is "**EOF" - to align with .gitignore just accept all
- regStr += ".*"
- } else {
- // is "**"
- regStr += "((.*" + escSL + ")|([^" + escSL + "]*))"
- }
-
- // Treat **/ as ** so eat the "/"
- if string(scan.Peek()) == sl {
- scan.Next()
- }
- } else {
- // is "*" so map it to anything but "/"
- regStr += "[^" + escSL + "]*"
- }
- } else if ch == '?' {
- // "?" is any char except "/"
- regStr += "[^" + escSL + "]"
- } else if strings.Index(".$", string(ch)) != -1 {
- // Escape some regexp special chars that have no meaning
- // in golang's filepath.Match
- regStr += `\` + string(ch)
- } else if ch == '\\' {
- // escape next char. Note that a trailing \ in the pattern
- // will be left alone (but need to escape it)
- if sl == `\` {
- // On windows map "\" to "\\", meaning an escaped backslash,
- // and then just continue because filepath.Match on
- // Windows doesn't allow escaping at all
- regStr += escSL
- continue
- }
- if scan.Peek() != scanner.EOF {
- regStr += `\` + string(scan.Next())
- } else {
- regStr += `\`
- }
- } else {
- regStr += string(ch)
- }
- }
-
- regStr += "$"
-
- res, err := regexp.MatchString(regStr, path)
-
- // Map regexp's error to filepath's so no one knows we're not using filepath
- if err != nil {
- err = filepath.ErrBadPattern
- }
-
- return res, err
-}
-
-// CopyFile copies from src to dst until either EOF is reached
-// on src or an error occurs. It verifies src exists and remove
-// the dst if it exists.
-func CopyFile(src, dst string) (int64, error) {
- cleanSrc := filepath.Clean(src)
- cleanDst := filepath.Clean(dst)
- if cleanSrc == cleanDst {
- return 0, nil
- }
- sf, err := os.Open(cleanSrc)
- if err != nil {
- return 0, err
- }
- defer sf.Close()
- if err := os.Remove(cleanDst); err != nil && !os.IsNotExist(err) {
- return 0, err
- }
- df, err := os.Create(cleanDst)
- if err != nil {
- return 0, err
- }
- defer df.Close()
- return io.Copy(df, sf)
-}
-
-// ReadSymlinkedDirectory returns the target directory of a symlink.
-// The target of the symbolic link may not be a file.
-func ReadSymlinkedDirectory(path string) (string, error) {
- var realPath string
- var err error
- if realPath, err = filepath.Abs(path); err != nil {
- return "", fmt.Errorf("unable to get absolute path for %s: %s", path, err)
- }
- if realPath, err = filepath.EvalSymlinks(realPath); err != nil {
- return "", fmt.Errorf("failed to canonicalise path for %s: %s", path, err)
- }
- realPathInfo, err := os.Stat(realPath)
- if err != nil {
- return "", fmt.Errorf("failed to stat target '%s' of '%s': %s", realPath, path, err)
- }
- if !realPathInfo.Mode().IsDir() {
- return "", fmt.Errorf("canonical path points to a file '%s'", realPath)
- }
- return realPath, nil
-}
-
-// CreateIfNotExists creates a file or a directory only if it does not already exist.
-func CreateIfNotExists(path string, isDir bool) error {
- if _, err := os.Stat(path); err != nil {
- if os.IsNotExist(err) {
- if isDir {
- return os.MkdirAll(path, 0755)
- }
- if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
- return err
- }
- f, err := os.OpenFile(path, os.O_CREATE, 0755)
- if err != nil {
- return err
- }
- f.Close()
- }
- }
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go
deleted file mode 100644
index 7e00802c12..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// +build linux freebsd
-
-package fileutils
-
-import (
- "fmt"
- "io/ioutil"
- "os"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
-)
-
-// GetTotalUsedFds Returns the number of used File Descriptors by
-// reading it via /proc filesystem.
-func GetTotalUsedFds() int {
- if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil {
- logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err)
- } else {
- return len(fds)
- }
- return -1
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_windows.go
deleted file mode 100644
index 5ec21cace5..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_windows.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package fileutils
-
-// GetTotalUsedFds Returns the number of used File Descriptors. Not supported
-// on Windows.
-func GetTotalUsedFds() int {
- return -1
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/homedir/homedir.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/homedir/homedir.go
deleted file mode 100644
index dcae178824..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/homedir/homedir.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package homedir
-
-import (
- "os"
- "runtime"
-
- "github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user"
-)
-
-// Key returns the env var name for the user's home dir based on
-// the platform being run on
-func Key() string {
- if runtime.GOOS == "windows" {
- return "USERPROFILE"
- }
- return "HOME"
-}
-
-// Get returns the home directory of the current user with the help of
-// environment variables depending on the target operating system.
-// Returned path should be used with "path/filepath" to form new paths.
-func Get() string {
- home := os.Getenv(Key())
- if home == "" && runtime.GOOS != "windows" {
- if u, err := user.CurrentUser(); err == nil {
- return u.Home
- }
- }
- return home
-}
-
-// GetShortcutString returns the string that is shortcut to user's home directory
-// in the native shell of the platform running on.
-func GetShortcutString() string {
- if runtime.GOOS == "windows" {
- return "%USERPROFILE%" // be careful while using in format functions
- }
- return "~"
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools.go
deleted file mode 100644
index a1301ee976..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools.go
+++ /dev/null
@@ -1,195 +0,0 @@
-package idtools
-
-import (
- "bufio"
- "fmt"
- "os"
- "sort"
- "strconv"
- "strings"
-)
-
-// IDMap contains a single entry for user namespace range remapping. An array
-// of IDMap entries represents the structure that will be provided to the Linux
-// kernel for creating a user namespace.
-type IDMap struct {
- ContainerID int `json:"container_id"`
- HostID int `json:"host_id"`
- Size int `json:"size"`
-}
-
-type subIDRange struct {
- Start int
- Length int
-}
-
-type ranges []subIDRange
-
-func (e ranges) Len() int { return len(e) }
-func (e ranges) Swap(i, j int) { e[i], e[j] = e[j], e[i] }
-func (e ranges) Less(i, j int) bool { return e[i].Start < e[j].Start }
-
-const (
- subuidFileName string = "/etc/subuid"
- subgidFileName string = "/etc/subgid"
-)
-
-// MkdirAllAs creates a directory (include any along the path) and then modifies
-// ownership to the requested uid/gid. If the directory already exists, this
-// function will still change ownership to the requested uid/gid pair.
-func MkdirAllAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {
- return mkdirAs(path, mode, ownerUID, ownerGID, true, true)
-}
-
-// MkdirAllNewAs creates a directory (include any along the path) and then modifies
-// ownership ONLY of newly created directories to the requested uid/gid. If the
-// directories along the path exist, no change of ownership will be performed
-func MkdirAllNewAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {
- return mkdirAs(path, mode, ownerUID, ownerGID, true, false)
-}
-
-// MkdirAs creates a directory and then modifies ownership to the requested uid/gid.
-// If the directory already exists, this function still changes ownership
-func MkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {
- return mkdirAs(path, mode, ownerUID, ownerGID, false, true)
-}
-
-// GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.
-// If the maps are empty, then the root uid/gid will default to "real" 0/0
-func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
- var uid, gid int
-
- if uidMap != nil {
- xUID, err := ToHost(0, uidMap)
- if err != nil {
- return -1, -1, err
- }
- uid = xUID
- }
- if gidMap != nil {
- xGID, err := ToHost(0, gidMap)
- if err != nil {
- return -1, -1, err
- }
- gid = xGID
- }
- return uid, gid, nil
-}
-
-// ToContainer takes an id mapping, and uses it to translate a
-// host ID to the remapped ID. If no map is provided, then the translation
-// assumes a 1-to-1 mapping and returns the passed in id
-func ToContainer(hostID int, idMap []IDMap) (int, error) {
- if idMap == nil {
- return hostID, nil
- }
- for _, m := range idMap {
- if (hostID >= m.HostID) && (hostID <= (m.HostID + m.Size - 1)) {
- contID := m.ContainerID + (hostID - m.HostID)
- return contID, nil
- }
- }
- return -1, fmt.Errorf("Host ID %d cannot be mapped to a container ID", hostID)
-}
-
-// ToHost takes an id mapping and a remapped ID, and translates the
-// ID to the mapped host ID. If no map is provided, then the translation
-// assumes a 1-to-1 mapping and returns the passed in id #
-func ToHost(contID int, idMap []IDMap) (int, error) {
- if idMap == nil {
- return contID, nil
- }
- for _, m := range idMap {
- if (contID >= m.ContainerID) && (contID <= (m.ContainerID + m.Size - 1)) {
- hostID := m.HostID + (contID - m.ContainerID)
- return hostID, nil
- }
- }
- return -1, fmt.Errorf("Container ID %d cannot be mapped to a host ID", contID)
-}
-
-// CreateIDMappings takes a requested user and group name and
-// using the data from /etc/sub{uid,gid} ranges, creates the
-// proper uid and gid remapping ranges for that user/group pair
-func CreateIDMappings(username, groupname string) ([]IDMap, []IDMap, error) {
- subuidRanges, err := parseSubuid(username)
- if err != nil {
- return nil, nil, err
- }
- subgidRanges, err := parseSubgid(groupname)
- if err != nil {
- return nil, nil, err
- }
- if len(subuidRanges) == 0 {
- return nil, nil, fmt.Errorf("No subuid ranges found for user %q", username)
- }
- if len(subgidRanges) == 0 {
- return nil, nil, fmt.Errorf("No subgid ranges found for group %q", groupname)
- }
-
- return createIDMap(subuidRanges), createIDMap(subgidRanges), nil
-}
-
-func createIDMap(subidRanges ranges) []IDMap {
- idMap := []IDMap{}
-
- // sort the ranges by lowest ID first
- sort.Sort(subidRanges)
- containerID := 0
- for _, idrange := range subidRanges {
- idMap = append(idMap, IDMap{
- ContainerID: containerID,
- HostID: idrange.Start,
- Size: idrange.Length,
- })
- containerID = containerID + idrange.Length
- }
- return idMap
-}
-
-func parseSubuid(username string) (ranges, error) {
- return parseSubidFile(subuidFileName, username)
-}
-
-func parseSubgid(username string) (ranges, error) {
- return parseSubidFile(subgidFileName, username)
-}
-
-func parseSubidFile(path, username string) (ranges, error) {
- var rangeList ranges
-
- subidFile, err := os.Open(path)
- if err != nil {
- return rangeList, err
- }
- defer subidFile.Close()
-
- s := bufio.NewScanner(subidFile)
- for s.Scan() {
- if err := s.Err(); err != nil {
- return rangeList, err
- }
-
- text := strings.TrimSpace(s.Text())
- if text == "" {
- continue
- }
- parts := strings.Split(text, ":")
- if len(parts) != 3 {
- return rangeList, fmt.Errorf("Cannot parse subuid/gid information: Format not correct for %s file", path)
- }
- if parts[0] == username {
- // return the first entry for a user; ignores potential for multiple ranges per user
- startid, err := strconv.Atoi(parts[1])
- if err != nil {
- return rangeList, fmt.Errorf("String to int conversion failed during subuid/gid parsing of %s: %v", path, err)
- }
- length, err := strconv.Atoi(parts[2])
- if err != nil {
- return rangeList, fmt.Errorf("String to int conversion failed during subuid/gid parsing of %s: %v", path, err)
- }
- rangeList = append(rangeList, subIDRange{startid, length})
- }
- }
- return rangeList, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools_unix.go
deleted file mode 100644
index 0444307d22..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools_unix.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// +build !windows
-
-package idtools
-
-import (
- "os"
- "path/filepath"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error {
- // make an array containing the original path asked for, plus (for mkAll == true)
- // all path components leading up to the complete path that don't exist before we MkdirAll
- // so that we can chown all of them properly at the end. If chownExisting is false, we won't
- // chown the full directory path if it exists
- var paths []string
- if _, err := os.Stat(path); err != nil && os.IsNotExist(err) {
- paths = []string{path}
- } else if err == nil && chownExisting {
- if err := os.Chown(path, ownerUID, ownerGID); err != nil {
- return err
- }
- // short-circuit--we were called with an existing directory and chown was requested
- return nil
- } else if err == nil {
- // nothing to do; directory path fully exists already and chown was NOT requested
- return nil
- }
-
- if mkAll {
- // walk back to "/" looking for directories which do not exist
- // and add them to the paths array for chown after creation
- dirPath := path
- for {
- dirPath = filepath.Dir(dirPath)
- if dirPath == "/" {
- break
- }
- if _, err := os.Stat(dirPath); err != nil && os.IsNotExist(err) {
- paths = append(paths, dirPath)
- }
- }
- if err := system.MkdirAll(path, mode); err != nil && !os.IsExist(err) {
- return err
- }
- } else {
- if err := os.Mkdir(path, mode); err != nil && !os.IsExist(err) {
- return err
- }
- }
- // even if it existed, we will chown the requested path + any subpaths that
- // didn't exist when we called MkdirAll
- for _, pathComponent := range paths {
- if err := os.Chown(pathComponent, ownerUID, ownerGID); err != nil {
- return err
- }
- }
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools_windows.go
deleted file mode 100644
index d5ec992db7..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/idtools_windows.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build windows
-
-package idtools
-
-import (
- "os"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
-)
-
-// Platforms such as Windows do not support the UID/GID concept. So make this
-// just a wrapper around system.MkdirAll.
-func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error {
- if err := system.MkdirAll(path, mode); err != nil && !os.IsExist(err) {
- return err
- }
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/usergroupadd_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/usergroupadd_linux.go
deleted file mode 100644
index c1eedff104..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/usergroupadd_linux.go
+++ /dev/null
@@ -1,155 +0,0 @@
-package idtools
-
-import (
- "fmt"
- "os/exec"
- "path/filepath"
- "strings"
- "syscall"
-)
-
-// add a user and/or group to Linux /etc/passwd, /etc/group using standard
-// Linux distribution commands:
-// adduser --uid --shell /bin/login --no-create-home --disabled-login --ingroup
-// useradd -M -u -s /bin/nologin -N -g
-// addgroup --gid
-// groupadd -g
-
-const baseUID int = 10000
-const baseGID int = 10000
-const idMAX int = 65534
-
-var (
- userCommand string
- groupCommand string
-
- cmdTemplates = map[string]string{
- "adduser": "--uid %d --shell /bin/false --no-create-home --disabled-login --ingroup %s %s",
- "useradd": "-M -u %d -s /bin/false -N -g %s %s",
- "addgroup": "--gid %d %s",
- "groupadd": "-g %d %s",
- }
-)
-
-func init() {
- // set up which commands are used for adding users/groups dependent on distro
- if _, err := resolveBinary("adduser"); err == nil {
- userCommand = "adduser"
- } else if _, err := resolveBinary("useradd"); err == nil {
- userCommand = "useradd"
- }
- if _, err := resolveBinary("addgroup"); err == nil {
- groupCommand = "addgroup"
- } else if _, err := resolveBinary("groupadd"); err == nil {
- groupCommand = "groupadd"
- }
-}
-
-func resolveBinary(binname string) (string, error) {
- binaryPath, err := exec.LookPath(binname)
- if err != nil {
- return "", err
- }
- resolvedPath, err := filepath.EvalSymlinks(binaryPath)
- if err != nil {
- return "", err
- }
- //only return no error if the final resolved binary basename
- //matches what was searched for
- if filepath.Base(resolvedPath) == binname {
- return resolvedPath, nil
- }
- return "", fmt.Errorf("Binary %q does not resolve to a binary of that name in $PATH (%q)", binname, resolvedPath)
-}
-
-// AddNamespaceRangesUser takes a name and finds an unused uid, gid pair
-// and calls the appropriate helper function to add the group and then
-// the user to the group in /etc/group and /etc/passwd respectively.
-// This new user's /etc/sub{uid,gid} ranges will be used for user namespace
-// mapping ranges in containers.
-func AddNamespaceRangesUser(name string) (int, int, error) {
- // Find unused uid, gid pair
- uid, err := findUnusedUID(baseUID)
- if err != nil {
- return -1, -1, fmt.Errorf("Unable to find unused UID: %v", err)
- }
- gid, err := findUnusedGID(baseGID)
- if err != nil {
- return -1, -1, fmt.Errorf("Unable to find unused GID: %v", err)
- }
-
- // First add the group that we will use
- if err := addGroup(name, gid); err != nil {
- return -1, -1, fmt.Errorf("Error adding group %q: %v", name, err)
- }
- // Add the user as a member of the group
- if err := addUser(name, uid, name); err != nil {
- return -1, -1, fmt.Errorf("Error adding user %q: %v", name, err)
- }
- return uid, gid, nil
-}
-
-func addUser(userName string, uid int, groupName string) error {
-
- if userCommand == "" {
- return fmt.Errorf("Cannot add user; no useradd/adduser binary found")
- }
- args := fmt.Sprintf(cmdTemplates[userCommand], uid, groupName, userName)
- return execAddCmd(userCommand, args)
-}
-
-func addGroup(groupName string, gid int) error {
-
- if groupCommand == "" {
- return fmt.Errorf("Cannot add group; no groupadd/addgroup binary found")
- }
- args := fmt.Sprintf(cmdTemplates[groupCommand], gid, groupName)
- // only error out if the error isn't that the group already exists
- // if the group exists then our needs are already met
- if err := execAddCmd(groupCommand, args); err != nil && !strings.Contains(err.Error(), "already exists") {
- return err
- }
- return nil
-}
-
-func execAddCmd(cmd, args string) error {
- execCmd := exec.Command(cmd, strings.Split(args, " ")...)
- out, err := execCmd.CombinedOutput()
- if err != nil {
- return fmt.Errorf("Failed to add user/group with error: %v; output: %q", err, string(out))
- }
- return nil
-}
-
-func findUnusedUID(startUID int) (int, error) {
- return findUnused("passwd", startUID)
-}
-
-func findUnusedGID(startGID int) (int, error) {
- return findUnused("group", startGID)
-}
-
-func findUnused(file string, id int) (int, error) {
- for {
- cmdStr := fmt.Sprintf("cat /etc/%s | cut -d: -f3 | grep '^%d$'", file, id)
- cmd := exec.Command("sh", "-c", cmdStr)
- if err := cmd.Run(); err != nil {
- // if a non-zero return code occurs, then we know the ID was not found
- // and is usable
- if exiterr, ok := err.(*exec.ExitError); ok {
- // The program has exited with an exit code != 0
- if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
- if status.ExitStatus() == 1 {
- //no match, we can use this ID
- return id, nil
- }
- }
- }
- return -1, fmt.Errorf("Error looking in /etc/%s for unused ID: %v", file, err)
- }
- id++
- if id > idMAX {
- return -1, fmt.Errorf("Maximum id in %q reached with finding unused numeric ID", file)
- }
- }
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go
deleted file mode 100644
index d98b354cbd..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build !linux
-
-package idtools
-
-import "fmt"
-
-// AddNamespaceRangesUser takes a name and finds an unused uid, gid pair
-// and calls the appropriate helper function to add the group and then
-// the user to the group in /etc/group and /etc/passwd respectively.
-func AddNamespaceRangesUser(name string) (int, int, error) {
- return -1, -1, fmt.Errorf("No support for adding users or groups on this OS")
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/bytespipe.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/bytespipe.go
deleted file mode 100644
index e263c284f0..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/bytespipe.go
+++ /dev/null
@@ -1,152 +0,0 @@
-package ioutils
-
-import (
- "errors"
- "io"
- "sync"
-)
-
-// maxCap is the highest capacity to use in byte slices that buffer data.
-const maxCap = 1e6
-
-// blockThreshold is the minimum number of bytes in the buffer which will cause
-// a write to BytesPipe to block when allocating a new slice.
-const blockThreshold = 1e6
-
-// ErrClosed is returned when Write is called on a closed BytesPipe.
-var ErrClosed = errors.New("write to closed BytesPipe")
-
-// BytesPipe is io.ReadWriteCloser which works similarly to pipe(queue).
-// All written data may be read at most once. Also, BytesPipe allocates
-// and releases new byte slices to adjust to current needs, so the buffer
-// won't be overgrown after peak loads.
-type BytesPipe struct {
- mu sync.Mutex
- wait *sync.Cond
- buf [][]byte // slice of byte-slices of buffered data
- lastRead int // index in the first slice to a read point
- bufLen int // length of data buffered over the slices
- closeErr error // error to return from next Read. set to nil if not closed.
-}
-
-// NewBytesPipe creates new BytesPipe, initialized by specified slice.
-// If buf is nil, then it will be initialized with slice which cap is 64.
-// buf will be adjusted in a way that len(buf) == 0, cap(buf) == cap(buf).
-func NewBytesPipe(buf []byte) *BytesPipe {
- if cap(buf) == 0 {
- buf = make([]byte, 0, 64)
- }
- bp := &BytesPipe{
- buf: [][]byte{buf[:0]},
- }
- bp.wait = sync.NewCond(&bp.mu)
- return bp
-}
-
-// Write writes p to BytesPipe.
-// It can allocate new []byte slices in a process of writing.
-func (bp *BytesPipe) Write(p []byte) (int, error) {
- bp.mu.Lock()
- defer bp.mu.Unlock()
- written := 0
- for {
- if bp.closeErr != nil {
- return written, ErrClosed
- }
- // write data to the last buffer
- b := bp.buf[len(bp.buf)-1]
- // copy data to the current empty allocated area
- n := copy(b[len(b):cap(b)], p)
- // increment buffered data length
- bp.bufLen += n
- // include written data in last buffer
- bp.buf[len(bp.buf)-1] = b[:len(b)+n]
-
- written += n
-
- // if there was enough room to write all then break
- if len(p) == n {
- break
- }
-
- // more data: write to the next slice
- p = p[n:]
-
- // block if too much data is still in the buffer
- for bp.bufLen >= blockThreshold {
- bp.wait.Wait()
- }
-
- // allocate slice that has twice the size of the last unless maximum reached
- nextCap := 2 * cap(bp.buf[len(bp.buf)-1])
- if nextCap > maxCap {
- nextCap = maxCap
- }
- // add new byte slice to the buffers slice and continue writing
- bp.buf = append(bp.buf, make([]byte, 0, nextCap))
- }
- bp.wait.Broadcast()
- return written, nil
-}
-
-// CloseWithError causes further reads from a BytesPipe to return immediately.
-func (bp *BytesPipe) CloseWithError(err error) error {
- bp.mu.Lock()
- if err != nil {
- bp.closeErr = err
- } else {
- bp.closeErr = io.EOF
- }
- bp.wait.Broadcast()
- bp.mu.Unlock()
- return nil
-}
-
-// Close causes further reads from a BytesPipe to return immediately.
-func (bp *BytesPipe) Close() error {
- return bp.CloseWithError(nil)
-}
-
-func (bp *BytesPipe) len() int {
- return bp.bufLen - bp.lastRead
-}
-
-// Read reads bytes from BytesPipe.
-// Data could be read only once.
-func (bp *BytesPipe) Read(p []byte) (n int, err error) {
- bp.mu.Lock()
- defer bp.mu.Unlock()
- if bp.len() == 0 {
- if bp.closeErr != nil {
- return 0, bp.closeErr
- }
- bp.wait.Wait()
- if bp.len() == 0 && bp.closeErr != nil {
- return 0, bp.closeErr
- }
- }
- for {
- read := copy(p, bp.buf[0][bp.lastRead:])
- n += read
- bp.lastRead += read
- if bp.len() == 0 {
- // we have read everything. reset to the beginning.
- bp.lastRead = 0
- bp.bufLen -= len(bp.buf[0])
- bp.buf[0] = bp.buf[0][:0]
- break
- }
- // break if everything was read
- if len(p) == read {
- break
- }
- // more buffered data and more asked. read from next slice.
- p = p[read:]
- bp.lastRead = 0
- bp.bufLen -= len(bp.buf[0])
- bp.buf[0] = nil // throw away old slice
- bp.buf = bp.buf[1:] // switch to next
- }
- bp.wait.Broadcast()
- return
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/fmt.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/fmt.go
deleted file mode 100644
index 0b04b0ba3e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/fmt.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package ioutils
-
-import (
- "fmt"
- "io"
-)
-
-// FprintfIfNotEmpty prints the string value if it's not empty
-func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error) {
- if value != "" {
- return fmt.Fprintf(w, format, value)
- }
- return 0, nil
-}
-
-// FprintfIfTrue prints the boolean value if it's true
-func FprintfIfTrue(w io.Writer, format string, ok bool) (int, error) {
- if ok {
- return fmt.Fprintf(w, format, ok)
- }
- return 0, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/multireader.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/multireader.go
deleted file mode 100644
index 0d2d76b479..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/multireader.go
+++ /dev/null
@@ -1,226 +0,0 @@
-package ioutils
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
-)
-
-type pos struct {
- idx int
- offset int64
-}
-
-type multiReadSeeker struct {
- readers []io.ReadSeeker
- pos *pos
- posIdx map[io.ReadSeeker]int
-}
-
-func (r *multiReadSeeker) Seek(offset int64, whence int) (int64, error) {
- var tmpOffset int64
- switch whence {
- case os.SEEK_SET:
- for i, rdr := range r.readers {
- // get size of the current reader
- s, err := rdr.Seek(0, os.SEEK_END)
- if err != nil {
- return -1, err
- }
-
- if offset > tmpOffset+s {
- if i == len(r.readers)-1 {
- rdrOffset := s + (offset - tmpOffset)
- if _, err := rdr.Seek(rdrOffset, os.SEEK_SET); err != nil {
- return -1, err
- }
- r.pos = &pos{i, rdrOffset}
- return offset, nil
- }
-
- tmpOffset += s
- continue
- }
-
- rdrOffset := offset - tmpOffset
- idx := i
-
- rdr.Seek(rdrOffset, os.SEEK_SET)
- // make sure all following readers are at 0
- for _, rdr := range r.readers[i+1:] {
- rdr.Seek(0, os.SEEK_SET)
- }
-
- if rdrOffset == s && i != len(r.readers)-1 {
- idx++
- rdrOffset = 0
- }
- r.pos = &pos{idx, rdrOffset}
- return offset, nil
- }
- case os.SEEK_END:
- for _, rdr := range r.readers {
- s, err := rdr.Seek(0, os.SEEK_END)
- if err != nil {
- return -1, err
- }
- tmpOffset += s
- }
- r.Seek(tmpOffset+offset, os.SEEK_SET)
- return tmpOffset + offset, nil
- case os.SEEK_CUR:
- if r.pos == nil {
- return r.Seek(offset, os.SEEK_SET)
- }
- // Just return the current offset
- if offset == 0 {
- return r.getCurOffset()
- }
-
- curOffset, err := r.getCurOffset()
- if err != nil {
- return -1, err
- }
- rdr, rdrOffset, err := r.getReaderForOffset(curOffset + offset)
- if err != nil {
- return -1, err
- }
-
- r.pos = &pos{r.posIdx[rdr], rdrOffset}
- return curOffset + offset, nil
- default:
- return -1, fmt.Errorf("Invalid whence: %d", whence)
- }
-
- return -1, fmt.Errorf("Error seeking for whence: %d, offset: %d", whence, offset)
-}
-
-func (r *multiReadSeeker) getReaderForOffset(offset int64) (io.ReadSeeker, int64, error) {
- var rdr io.ReadSeeker
- var rdrOffset int64
-
- for i, rdr := range r.readers {
- offsetTo, err := r.getOffsetToReader(rdr)
- if err != nil {
- return nil, -1, err
- }
- if offsetTo > offset {
- rdr = r.readers[i-1]
- rdrOffset = offsetTo - offset
- break
- }
-
- if rdr == r.readers[len(r.readers)-1] {
- rdrOffset = offsetTo + offset
- break
- }
- }
-
- return rdr, rdrOffset, nil
-}
-
-func (r *multiReadSeeker) getCurOffset() (int64, error) {
- var totalSize int64
- for _, rdr := range r.readers[:r.pos.idx+1] {
- if r.posIdx[rdr] == r.pos.idx {
- totalSize += r.pos.offset
- break
- }
-
- size, err := getReadSeekerSize(rdr)
- if err != nil {
- return -1, fmt.Errorf("error getting seeker size: %v", err)
- }
- totalSize += size
- }
- return totalSize, nil
-}
-
-func (r *multiReadSeeker) getOffsetToReader(rdr io.ReadSeeker) (int64, error) {
- var offset int64
- for _, r := range r.readers {
- if r == rdr {
- break
- }
-
- size, err := getReadSeekerSize(rdr)
- if err != nil {
- return -1, err
- }
- offset += size
- }
- return offset, nil
-}
-
-func (r *multiReadSeeker) Read(b []byte) (int, error) {
- if r.pos == nil {
- r.pos = &pos{0, 0}
- }
-
- bCap := int64(cap(b))
- buf := bytes.NewBuffer(nil)
- var rdr io.ReadSeeker
-
- for _, rdr = range r.readers[r.pos.idx:] {
- readBytes, err := io.CopyN(buf, rdr, bCap)
- if err != nil && err != io.EOF {
- return -1, err
- }
- bCap -= readBytes
-
- if bCap == 0 {
- break
- }
- }
-
- rdrPos, err := rdr.Seek(0, os.SEEK_CUR)
- if err != nil {
- return -1, err
- }
- r.pos = &pos{r.posIdx[rdr], rdrPos}
- return buf.Read(b)
-}
-
-func getReadSeekerSize(rdr io.ReadSeeker) (int64, error) {
- // save the current position
- pos, err := rdr.Seek(0, os.SEEK_CUR)
- if err != nil {
- return -1, err
- }
-
- // get the size
- size, err := rdr.Seek(0, os.SEEK_END)
- if err != nil {
- return -1, err
- }
-
- // reset the position
- if _, err := rdr.Seek(pos, os.SEEK_SET); err != nil {
- return -1, err
- }
- return size, nil
-}
-
-// MultiReadSeeker returns a ReadSeeker that's the logical concatenation of the provided
-// input readseekers. After calling this method the initial position is set to the
-// beginning of the first ReadSeeker. At the end of a ReadSeeker, Read always advances
-// to the beginning of the next ReadSeeker and returns EOF at the end of the last ReadSeeker.
-// Seek can be used over the sum of lengths of all readseekers.
-//
-// When a MultiReadSeeker is used, no Read and Seek operations should be made on
-// its ReadSeeker components. Also, users should make no assumption on the state
-// of individual readseekers while the MultiReadSeeker is used.
-func MultiReadSeeker(readers ...io.ReadSeeker) io.ReadSeeker {
- if len(readers) == 1 {
- return readers[0]
- }
- idx := make(map[io.ReadSeeker]int)
- for i, rdr := range readers {
- idx[rdr] = i
- }
- return &multiReadSeeker{
- readers: readers,
- posIdx: idx,
- }
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/readers.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/readers.go
deleted file mode 100644
index a891955ace..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/readers.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package ioutils
-
-import (
- "crypto/sha256"
- "encoding/hex"
- "io"
-
- "github.com/fsouza/go-dockerclient/external/golang.org/x/net/context"
-)
-
-type readCloserWrapper struct {
- io.Reader
- closer func() error
-}
-
-func (r *readCloserWrapper) Close() error {
- return r.closer()
-}
-
-// NewReadCloserWrapper returns a new io.ReadCloser.
-func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser {
- return &readCloserWrapper{
- Reader: r,
- closer: closer,
- }
-}
-
-type readerErrWrapper struct {
- reader io.Reader
- closer func()
-}
-
-func (r *readerErrWrapper) Read(p []byte) (int, error) {
- n, err := r.reader.Read(p)
- if err != nil {
- r.closer()
- }
- return n, err
-}
-
-// NewReaderErrWrapper returns a new io.Reader.
-func NewReaderErrWrapper(r io.Reader, closer func()) io.Reader {
- return &readerErrWrapper{
- reader: r,
- closer: closer,
- }
-}
-
-// HashData returns the sha256 sum of src.
-func HashData(src io.Reader) (string, error) {
- h := sha256.New()
- if _, err := io.Copy(h, src); err != nil {
- return "", err
- }
- return "sha256:" + hex.EncodeToString(h.Sum(nil)), nil
-}
-
-// OnEOFReader wraps a io.ReadCloser and a function
-// the function will run at the end of file or close the file.
-type OnEOFReader struct {
- Rc io.ReadCloser
- Fn func()
-}
-
-func (r *OnEOFReader) Read(p []byte) (n int, err error) {
- n, err = r.Rc.Read(p)
- if err == io.EOF {
- r.runFunc()
- }
- return
-}
-
-// Close closes the file and run the function.
-func (r *OnEOFReader) Close() error {
- err := r.Rc.Close()
- r.runFunc()
- return err
-}
-
-func (r *OnEOFReader) runFunc() {
- if fn := r.Fn; fn != nil {
- fn()
- r.Fn = nil
- }
-}
-
-// cancelReadCloser wraps an io.ReadCloser with a context for cancelling read
-// operations.
-type cancelReadCloser struct {
- cancel func()
- pR *io.PipeReader // Stream to read from
- pW *io.PipeWriter
-}
-
-// NewCancelReadCloser creates a wrapper that closes the ReadCloser when the
-// context is cancelled. The returned io.ReadCloser must be closed when it is
-// no longer needed.
-func NewCancelReadCloser(ctx context.Context, in io.ReadCloser) io.ReadCloser {
- pR, pW := io.Pipe()
-
- // Create a context used to signal when the pipe is closed
- doneCtx, cancel := context.WithCancel(context.Background())
-
- p := &cancelReadCloser{
- cancel: cancel,
- pR: pR,
- pW: pW,
- }
-
- go func() {
- _, err := io.Copy(pW, in)
- select {
- case <-ctx.Done():
- // If the context was closed, p.closeWithError
- // was already called. Calling it again would
- // change the error that Read returns.
- default:
- p.closeWithError(err)
- }
- in.Close()
- }()
- go func() {
- for {
- select {
- case <-ctx.Done():
- p.closeWithError(ctx.Err())
- case <-doneCtx.Done():
- return
- }
- }
- }()
-
- return p
-}
-
-// Read wraps the Read method of the pipe that provides data from the wrapped
-// ReadCloser.
-func (p *cancelReadCloser) Read(buf []byte) (n int, err error) {
- return p.pR.Read(buf)
-}
-
-// closeWithError closes the wrapper and its underlying reader. It will
-// cause future calls to Read to return err.
-func (p *cancelReadCloser) closeWithError(err error) {
- p.pW.CloseWithError(err)
- p.cancel()
-}
-
-// Close closes the wrapper its underlying reader. It will cause
-// future calls to Read to return io.EOF.
-func (p *cancelReadCloser) Close() error {
- p.closeWithError(io.EOF)
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler.go
deleted file mode 100644
index 3c88f29e35..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// +build !gccgo
-
-package ioutils
-
-func callSchedulerIfNecessary() {
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler_gccgo.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler_gccgo.go
deleted file mode 100644
index c11d02b947..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler_gccgo.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build gccgo
-
-package ioutils
-
-import (
- "runtime"
-)
-
-func callSchedulerIfNecessary() {
- //allow or force Go scheduler to switch context, without explicitly
- //forcing this will make it hang when using gccgo implementation
- runtime.Gosched()
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/temp_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/temp_unix.go
deleted file mode 100644
index 1539ad21b5..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/temp_unix.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// +build !windows
-
-package ioutils
-
-import "io/ioutil"
-
-// TempDir on Unix systems is equivalent to ioutil.TempDir.
-func TempDir(dir, prefix string) (string, error) {
- return ioutil.TempDir(dir, prefix)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/temp_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/temp_windows.go
deleted file mode 100644
index 72c0bc5974..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/temp_windows.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build windows
-
-package ioutils
-
-import (
- "io/ioutil"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath"
-)
-
-// TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format.
-func TempDir(dir, prefix string) (string, error) {
- tempDir, err := ioutil.TempDir(dir, prefix)
- if err != nil {
- return "", err
- }
- return longpath.AddPrefix(tempDir), nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/writeflusher.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/writeflusher.go
deleted file mode 100644
index 2b35a26662..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/writeflusher.go
+++ /dev/null
@@ -1,92 +0,0 @@
-package ioutils
-
-import (
- "errors"
- "io"
- "net/http"
- "sync"
-)
-
-// WriteFlusher wraps the Write and Flush operation ensuring that every write
-// is a flush. In addition, the Close method can be called to intercept
-// Read/Write calls if the targets lifecycle has already ended.
-type WriteFlusher struct {
- mu sync.Mutex
- w io.Writer
- flusher http.Flusher
- flushed bool
- closed error
-
- // TODO(stevvooe): Use channel for closed instead, remove mutex. Using a
- // channel will allow one to properly order the operations.
-}
-
-var errWriteFlusherClosed = errors.New("writeflusher: closed")
-
-func (wf *WriteFlusher) Write(b []byte) (n int, err error) {
- wf.mu.Lock()
- defer wf.mu.Unlock()
- if wf.closed != nil {
- return 0, wf.closed
- }
-
- n, err = wf.w.Write(b)
- wf.flush() // every write is a flush.
- return n, err
-}
-
-// Flush the stream immediately.
-func (wf *WriteFlusher) Flush() {
- wf.mu.Lock()
- defer wf.mu.Unlock()
-
- wf.flush()
-}
-
-// flush the stream immediately without taking a lock. Used internally.
-func (wf *WriteFlusher) flush() {
- if wf.closed != nil {
- return
- }
-
- wf.flushed = true
- wf.flusher.Flush()
-}
-
-// Flushed returns the state of flushed.
-// If it's flushed, return true, or else it return false.
-func (wf *WriteFlusher) Flushed() bool {
- // BUG(stevvooe): Remove this method. Its use is inherently racy. Seems to
- // be used to detect whether or a response code has been issued or not.
- // Another hook should be used instead.
- wf.mu.Lock()
- defer wf.mu.Unlock()
-
- return wf.flushed
-}
-
-// Close closes the write flusher, disallowing any further writes to the
-// target. After the flusher is closed, all calls to write or flush will
-// result in an error.
-func (wf *WriteFlusher) Close() error {
- wf.mu.Lock()
- defer wf.mu.Unlock()
-
- if wf.closed != nil {
- return wf.closed
- }
-
- wf.closed = errWriteFlusherClosed
- return nil
-}
-
-// NewWriteFlusher returns a new WriteFlusher.
-func NewWriteFlusher(w io.Writer) *WriteFlusher {
- var flusher http.Flusher
- if f, ok := w.(http.Flusher); ok {
- flusher = f
- } else {
- flusher = &NopFlusher{}
- }
- return &WriteFlusher{w: w, flusher: flusher}
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/writers.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/writers.go
deleted file mode 100644
index ccc7f9c23e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/writers.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package ioutils
-
-import "io"
-
-// NopWriter represents a type which write operation is nop.
-type NopWriter struct{}
-
-func (*NopWriter) Write(buf []byte) (int, error) {
- return len(buf), nil
-}
-
-type nopWriteCloser struct {
- io.Writer
-}
-
-func (w *nopWriteCloser) Close() error { return nil }
-
-// NopWriteCloser returns a nopWriteCloser.
-func NopWriteCloser(w io.Writer) io.WriteCloser {
- return &nopWriteCloser{w}
-}
-
-// NopFlusher represents a type which flush operation is nop.
-type NopFlusher struct{}
-
-// Flush is a nop operation.
-func (f *NopFlusher) Flush() {}
-
-type writeCloserWrapper struct {
- io.Writer
- closer func() error
-}
-
-func (r *writeCloserWrapper) Close() error {
- return r.closer()
-}
-
-// NewWriteCloserWrapper returns a new io.WriteCloser.
-func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser {
- return &writeCloserWrapper{
- Writer: r,
- closer: closer,
- }
-}
-
-// WriteCounter wraps a concrete io.Writer and hold a count of the number
-// of bytes written to the writer during a "session".
-// This can be convenient when write return is masked
-// (e.g., json.Encoder.Encode())
-type WriteCounter struct {
- Count int64
- Writer io.Writer
-}
-
-// NewWriteCounter returns a new WriteCounter.
-func NewWriteCounter(w io.Writer) *WriteCounter {
- return &WriteCounter{
- Writer: w,
- }
-}
-
-func (wc *WriteCounter) Write(p []byte) (count int, err error) {
- count, err = wc.Writer.Write(p)
- wc.Count += int64(count)
- return
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go
deleted file mode 100644
index 9b15bfff4c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// longpath introduces some constants and helper functions for handling long paths
-// in Windows, which are expected to be prepended with `\\?\` and followed by either
-// a drive letter, a UNC server\share, or a volume identifier.
-
-package longpath
-
-import (
- "strings"
-)
-
-// Prefix is the longpath prefix for Windows file paths.
-const Prefix = `\\?\`
-
-// AddPrefix will add the Windows long path prefix to the path provided if
-// it does not already have it.
-func AddPrefix(path string) string {
- if !strings.HasPrefix(path, Prefix) {
- if strings.HasPrefix(path, `\\`) {
- // This is a UNC path, so we need to add 'UNC' to the path as well.
- path = Prefix + `UNC` + path[1:]
- } else {
- path = Prefix + path
- }
- }
- return path
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools/pools.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools/pools.go
deleted file mode 100644
index 515fb4d050..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools/pools.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Package pools provides a collection of pools which provide various
-// data types with buffers. These can be used to lower the number of
-// memory allocations and reuse buffers.
-//
-// New pools should be added to this package to allow them to be
-// shared across packages.
-//
-// Utility functions which operate on pools should be added to this
-// package to allow them to be reused.
-package pools
-
-import (
- "bufio"
- "io"
- "sync"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils"
-)
-
-var (
- // BufioReader32KPool is a pool which returns bufio.Reader with a 32K buffer.
- BufioReader32KPool *BufioReaderPool
- // BufioWriter32KPool is a pool which returns bufio.Writer with a 32K buffer.
- BufioWriter32KPool *BufioWriterPool
-)
-
-const buffer32K = 32 * 1024
-
-// BufioReaderPool is a bufio reader that uses sync.Pool.
-type BufioReaderPool struct {
- pool sync.Pool
-}
-
-func init() {
- BufioReader32KPool = newBufioReaderPoolWithSize(buffer32K)
- BufioWriter32KPool = newBufioWriterPoolWithSize(buffer32K)
-}
-
-// newBufioReaderPoolWithSize is unexported because new pools should be
-// added here to be shared where required.
-func newBufioReaderPoolWithSize(size int) *BufioReaderPool {
- pool := sync.Pool{
- New: func() interface{} { return bufio.NewReaderSize(nil, size) },
- }
- return &BufioReaderPool{pool: pool}
-}
-
-// Get returns a bufio.Reader which reads from r. The buffer size is that of the pool.
-func (bufPool *BufioReaderPool) Get(r io.Reader) *bufio.Reader {
- buf := bufPool.pool.Get().(*bufio.Reader)
- buf.Reset(r)
- return buf
-}
-
-// Put puts the bufio.Reader back into the pool.
-func (bufPool *BufioReaderPool) Put(b *bufio.Reader) {
- b.Reset(nil)
- bufPool.pool.Put(b)
-}
-
-// Copy is a convenience wrapper which uses a buffer to avoid allocation in io.Copy.
-func Copy(dst io.Writer, src io.Reader) (written int64, err error) {
- buf := BufioReader32KPool.Get(src)
- written, err = io.Copy(dst, buf)
- BufioReader32KPool.Put(buf)
- return
-}
-
-// NewReadCloserWrapper returns a wrapper which puts the bufio.Reader back
-// into the pool and closes the reader if it's an io.ReadCloser.
-func (bufPool *BufioReaderPool) NewReadCloserWrapper(buf *bufio.Reader, r io.Reader) io.ReadCloser {
- return ioutils.NewReadCloserWrapper(r, func() error {
- if readCloser, ok := r.(io.ReadCloser); ok {
- readCloser.Close()
- }
- bufPool.Put(buf)
- return nil
- })
-}
-
-// BufioWriterPool is a bufio writer that uses sync.Pool.
-type BufioWriterPool struct {
- pool sync.Pool
-}
-
-// newBufioWriterPoolWithSize is unexported because new pools should be
-// added here to be shared where required.
-func newBufioWriterPoolWithSize(size int) *BufioWriterPool {
- pool := sync.Pool{
- New: func() interface{} { return bufio.NewWriterSize(nil, size) },
- }
- return &BufioWriterPool{pool: pool}
-}
-
-// Get returns a bufio.Writer which writes to w. The buffer size is that of the pool.
-func (bufPool *BufioWriterPool) Get(w io.Writer) *bufio.Writer {
- buf := bufPool.pool.Get().(*bufio.Writer)
- buf.Reset(w)
- return buf
-}
-
-// Put puts the bufio.Writer back into the pool.
-func (bufPool *BufioWriterPool) Put(b *bufio.Writer) {
- b.Reset(nil)
- bufPool.pool.Put(b)
-}
-
-// NewWriteCloserWrapper returns a wrapper which puts the bufio.Writer back
-// into the pool and closes the writer if it's an io.Writecloser.
-func (bufPool *BufioWriterPool) NewWriteCloserWrapper(buf *bufio.Writer, w io.Writer) io.WriteCloser {
- return ioutils.NewWriteCloserWrapper(w, func() error {
- buf.Flush()
- if writeCloser, ok := w.(io.WriteCloser); ok {
- writeCloser.Close()
- }
- bufPool.Put(buf)
- return nil
- })
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/promise/promise.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/promise/promise.go
deleted file mode 100644
index dd52b9082f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/promise/promise.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package promise
-
-// Go is a basic promise implementation: it wraps calls a function in a goroutine,
-// and returns a channel which will later return the function's return value.
-func Go(f func() error) chan error {
- ch := make(chan error, 1)
- go func() {
- ch <- f()
- }()
- return ch
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/stdcopy/stdcopy.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/stdcopy/stdcopy.go
deleted file mode 100644
index b2c60046ad..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/stdcopy/stdcopy.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package stdcopy
-
-import (
- "encoding/binary"
- "errors"
- "io"
-
- "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
-)
-
-const (
- stdWriterPrefixLen = 8
- stdWriterFdIndex = 0
- stdWriterSizeIndex = 4
-
- startingBufLen = 32*1024 + stdWriterPrefixLen + 1
-)
-
-// StdType prefixes type and length to standard stream.
-type StdType [stdWriterPrefixLen]byte
-
-var (
- // Stdin represents standard input stream type.
- Stdin = StdType{0: 0}
- // Stdout represents standard output stream type.
- Stdout = StdType{0: 1}
- // Stderr represents standard error steam type.
- Stderr = StdType{0: 2}
-)
-
-// StdWriter is wrapper of io.Writer with extra customized info.
-type StdWriter struct {
- io.Writer
- prefix StdType
- sizeBuf []byte
-}
-
-func (w *StdWriter) Write(buf []byte) (n int, err error) {
- var n1, n2 int
- if w == nil || w.Writer == nil {
- return 0, errors.New("Writer not instantiated")
- }
- binary.BigEndian.PutUint32(w.prefix[4:], uint32(len(buf)))
- n1, err = w.Writer.Write(w.prefix[:])
- if err != nil {
- n = n1 - stdWriterPrefixLen
- } else {
- n2, err = w.Writer.Write(buf)
- n = n1 + n2 - stdWriterPrefixLen
- }
- if n < 0 {
- n = 0
- }
- return
-}
-
-// NewStdWriter instantiates a new Writer.
-// Everything written to it will be encapsulated using a custom format,
-// and written to the underlying `w` stream.
-// This allows multiple write streams (e.g. stdout and stderr) to be muxed into a single connection.
-// `t` indicates the id of the stream to encapsulate.
-// It can be stdcopy.Stdin, stdcopy.Stdout, stdcopy.Stderr.
-func NewStdWriter(w io.Writer, t StdType) *StdWriter {
- return &StdWriter{
- Writer: w,
- prefix: t,
- sizeBuf: make([]byte, 4),
- }
-}
-
-var errInvalidStdHeader = errors.New("Unrecognized input header")
-
-// StdCopy is a modified version of io.Copy.
-//
-// StdCopy will demultiplex `src`, assuming that it contains two streams,
-// previously multiplexed together using a StdWriter instance.
-// As it reads from `src`, StdCopy will write to `dstout` and `dsterr`.
-//
-// StdCopy will read until it hits EOF on `src`. It will then return a nil error.
-// In other words: if `err` is non nil, it indicates a real underlying error.
-//
-// `written` will hold the total number of bytes written to `dstout` and `dsterr`.
-func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error) {
- var (
- buf = make([]byte, startingBufLen)
- bufLen = len(buf)
- nr, nw int
- er, ew error
- out io.Writer
- frameSize int
- )
-
- for {
- // Make sure we have at least a full header
- for nr < stdWriterPrefixLen {
- var nr2 int
- nr2, er = src.Read(buf[nr:])
- nr += nr2
- if er == io.EOF {
- if nr < stdWriterPrefixLen {
- logrus.Debugf("Corrupted prefix: %v", buf[:nr])
- return written, nil
- }
- break
- }
- if er != nil {
- logrus.Debugf("Error reading header: %s", er)
- return 0, er
- }
- }
-
- // Check the first byte to know where to write
- switch buf[stdWriterFdIndex] {
- case 0:
- fallthrough
- case 1:
- // Write on stdout
- out = dstout
- case 2:
- // Write on stderr
- out = dsterr
- default:
- logrus.Debugf("Error selecting output fd: (%d)", buf[stdWriterFdIndex])
- return 0, errInvalidStdHeader
- }
-
- // Retrieve the size of the frame
- frameSize = int(binary.BigEndian.Uint32(buf[stdWriterSizeIndex : stdWriterSizeIndex+4]))
- logrus.Debugf("framesize: %d", frameSize)
-
- // Check if the buffer is big enough to read the frame.
- // Extend it if necessary.
- if frameSize+stdWriterPrefixLen > bufLen {
- logrus.Debugf("Extending buffer cap by %d (was %d)", frameSize+stdWriterPrefixLen-bufLen+1, len(buf))
- buf = append(buf, make([]byte, frameSize+stdWriterPrefixLen-bufLen+1)...)
- bufLen = len(buf)
- }
-
- // While the amount of bytes read is less than the size of the frame + header, we keep reading
- for nr < frameSize+stdWriterPrefixLen {
- var nr2 int
- nr2, er = src.Read(buf[nr:])
- nr += nr2
- if er == io.EOF {
- if nr < frameSize+stdWriterPrefixLen {
- logrus.Debugf("Corrupted frame: %v", buf[stdWriterPrefixLen:nr])
- return written, nil
- }
- break
- }
- if er != nil {
- logrus.Debugf("Error reading frame: %s", er)
- return 0, er
- }
- }
-
- // Write the retrieved frame (without header)
- nw, ew = out.Write(buf[stdWriterPrefixLen : frameSize+stdWriterPrefixLen])
- if ew != nil {
- logrus.Debugf("Error writing frame: %s", ew)
- return 0, ew
- }
- // If the frame has not been fully written: error
- if nw != frameSize {
- logrus.Debugf("Error Short Write: (%d on %d)", nw, frameSize)
- return 0, io.ErrShortWrite
- }
- written += int64(nw)
-
- // Move the rest of the buffer to the beginning
- copy(buf, buf[frameSize+stdWriterPrefixLen:])
- // Move the index
- nr -= frameSize + stdWriterPrefixLen
- }
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes.go
deleted file mode 100644
index acf3f566f7..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package system
-
-import (
- "os"
- "syscall"
- "time"
- "unsafe"
-)
-
-var (
- maxTime time.Time
-)
-
-func init() {
- if unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 {
- // This is a 64 bit timespec
- // os.Chtimes limits time to the following
- maxTime = time.Unix(0, 1<<63-1)
- } else {
- // This is a 32 bit timespec
- maxTime = time.Unix(1<<31-1, 0)
- }
-}
-
-// Chtimes changes the access time and modified time of a file at the given path
-func Chtimes(name string, atime time.Time, mtime time.Time) error {
- unixMinTime := time.Unix(0, 0)
- unixMaxTime := maxTime
-
- // If the modified time is prior to the Unix Epoch, or after the
- // end of Unix Time, os.Chtimes has undefined behavior
- // default to Unix Epoch in this case, just in case
-
- if atime.Before(unixMinTime) || atime.After(unixMaxTime) {
- atime = unixMinTime
- }
-
- if mtime.Before(unixMinTime) || mtime.After(unixMaxTime) {
- mtime = unixMinTime
- }
-
- if err := os.Chtimes(name, atime, mtime); err != nil {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go
deleted file mode 100644
index 09d58bcbfd..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build !windows
-
-package system
-
-import (
- "time"
-)
-
-//setCTime will set the create time on a file. On Unix, the create
-//time is updated as a side effect of setting the modified time, so
-//no action is required.
-func setCTime(path string, ctime time.Time) error {
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go
deleted file mode 100644
index 2945868465..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// +build windows
-
-package system
-
-import (
- "syscall"
- "time"
-)
-
-//setCTime will set the create time on a file. On Windows, this requires
-//calling SetFileTime and explicitly including the create time.
-func setCTime(path string, ctime time.Time) error {
- ctimespec := syscall.NsecToTimespec(ctime.UnixNano())
- pathp, e := syscall.UTF16PtrFromString(path)
- if e != nil {
- return e
- }
- h, e := syscall.CreateFile(pathp,
- syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil,
- syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0)
- if e != nil {
- return e
- }
- defer syscall.Close(h)
- c := syscall.NsecToFiletime(syscall.TimespecToNsec(ctimespec))
- return syscall.SetFileTime(h, &c, nil, nil)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/errors.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/errors.go
deleted file mode 100644
index 288318985e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/errors.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package system
-
-import (
- "errors"
-)
-
-var (
- // ErrNotSupportedPlatform means the platform is not supported.
- ErrNotSupportedPlatform = errors.New("platform and architecture is not supported")
-)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/events_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/events_windows.go
deleted file mode 100644
index 04e2de7871..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/events_windows.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package system
-
-// This file implements syscalls for Win32 events which are not implemented
-// in golang.
-
-import (
- "syscall"
- "unsafe"
-)
-
-var (
- procCreateEvent = modkernel32.NewProc("CreateEventW")
- procOpenEvent = modkernel32.NewProc("OpenEventW")
- procSetEvent = modkernel32.NewProc("SetEvent")
- procResetEvent = modkernel32.NewProc("ResetEvent")
- procPulseEvent = modkernel32.NewProc("PulseEvent")
-)
-
-// CreateEvent implements win32 CreateEventW func in golang. It will create an event object.
-func CreateEvent(eventAttributes *syscall.SecurityAttributes, manualReset bool, initialState bool, name string) (handle syscall.Handle, err error) {
- namep, _ := syscall.UTF16PtrFromString(name)
- var _p1 uint32
- if manualReset {
- _p1 = 1
- }
- var _p2 uint32
- if initialState {
- _p2 = 1
- }
- r0, _, e1 := procCreateEvent.Call(uintptr(unsafe.Pointer(eventAttributes)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(namep)))
- use(unsafe.Pointer(namep))
- handle = syscall.Handle(r0)
- if handle == syscall.InvalidHandle {
- err = e1
- }
- return
-}
-
-// OpenEvent implements win32 OpenEventW func in golang. It opens an event object.
-func OpenEvent(desiredAccess uint32, inheritHandle bool, name string) (handle syscall.Handle, err error) {
- namep, _ := syscall.UTF16PtrFromString(name)
- var _p1 uint32
- if inheritHandle {
- _p1 = 1
- }
- r0, _, e1 := procOpenEvent.Call(uintptr(desiredAccess), uintptr(_p1), uintptr(unsafe.Pointer(namep)))
- use(unsafe.Pointer(namep))
- handle = syscall.Handle(r0)
- if handle == syscall.InvalidHandle {
- err = e1
- }
- return
-}
-
-// SetEvent implements win32 SetEvent func in golang.
-func SetEvent(handle syscall.Handle) (err error) {
- return setResetPulse(handle, procSetEvent)
-}
-
-// ResetEvent implements win32 ResetEvent func in golang.
-func ResetEvent(handle syscall.Handle) (err error) {
- return setResetPulse(handle, procResetEvent)
-}
-
-// PulseEvent implements win32 PulseEvent func in golang.
-func PulseEvent(handle syscall.Handle) (err error) {
- return setResetPulse(handle, procPulseEvent)
-}
-
-func setResetPulse(handle syscall.Handle, proc *syscall.LazyProc) (err error) {
- r0, _, _ := proc.Call(uintptr(handle))
- if r0 != 0 {
- err = syscall.Errno(r0)
- }
- return
-}
-
-var temp unsafe.Pointer
-
-// use ensures a variable is kept alive without the GC freeing while still needed
-func use(p unsafe.Pointer) {
- temp = p
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys.go
deleted file mode 100644
index c14feb8496..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build !windows
-
-package system
-
-import (
- "os"
- "path/filepath"
-)
-
-// MkdirAll creates a directory named path along with any necessary parents,
-// with permission specified by attribute perm for all dir created.
-func MkdirAll(path string, perm os.FileMode) error {
- return os.MkdirAll(path, perm)
-}
-
-// IsAbs is a platform-specific wrapper for filepath.IsAbs.
-func IsAbs(path string) bool {
- return filepath.IsAbs(path)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys_windows.go
deleted file mode 100644
index 16823d5517..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys_windows.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// +build windows
-
-package system
-
-import (
- "os"
- "path/filepath"
- "regexp"
- "strings"
- "syscall"
-)
-
-// MkdirAll implementation that is volume path aware for Windows.
-func MkdirAll(path string, perm os.FileMode) error {
- if re := regexp.MustCompile(`^\\\\\?\\Volume{[a-z0-9-]+}$`); re.MatchString(path) {
- return nil
- }
-
- // The rest of this method is copied from os.MkdirAll and should be kept
- // as-is to ensure compatibility.
-
- // Fast path: if we can tell whether path is a directory or file, stop with success or error.
- dir, err := os.Stat(path)
- if err == nil {
- if dir.IsDir() {
- return nil
- }
- return &os.PathError{
- Op: "mkdir",
- Path: path,
- Err: syscall.ENOTDIR,
- }
- }
-
- // Slow path: make sure parent exists and then call Mkdir for path.
- i := len(path)
- for i > 0 && os.IsPathSeparator(path[i-1]) { // Skip trailing path separator.
- i--
- }
-
- j := i
- for j > 0 && !os.IsPathSeparator(path[j-1]) { // Scan backward over element.
- j--
- }
-
- if j > 1 {
- // Create parent
- err = MkdirAll(path[0:j-1], perm)
- if err != nil {
- return err
- }
- }
-
- // Parent now exists; invoke Mkdir and use its result.
- err = os.Mkdir(path, perm)
- if err != nil {
- // Handle arguments like "foo/." by
- // double-checking that directory doesn't exist.
- dir, err1 := os.Lstat(path)
- if err1 == nil && dir.IsDir() {
- return nil
- }
- return err
- }
- return nil
-}
-
-// IsAbs is a platform-specific wrapper for filepath.IsAbs. On Windows,
-// golang filepath.IsAbs does not consider a path \windows\system32 as absolute
-// as it doesn't start with a drive-letter/colon combination. However, in
-// docker we need to verify things such as WORKDIR /windows/system32 in
-// a Dockerfile (which gets translated to \windows\system32 when being processed
-// by the daemon. This SHOULD be treated as absolute from a docker processing
-// perspective.
-func IsAbs(path string) bool {
- if !filepath.IsAbs(path) {
- if !strings.HasPrefix(path, string(os.PathSeparator)) {
- return false
- }
- }
- return true
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat.go
deleted file mode 100644
index bd23c4d50b..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build !windows
-
-package system
-
-import (
- "syscall"
-)
-
-// Lstat takes a path to a file and returns
-// a system.StatT type pertaining to that file.
-//
-// Throws an error if the file does not exist
-func Lstat(path string) (*StatT, error) {
- s := &syscall.Stat_t{}
- if err := syscall.Lstat(path, s); err != nil {
- return nil, err
- }
- return fromStatT(s)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat_windows.go
deleted file mode 100644
index 49e87eb40b..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat_windows.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// +build windows
-
-package system
-
-import (
- "os"
-)
-
-// Lstat calls os.Lstat to get a fileinfo interface back.
-// This is then copied into our own locally defined structure.
-// Note the Linux version uses fromStatT to do the copy back,
-// but that not strictly necessary when already in an OS specific module.
-func Lstat(path string) (*StatT, error) {
- fi, err := os.Lstat(path)
- if err != nil {
- return nil, err
- }
-
- return &StatT{
- name: fi.Name(),
- size: fi.Size(),
- mode: fi.Mode(),
- modTime: fi.ModTime(),
- isDir: fi.IsDir()}, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo.go
deleted file mode 100644
index 3b6e947e67..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package system
-
-// MemInfo contains memory statistics of the host system.
-type MemInfo struct {
- // Total usable RAM (i.e. physical RAM minus a few reserved bits and the
- // kernel binary code).
- MemTotal int64
-
- // Amount of free memory.
- MemFree int64
-
- // Total amount of swap space available.
- SwapTotal int64
-
- // Amount of swap space that is currently unused.
- SwapFree int64
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_linux.go
deleted file mode 100644
index c14dbf3764..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_linux.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package system
-
-import (
- "bufio"
- "io"
- "os"
- "strconv"
- "strings"
-
- "github.com/fsouza/go-dockerclient/external/github.com/docker/go-units"
-)
-
-// ReadMemInfo retrieves memory statistics of the host system and returns a
-// MemInfo type.
-func ReadMemInfo() (*MemInfo, error) {
- file, err := os.Open("/proc/meminfo")
- if err != nil {
- return nil, err
- }
- defer file.Close()
- return parseMemInfo(file)
-}
-
-// parseMemInfo parses the /proc/meminfo file into
-// a MemInfo object given a io.Reader to the file.
-//
-// Throws error if there are problems reading from the file
-func parseMemInfo(reader io.Reader) (*MemInfo, error) {
- meminfo := &MemInfo{}
- scanner := bufio.NewScanner(reader)
- for scanner.Scan() {
- // Expected format: ["MemTotal:", "1234", "kB"]
- parts := strings.Fields(scanner.Text())
-
- // Sanity checks: Skip malformed entries.
- if len(parts) < 3 || parts[2] != "kB" {
- continue
- }
-
- // Convert to bytes.
- size, err := strconv.Atoi(parts[1])
- if err != nil {
- continue
- }
- bytes := int64(size) * units.KiB
-
- switch parts[0] {
- case "MemTotal:":
- meminfo.MemTotal = bytes
- case "MemFree:":
- meminfo.MemFree = bytes
- case "SwapTotal:":
- meminfo.SwapTotal = bytes
- case "SwapFree:":
- meminfo.SwapFree = bytes
- }
-
- }
-
- // Handle errors that may have occurred during the reading of the file.
- if err := scanner.Err(); err != nil {
- return nil, err
- }
-
- return meminfo, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_unsupported.go
deleted file mode 100644
index 82ddd30c1b..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_unsupported.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build !linux,!windows
-
-package system
-
-// ReadMemInfo is not supported on platforms other than linux and windows.
-func ReadMemInfo() (*MemInfo, error) {
- return nil, ErrNotSupportedPlatform
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_windows.go
deleted file mode 100644
index d46642598c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_windows.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package system
-
-import (
- "syscall"
- "unsafe"
-)
-
-var (
- modkernel32 = syscall.NewLazyDLL("kernel32.dll")
-
- procGlobalMemoryStatusEx = modkernel32.NewProc("GlobalMemoryStatusEx")
-)
-
-// https://msdn.microsoft.com/en-us/library/windows/desktop/aa366589(v=vs.85).aspx
-// https://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx
-type memorystatusex struct {
- dwLength uint32
- dwMemoryLoad uint32
- ullTotalPhys uint64
- ullAvailPhys uint64
- ullTotalPageFile uint64
- ullAvailPageFile uint64
- ullTotalVirtual uint64
- ullAvailVirtual uint64
- ullAvailExtendedVirtual uint64
-}
-
-// ReadMemInfo retrieves memory statistics of the host system and returns a
-// MemInfo type.
-func ReadMemInfo() (*MemInfo, error) {
- msi := &memorystatusex{
- dwLength: 64,
- }
- r1, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(msi)))
- if r1 == 0 {
- return &MemInfo{}, nil
- }
- return &MemInfo{
- MemTotal: int64(msi.ullTotalPhys),
- MemFree: int64(msi.ullAvailPhys),
- SwapTotal: int64(msi.ullTotalPageFile),
- SwapFree: int64(msi.ullAvailPageFile),
- }, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod.go
deleted file mode 100644
index 73958182b4..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// +build !windows
-
-package system
-
-import (
- "syscall"
-)
-
-// Mknod creates a filesystem node (file, device special file or named pipe) named path
-// with attributes specified by mode and dev.
-func Mknod(path string, mode uint32, dev int) error {
- return syscall.Mknod(path, mode, dev)
-}
-
-// Mkdev is used to build the value of linux devices (in /dev/) which specifies major
-// and minor number of the newly created device special file.
-// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes.
-// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major,
-// then the top 12 bits of the minor.
-func Mkdev(major int64, minor int64) uint32 {
- return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod_windows.go
deleted file mode 100644
index 2e863c0215..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod_windows.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build windows
-
-package system
-
-// Mknod is not implemented on Windows.
-func Mknod(path string, mode uint32, dev int) error {
- return ErrNotSupportedPlatform
-}
-
-// Mkdev is not implemented on Windows.
-func Mkdev(major int64, minor int64) uint32 {
- panic("Mkdev not implemented on Windows.")
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/path_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/path_unix.go
deleted file mode 100644
index 1b6cc9cbd9..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/path_unix.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build !windows
-
-package system
-
-// DefaultPathEnv is unix style list of directories to search for
-// executables. Each directory is separated from the next by a colon
-// ':' character .
-const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/path_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/path_windows.go
deleted file mode 100644
index 09e7f89fed..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/path_windows.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// +build windows
-
-package system
-
-// DefaultPathEnv is deliberately empty on Windows as the default path will be set by
-// the container. Docker has no context of what the default path should be.
-const DefaultPathEnv = ""
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat.go
deleted file mode 100644
index 087034c5ec..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// +build !windows
-
-package system
-
-import (
- "syscall"
-)
-
-// StatT type contains status of a file. It contains metadata
-// like permission, owner, group, size, etc about a file.
-type StatT struct {
- mode uint32
- uid uint32
- gid uint32
- rdev uint64
- size int64
- mtim syscall.Timespec
-}
-
-// Mode returns file's permission mode.
-func (s StatT) Mode() uint32 {
- return s.mode
-}
-
-// UID returns file's user id of owner.
-func (s StatT) UID() uint32 {
- return s.uid
-}
-
-// GID returns file's group id of owner.
-func (s StatT) GID() uint32 {
- return s.gid
-}
-
-// Rdev returns file's device ID (if it's special file).
-func (s StatT) Rdev() uint64 {
- return s.rdev
-}
-
-// Size returns file's size.
-func (s StatT) Size() int64 {
- return s.size
-}
-
-// Mtim returns file's last modification time.
-func (s StatT) Mtim() syscall.Timespec {
- return s.mtim
-}
-
-// GetLastModification returns file's last modification time.
-func (s StatT) GetLastModification() syscall.Timespec {
- return s.Mtim()
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_freebsd.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_freebsd.go
deleted file mode 100644
index d0fb6f1519..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_freebsd.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package system
-
-import (
- "syscall"
-)
-
-// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
-func fromStatT(s *syscall.Stat_t) (*StatT, error) {
- return &StatT{size: s.Size,
- mode: uint32(s.Mode),
- uid: s.Uid,
- gid: s.Gid,
- rdev: uint64(s.Rdev),
- mtim: s.Mtimespec}, nil
-}
-
-// Stat takes a path to a file and returns
-// a system.Stat_t type pertaining to that file.
-//
-// Throws an error if the file does not exist
-func Stat(path string) (*StatT, error) {
- s := &syscall.Stat_t{}
- if err := syscall.Stat(path, s); err != nil {
- return nil, err
- }
- return fromStatT(s)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go
deleted file mode 100644
index 8b1eded138..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package system
-
-import (
- "syscall"
-)
-
-// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
-func fromStatT(s *syscall.Stat_t) (*StatT, error) {
- return &StatT{size: s.Size,
- mode: s.Mode,
- uid: s.Uid,
- gid: s.Gid,
- rdev: s.Rdev,
- mtim: s.Mtim}, nil
-}
-
-// FromStatT exists only on linux, and loads a system.StatT from a
-// syscal.Stat_t.
-func FromStatT(s *syscall.Stat_t) (*StatT, error) {
- return fromStatT(s)
-}
-
-// Stat takes a path to a file and returns
-// a system.StatT type pertaining to that file.
-//
-// Throws an error if the file does not exist
-func Stat(path string) (*StatT, error) {
- s := &syscall.Stat_t{}
- if err := syscall.Stat(path, s); err != nil {
- return nil, err
- }
- return fromStatT(s)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go
deleted file mode 100644
index 3c3b71fb21..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package system
-
-import (
- "syscall"
-)
-
-// fromStatT creates a system.StatT type from a syscall.Stat_t type
-func fromStatT(s *syscall.Stat_t) (*StatT, error) {
- return &StatT{size: s.Size,
- mode: uint32(s.Mode),
- uid: s.Uid,
- gid: s.Gid,
- rdev: uint64(s.Rdev),
- mtim: s.Mtim}, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_solaris.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_solaris.go
deleted file mode 100644
index b01d08acfe..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_solaris.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// +build solaris
-
-package system
-
-import (
- "syscall"
-)
-
-// fromStatT creates a system.StatT type from a syscall.Stat_t type
-func fromStatT(s *syscall.Stat_t) (*StatT, error) {
- return &StatT{size: s.Size,
- mode: uint32(s.Mode),
- uid: s.Uid,
- gid: s.Gid,
- rdev: uint64(s.Rdev),
- mtim: s.Mtim}, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go
deleted file mode 100644
index f53e9de4d1..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// +build !linux,!windows,!freebsd,!solaris,!openbsd
-
-package system
-
-import (
- "syscall"
-)
-
-// fromStatT creates a system.StatT type from a syscall.Stat_t type
-func fromStatT(s *syscall.Stat_t) (*StatT, error) {
- return &StatT{size: s.Size,
- mode: uint32(s.Mode),
- uid: s.Uid,
- gid: s.Gid,
- rdev: uint64(s.Rdev),
- mtim: s.Mtimespec}, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_windows.go
deleted file mode 100644
index 39490c625c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_windows.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// +build windows
-
-package system
-
-import (
- "os"
- "time"
-)
-
-// StatT type contains status of a file. It contains metadata
-// like name, permission, size, etc about a file.
-type StatT struct {
- name string
- size int64
- mode os.FileMode
- modTime time.Time
- isDir bool
-}
-
-// Name returns file's name.
-func (s StatT) Name() string {
- return s.name
-}
-
-// Size returns file's size.
-func (s StatT) Size() int64 {
- return s.size
-}
-
-// Mode returns file's permission mode.
-func (s StatT) Mode() os.FileMode {
- return s.mode
-}
-
-// ModTime returns file's last modification time.
-func (s StatT) ModTime() time.Time {
- return s.modTime
-}
-
-// IsDir returns whether file is actually a directory.
-func (s StatT) IsDir() bool {
- return s.isDir
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_unix.go
deleted file mode 100644
index f1497c587e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_unix.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build linux freebsd
-
-package system
-
-import "syscall"
-
-// Unmount is a platform-specific helper function to call
-// the unmount syscall.
-func Unmount(dest string) error {
- return syscall.Unmount(dest, 0)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_windows.go
deleted file mode 100644
index 273aa234bb..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_windows.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package system
-
-import (
- "fmt"
- "syscall"
-)
-
-// OSVersion is a wrapper for Windows version information
-// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
-type OSVersion struct {
- Version uint32
- MajorVersion uint8
- MinorVersion uint8
- Build uint16
-}
-
-// GetOSVersion gets the operating system version on Windows. Note that
-// docker.exe must be manifested to get the correct version information.
-func GetOSVersion() (OSVersion, error) {
- var err error
- osv := OSVersion{}
- osv.Version, err = syscall.GetVersion()
- if err != nil {
- return osv, fmt.Errorf("Failed to call GetVersion()")
- }
- osv.MajorVersion = uint8(osv.Version & 0xFF)
- osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)
- osv.Build = uint16(osv.Version >> 16)
- return osv, nil
-}
-
-// Unmount is a platform-specific helper function to call
-// the unmount syscall. Not supported on Windows
-func Unmount(dest string) error {
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask.go
deleted file mode 100644
index c670fcd758..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build !windows
-
-package system
-
-import (
- "syscall"
-)
-
-// Umask sets current process's file mode creation mask to newmask
-// and return oldmask.
-func Umask(newmask int) (oldmask int, err error) {
- return syscall.Umask(newmask), nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask_windows.go
deleted file mode 100644
index 13f1de1769..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask_windows.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build windows
-
-package system
-
-// Umask is not supported on the windows platform.
-func Umask(newmask int) (oldmask int, err error) {
- // should not be called on cli code path
- return 0, ErrNotSupportedPlatform
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_darwin.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_darwin.go
deleted file mode 100644
index 0a16197544..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_darwin.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package system
-
-import "syscall"
-
-// LUtimesNano is not supported by darwin platform.
-func LUtimesNano(path string, ts []syscall.Timespec) error {
- return ErrNotSupportedPlatform
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_freebsd.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_freebsd.go
deleted file mode 100644
index e2eac3b553..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_freebsd.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package system
-
-import (
- "syscall"
- "unsafe"
-)
-
-// LUtimesNano is used to change access and modification time of the specified path.
-// It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm.
-func LUtimesNano(path string, ts []syscall.Timespec) error {
- var _path *byte
- _path, err := syscall.BytePtrFromString(path)
- if err != nil {
- return err
- }
-
- if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_linux.go
deleted file mode 100644
index fc8a1aba95..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_linux.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package system
-
-import (
- "syscall"
- "unsafe"
-)
-
-// LUtimesNano is used to change access and modification time of the specified path.
-// It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm.
-func LUtimesNano(path string, ts []syscall.Timespec) error {
- // These are not currently available in syscall
- atFdCwd := -100
- atSymLinkNoFollow := 0x100
-
- var _path *byte
- _path, err := syscall.BytePtrFromString(path)
- if err != nil {
- return err
- }
-
- if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(atSymLinkNoFollow), 0, 0); err != 0 && err != syscall.ENOSYS {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_unsupported.go
deleted file mode 100644
index 50c3a04364..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_unsupported.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// +build !linux,!freebsd,!darwin
-
-package system
-
-import "syscall"
-
-// LUtimesNano is not supported on platforms other than linux, freebsd and darwin.
-func LUtimesNano(path string, ts []syscall.Timespec) error {
- return ErrNotSupportedPlatform
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_linux.go
deleted file mode 100644
index d2e2c05799..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_linux.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package system
-
-import (
- "syscall"
- "unsafe"
-)
-
-// Lgetxattr retrieves the value of the extended attribute identified by attr
-// and associated with the given path in the file system.
-// It will returns a nil slice and nil error if the xattr is not set.
-func Lgetxattr(path string, attr string) ([]byte, error) {
- pathBytes, err := syscall.BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
- attrBytes, err := syscall.BytePtrFromString(attr)
- if err != nil {
- return nil, err
- }
-
- dest := make([]byte, 128)
- destBytes := unsafe.Pointer(&dest[0])
- sz, _, errno := syscall.Syscall6(syscall.SYS_LGETXATTR, uintptr(unsafe.Pointer(pathBytes)), uintptr(unsafe.Pointer(attrBytes)), uintptr(destBytes), uintptr(len(dest)), 0, 0)
- if errno == syscall.ENODATA {
- return nil, nil
- }
- if errno == syscall.ERANGE {
- dest = make([]byte, sz)
- destBytes := unsafe.Pointer(&dest[0])
- sz, _, errno = syscall.Syscall6(syscall.SYS_LGETXATTR, uintptr(unsafe.Pointer(pathBytes)), uintptr(unsafe.Pointer(attrBytes)), uintptr(destBytes), uintptr(len(dest)), 0, 0)
- }
- if errno != 0 {
- return nil, errno
- }
-
- return dest[:sz], nil
-}
-
-var _zero uintptr
-
-// Lsetxattr sets the value of the extended attribute identified by attr
-// and associated with the given path in the file system.
-func Lsetxattr(path string, attr string, data []byte, flags int) error {
- pathBytes, err := syscall.BytePtrFromString(path)
- if err != nil {
- return err
- }
- attrBytes, err := syscall.BytePtrFromString(attr)
- if err != nil {
- return err
- }
- var dataBytes unsafe.Pointer
- if len(data) > 0 {
- dataBytes = unsafe.Pointer(&data[0])
- } else {
- dataBytes = unsafe.Pointer(&_zero)
- }
- _, _, errno := syscall.Syscall6(syscall.SYS_LSETXATTR, uintptr(unsafe.Pointer(pathBytes)), uintptr(unsafe.Pointer(attrBytes)), uintptr(dataBytes), uintptr(len(data)), uintptr(flags), 0)
- if errno != 0 {
- return errno
- }
- return nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_unsupported.go
deleted file mode 100644
index 0114f2227c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_unsupported.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build !linux
-
-package system
-
-// Lgetxattr is not supported on platforms other than linux.
-func Lgetxattr(path string, attr string) ([]byte, error) {
- return nil, ErrNotSupportedPlatform
-}
-
-// Lsetxattr is not supported on platforms other than linux.
-func Lsetxattr(path string, attr string, data []byte, flags int) error {
- return ErrNotSupportedPlatform
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/CONTRIBUTING.md b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/CONTRIBUTING.md
deleted file mode 100644
index 9ea86d784e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/CONTRIBUTING.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# Contributing to go-units
-
-Want to hack on go-units? Awesome! Here are instructions to get you started.
-
-go-units is a part of the [Docker](https://www.docker.com) project, and follows
-the same rules and principles. If you're already familiar with the way
-Docker does things, you'll feel right at home.
-
-Otherwise, go read Docker's
-[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md),
-[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md),
-[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and
-[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md).
-
-### Sign your work
-
-The sign-off is a simple line at the end of the explanation for the patch. Your
-signature certifies that you wrote the patch or otherwise have the right to pass
-it on as an open-source patch. The rules are pretty simple: if you can certify
-the below (from [developercertificate.org](http://developercertificate.org/)):
-
-```
-Developer Certificate of Origin
-Version 1.1
-
-Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
-660 York Street, Suite 102,
-San Francisco, CA 94110 USA
-
-Everyone is permitted to copy and distribute verbatim copies of this
-license document, but changing it is not allowed.
-
-Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-(a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-(b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-(c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-(d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-```
-
-Then you just add a line to every git commit message:
-
- Signed-off-by: Joe Smith
-
-Use your real name (sorry, no pseudonyms or anonymous contributions.)
-
-If you set your `user.name` and `user.email` git configs, you can sign your
-commit automatically with `git commit -s`.
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/LICENSE.docs b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/LICENSE.docs
deleted file mode 100644
index e26cd4fc8e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/LICENSE.docs
+++ /dev/null
@@ -1,425 +0,0 @@
-Attribution-ShareAlike 4.0 International
-
-=======================================================================
-
-Creative Commons Corporation ("Creative Commons") is not a law firm and
-does not provide legal services or legal advice. Distribution of
-Creative Commons public licenses does not create a lawyer-client or
-other relationship. Creative Commons makes its licenses and related
-information available on an "as-is" basis. Creative Commons gives no
-warranties regarding its licenses, any material licensed under their
-terms and conditions, or any related information. Creative Commons
-disclaims all liability for damages resulting from their use to the
-fullest extent possible.
-
-Using Creative Commons Public Licenses
-
-Creative Commons public licenses provide a standard set of terms and
-conditions that creators and other rights holders may use to share
-original works of authorship and other material subject to copyright
-and certain other rights specified in the public license below. The
-following considerations are for informational purposes only, are not
-exhaustive, and do not form part of our licenses.
-
- Considerations for licensors: Our public licenses are
- intended for use by those authorized to give the public
- permission to use material in ways otherwise restricted by
- copyright and certain other rights. Our licenses are
- irrevocable. Licensors should read and understand the terms
- and conditions of the license they choose before applying it.
- Licensors should also secure all rights necessary before
- applying our licenses so that the public can reuse the
- material as expected. Licensors should clearly mark any
- material not subject to the license. This includes other CC-
- licensed material, or material used under an exception or
- limitation to copyright. More considerations for licensors:
- wiki.creativecommons.org/Considerations_for_licensors
-
- Considerations for the public: By using one of our public
- licenses, a licensor grants the public permission to use the
- licensed material under specified terms and conditions. If
- the licensor's permission is not necessary for any reason--for
- example, because of any applicable exception or limitation to
- copyright--then that use is not regulated by the license. Our
- licenses grant only permissions under copyright and certain
- other rights that a licensor has authority to grant. Use of
- the licensed material may still be restricted for other
- reasons, including because others have copyright or other
- rights in the material. A licensor may make special requests,
- such as asking that all changes be marked or described.
- Although not required by our licenses, you are encouraged to
- respect those requests where reasonable. More_considerations
- for the public:
- wiki.creativecommons.org/Considerations_for_licensees
-
-=======================================================================
-
-Creative Commons Attribution-ShareAlike 4.0 International Public
-License
-
-By exercising the Licensed Rights (defined below), You accept and agree
-to be bound by the terms and conditions of this Creative Commons
-Attribution-ShareAlike 4.0 International Public License ("Public
-License"). To the extent this Public License may be interpreted as a
-contract, You are granted the Licensed Rights in consideration of Your
-acceptance of these terms and conditions, and the Licensor grants You
-such rights in consideration of benefits the Licensor receives from
-making the Licensed Material available under these terms and
-conditions.
-
-
-Section 1 -- Definitions.
-
- a. Adapted Material means material subject to Copyright and Similar
- Rights that is derived from or based upon the Licensed Material
- and in which the Licensed Material is translated, altered,
- arranged, transformed, or otherwise modified in a manner requiring
- permission under the Copyright and Similar Rights held by the
- Licensor. For purposes of this Public License, where the Licensed
- Material is a musical work, performance, or sound recording,
- Adapted Material is always produced where the Licensed Material is
- synched in timed relation with a moving image.
-
- b. Adapter's License means the license You apply to Your Copyright
- and Similar Rights in Your contributions to Adapted Material in
- accordance with the terms and conditions of this Public License.
-
- c. BY-SA Compatible License means a license listed at
- creativecommons.org/compatiblelicenses, approved by Creative
- Commons as essentially the equivalent of this Public License.
-
- d. Copyright and Similar Rights means copyright and/or similar rights
- closely related to copyright including, without limitation,
- performance, broadcast, sound recording, and Sui Generis Database
- Rights, without regard to how the rights are labeled or
- categorized. For purposes of this Public License, the rights
- specified in Section 2(b)(1)-(2) are not Copyright and Similar
- Rights.
-
- e. Effective Technological Measures means those measures that, in the
- absence of proper authority, may not be circumvented under laws
- fulfilling obligations under Article 11 of the WIPO Copyright
- Treaty adopted on December 20, 1996, and/or similar international
- agreements.
-
- f. Exceptions and Limitations means fair use, fair dealing, and/or
- any other exception or limitation to Copyright and Similar Rights
- that applies to Your use of the Licensed Material.
-
- g. License Elements means the license attributes listed in the name
- of a Creative Commons Public License. The License Elements of this
- Public License are Attribution and ShareAlike.
-
- h. Licensed Material means the artistic or literary work, database,
- or other material to which the Licensor applied this Public
- License.
-
- i. Licensed Rights means the rights granted to You subject to the
- terms and conditions of this Public License, which are limited to
- all Copyright and Similar Rights that apply to Your use of the
- Licensed Material and that the Licensor has authority to license.
-
- j. Licensor means the individual(s) or entity(ies) granting rights
- under this Public License.
-
- k. Share means to provide material to the public by any means or
- process that requires permission under the Licensed Rights, such
- as reproduction, public display, public performance, distribution,
- dissemination, communication, or importation, and to make material
- available to the public including in ways that members of the
- public may access the material from a place and at a time
- individually chosen by them.
-
- l. Sui Generis Database Rights means rights other than copyright
- resulting from Directive 96/9/EC of the European Parliament and of
- the Council of 11 March 1996 on the legal protection of databases,
- as amended and/or succeeded, as well as other essentially
- equivalent rights anywhere in the world.
-
- m. You means the individual or entity exercising the Licensed Rights
- under this Public License. Your has a corresponding meaning.
-
-
-Section 2 -- Scope.
-
- a. License grant.
-
- 1. Subject to the terms and conditions of this Public License,
- the Licensor hereby grants You a worldwide, royalty-free,
- non-sublicensable, non-exclusive, irrevocable license to
- exercise the Licensed Rights in the Licensed Material to:
-
- a. reproduce and Share the Licensed Material, in whole or
- in part; and
-
- b. produce, reproduce, and Share Adapted Material.
-
- 2. Exceptions and Limitations. For the avoidance of doubt, where
- Exceptions and Limitations apply to Your use, this Public
- License does not apply, and You do not need to comply with
- its terms and conditions.
-
- 3. Term. The term of this Public License is specified in Section
- 6(a).
-
- 4. Media and formats; technical modifications allowed. The
- Licensor authorizes You to exercise the Licensed Rights in
- all media and formats whether now known or hereafter created,
- and to make technical modifications necessary to do so. The
- Licensor waives and/or agrees not to assert any right or
- authority to forbid You from making technical modifications
- necessary to exercise the Licensed Rights, including
- technical modifications necessary to circumvent Effective
- Technological Measures. For purposes of this Public License,
- simply making modifications authorized by this Section 2(a)
- (4) never produces Adapted Material.
-
- 5. Downstream recipients.
-
- a. Offer from the Licensor -- Licensed Material. Every
- recipient of the Licensed Material automatically
- receives an offer from the Licensor to exercise the
- Licensed Rights under the terms and conditions of this
- Public License.
-
- b. Additional offer from the Licensor -- Adapted Material.
- Every recipient of Adapted Material from You
- automatically receives an offer from the Licensor to
- exercise the Licensed Rights in the Adapted Material
- under the conditions of the Adapter's License You apply.
-
- c. No downstream restrictions. You may not offer or impose
- any additional or different terms or conditions on, or
- apply any Effective Technological Measures to, the
- Licensed Material if doing so restricts exercise of the
- Licensed Rights by any recipient of the Licensed
- Material.
-
- 6. No endorsement. Nothing in this Public License constitutes or
- may be construed as permission to assert or imply that You
- are, or that Your use of the Licensed Material is, connected
- with, or sponsored, endorsed, or granted official status by,
- the Licensor or others designated to receive attribution as
- provided in Section 3(a)(1)(A)(i).
-
- b. Other rights.
-
- 1. Moral rights, such as the right of integrity, are not
- licensed under this Public License, nor are publicity,
- privacy, and/or other similar personality rights; however, to
- the extent possible, the Licensor waives and/or agrees not to
- assert any such rights held by the Licensor to the limited
- extent necessary to allow You to exercise the Licensed
- Rights, but not otherwise.
-
- 2. Patent and trademark rights are not licensed under this
- Public License.
-
- 3. To the extent possible, the Licensor waives any right to
- collect royalties from You for the exercise of the Licensed
- Rights, whether directly or through a collecting society
- under any voluntary or waivable statutory or compulsory
- licensing scheme. In all other cases the Licensor expressly
- reserves any right to collect such royalties.
-
-
-Section 3 -- License Conditions.
-
-Your exercise of the Licensed Rights is expressly made subject to the
-following conditions.
-
- a. Attribution.
-
- 1. If You Share the Licensed Material (including in modified
- form), You must:
-
- a. retain the following if it is supplied by the Licensor
- with the Licensed Material:
-
- i. identification of the creator(s) of the Licensed
- Material and any others designated to receive
- attribution, in any reasonable manner requested by
- the Licensor (including by pseudonym if
- designated);
-
- ii. a copyright notice;
-
- iii. a notice that refers to this Public License;
-
- iv. a notice that refers to the disclaimer of
- warranties;
-
- v. a URI or hyperlink to the Licensed Material to the
- extent reasonably practicable;
-
- b. indicate if You modified the Licensed Material and
- retain an indication of any previous modifications; and
-
- c. indicate the Licensed Material is licensed under this
- Public License, and include the text of, or the URI or
- hyperlink to, this Public License.
-
- 2. You may satisfy the conditions in Section 3(a)(1) in any
- reasonable manner based on the medium, means, and context in
- which You Share the Licensed Material. For example, it may be
- reasonable to satisfy the conditions by providing a URI or
- hyperlink to a resource that includes the required
- information.
-
- 3. If requested by the Licensor, You must remove any of the
- information required by Section 3(a)(1)(A) to the extent
- reasonably practicable.
-
- b. ShareAlike.
-
- In addition to the conditions in Section 3(a), if You Share
- Adapted Material You produce, the following conditions also apply.
-
- 1. The Adapter's License You apply must be a Creative Commons
- license with the same License Elements, this version or
- later, or a BY-SA Compatible License.
-
- 2. You must include the text of, or the URI or hyperlink to, the
- Adapter's License You apply. You may satisfy this condition
- in any reasonable manner based on the medium, means, and
- context in which You Share Adapted Material.
-
- 3. You may not offer or impose any additional or different terms
- or conditions on, or apply any Effective Technological
- Measures to, Adapted Material that restrict exercise of the
- rights granted under the Adapter's License You apply.
-
-
-Section 4 -- Sui Generis Database Rights.
-
-Where the Licensed Rights include Sui Generis Database Rights that
-apply to Your use of the Licensed Material:
-
- a. for the avoidance of doubt, Section 2(a)(1) grants You the right
- to extract, reuse, reproduce, and Share all or a substantial
- portion of the contents of the database;
-
- b. if You include all or a substantial portion of the database
- contents in a database in which You have Sui Generis Database
- Rights, then the database in which You have Sui Generis Database
- Rights (but not its individual contents) is Adapted Material,
-
- including for purposes of Section 3(b); and
- c. You must comply with the conditions in Section 3(a) if You Share
- all or a substantial portion of the contents of the database.
-
-For the avoidance of doubt, this Section 4 supplements and does not
-replace Your obligations under this Public License where the Licensed
-Rights include other Copyright and Similar Rights.
-
-
-Section 5 -- Disclaimer of Warranties and Limitation of Liability.
-
- a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
- EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
- AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
- ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
- IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
- WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
- PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
- ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
- KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
- ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
-
- b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
- TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
- NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
- INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
- COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
- USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
- DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
- IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
-
- c. The disclaimer of warranties and limitation of liability provided
- above shall be interpreted in a manner that, to the extent
- possible, most closely approximates an absolute disclaimer and
- waiver of all liability.
-
-
-Section 6 -- Term and Termination.
-
- a. This Public License applies for the term of the Copyright and
- Similar Rights licensed here. However, if You fail to comply with
- this Public License, then Your rights under this Public License
- terminate automatically.
-
- b. Where Your right to use the Licensed Material has terminated under
- Section 6(a), it reinstates:
-
- 1. automatically as of the date the violation is cured, provided
- it is cured within 30 days of Your discovery of the
- violation; or
-
- 2. upon express reinstatement by the Licensor.
-
- For the avoidance of doubt, this Section 6(b) does not affect any
- right the Licensor may have to seek remedies for Your violations
- of this Public License.
-
- c. For the avoidance of doubt, the Licensor may also offer the
- Licensed Material under separate terms or conditions or stop
- distributing the Licensed Material at any time; however, doing so
- will not terminate this Public License.
-
- d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
- License.
-
-
-Section 7 -- Other Terms and Conditions.
-
- a. The Licensor shall not be bound by any additional or different
- terms or conditions communicated by You unless expressly agreed.
-
- b. Any arrangements, understandings, or agreements regarding the
- Licensed Material not stated herein are separate from and
- independent of the terms and conditions of this Public License.
-
-
-Section 8 -- Interpretation.
-
- a. For the avoidance of doubt, this Public License does not, and
- shall not be interpreted to, reduce, limit, restrict, or impose
- conditions on any use of the Licensed Material that could lawfully
- be made without permission under this Public License.
-
- b. To the extent possible, if any provision of this Public License is
- deemed unenforceable, it shall be automatically reformed to the
- minimum extent necessary to make it enforceable. If the provision
- cannot be reformed, it shall be severed from this Public License
- without affecting the enforceability of the remaining terms and
- conditions.
-
- c. No term or condition of this Public License will be waived and no
- failure to comply consented to unless expressly agreed to by the
- Licensor.
-
- d. Nothing in this Public License constitutes or may be interpreted
- as a limitation upon, or waiver of, any privileges and immunities
- that apply to the Licensor or You, including from the legal
- processes of any jurisdiction or authority.
-
-
-=======================================================================
-
-Creative Commons is not a party to its public licenses.
-Notwithstanding, Creative Commons may elect to apply one of its public
-licenses to material it publishes and in those instances will be
-considered the "Licensor." Except for the limited purpose of indicating
-that material is shared under a Creative Commons public license or as
-otherwise permitted by the Creative Commons policies published at
-creativecommons.org/policies, Creative Commons does not authorize the
-use of the trademark "Creative Commons" or any other trademark or logo
-of Creative Commons without its prior written consent including,
-without limitation, in connection with any unauthorized modifications
-to any of its public licenses or any other arrangements,
-understandings, or agreements concerning use of licensed material. For
-the avoidance of doubt, this paragraph does not form part of the public
-licenses.
-
-Creative Commons may be contacted at creativecommons.org.
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/MAINTAINERS b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/MAINTAINERS
deleted file mode 100644
index 477be8b214..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/MAINTAINERS
+++ /dev/null
@@ -1,27 +0,0 @@
-# go-connections maintainers file
-#
-# This file describes who runs the docker/go-connections project and how.
-# This is a living document - if you see something out of date or missing, speak up!
-#
-# It is structured to be consumable by both humans and programs.
-# To extract its contents programmatically, use any TOML-compliant parser.
-#
-# This file is compiled into the MAINTAINERS file in docker/opensource.
-#
-[Org]
- [Org."Core maintainers"]
- people = [
- "calavera",
- ]
-
-[people]
-
-# A reference list of all people associated with the project.
-# All other sections should refer to people by their canonical key
-# in the people section.
-
- # ADD YOURSELF HERE IN ALPHABETICAL ORDER
- [people.calavera]
- Name = "David Calavera"
- Email = "david.calavera@gmail.com"
- GitHub = "calavera"
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/README.md b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/README.md
deleted file mode 100644
index 3ce4d79dac..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-[](https://godoc.org/github.com/docker/go-units)
-
-# Introduction
-
-go-units is a library to transform human friendly measurements into machine friendly values.
-
-## Usage
-
-See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation.
-
-## Copyright and license
-
-Copyright © 2015 Docker, Inc. All rights reserved, except as follows. Code
-is released under the Apache 2.0 license. The README.md file, and files in the
-"docs" folder are licensed under the Creative Commons Attribution 4.0
-International License under the terms and conditions set forth in the file
-"LICENSE.docs". You may obtain a duplicate copy of the same license, titled
-CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/.
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/circle.yml b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/circle.yml
deleted file mode 100644
index 9043b35478..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/circle.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-dependencies:
- post:
- # install golint
- - go get github.com/golang/lint/golint
-
-test:
- pre:
- # run analysis before tests
- - go vet ./...
- - test -z "$(golint ./... | tee /dev/stderr)"
- - test -z "$(gofmt -s -l . | tee /dev/stderr)"
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/duration.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/duration.go
deleted file mode 100644
index c219a8a968..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/duration.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Package units provides helper function to parse and print size and time units
-// in human-readable format.
-package units
-
-import (
- "fmt"
- "time"
-)
-
-// HumanDuration returns a human-readable approximation of a duration
-// (eg. "About a minute", "4 hours ago", etc.).
-func HumanDuration(d time.Duration) string {
- if seconds := int(d.Seconds()); seconds < 1 {
- return "Less than a second"
- } else if seconds < 60 {
- return fmt.Sprintf("%d seconds", seconds)
- } else if minutes := int(d.Minutes()); minutes == 1 {
- return "About a minute"
- } else if minutes < 60 {
- return fmt.Sprintf("%d minutes", minutes)
- } else if hours := int(d.Hours()); hours == 1 {
- return "About an hour"
- } else if hours < 48 {
- return fmt.Sprintf("%d hours", hours)
- } else if hours < 24*7*2 {
- return fmt.Sprintf("%d days", hours/24)
- } else if hours < 24*30*3 {
- return fmt.Sprintf("%d weeks", hours/24/7)
- } else if hours < 24*365*2 {
- return fmt.Sprintf("%d months", hours/24/30)
- }
- return fmt.Sprintf("%d years", int(d.Hours())/24/365)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/size.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/size.go
deleted file mode 100644
index 3b59daff31..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/size.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package units
-
-import (
- "fmt"
- "regexp"
- "strconv"
- "strings"
-)
-
-// See: http://en.wikipedia.org/wiki/Binary_prefix
-const (
- // Decimal
-
- KB = 1000
- MB = 1000 * KB
- GB = 1000 * MB
- TB = 1000 * GB
- PB = 1000 * TB
-
- // Binary
-
- KiB = 1024
- MiB = 1024 * KiB
- GiB = 1024 * MiB
- TiB = 1024 * GiB
- PiB = 1024 * TiB
-)
-
-type unitMap map[string]int64
-
-var (
- decimalMap = unitMap{"k": KB, "m": MB, "g": GB, "t": TB, "p": PB}
- binaryMap = unitMap{"k": KiB, "m": MiB, "g": GiB, "t": TiB, "p": PiB}
- sizeRegex = regexp.MustCompile(`^(\d+)([kKmMgGtTpP])?[bB]?$`)
-)
-
-var decimapAbbrs = []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
-var binaryAbbrs = []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}
-
-// CustomSize returns a human-readable approximation of a size
-// using custom format.
-func CustomSize(format string, size float64, base float64, _map []string) string {
- i := 0
- for size >= base {
- size = size / base
- i++
- }
- return fmt.Sprintf(format, size, _map[i])
-}
-
-// HumanSize returns a human-readable approximation of a size
-// capped at 4 valid numbers (eg. "2.746 MB", "796 KB").
-func HumanSize(size float64) string {
- return CustomSize("%.4g %s", size, 1000.0, decimapAbbrs)
-}
-
-// BytesSize returns a human-readable size in bytes, kibibytes,
-// mebibytes, gibibytes, or tebibytes (eg. "44kiB", "17MiB").
-func BytesSize(size float64) string {
- return CustomSize("%.4g %s", size, 1024.0, binaryAbbrs)
-}
-
-// FromHumanSize returns an integer from a human-readable specification of a
-// size using SI standard (eg. "44kB", "17MB").
-func FromHumanSize(size string) (int64, error) {
- return parseSize(size, decimalMap)
-}
-
-// RAMInBytes parses a human-readable string representing an amount of RAM
-// in bytes, kibibytes, mebibytes, gibibytes, or tebibytes and
-// returns the number of bytes, or -1 if the string is unparseable.
-// Units are case-insensitive, and the 'b' suffix is optional.
-func RAMInBytes(size string) (int64, error) {
- return parseSize(size, binaryMap)
-}
-
-// Parses the human-readable size string into the amount it represents.
-func parseSize(sizeStr string, uMap unitMap) (int64, error) {
- matches := sizeRegex.FindStringSubmatch(sizeStr)
- if len(matches) != 3 {
- return -1, fmt.Errorf("invalid size: '%s'", sizeStr)
- }
-
- size, err := strconv.ParseInt(matches[1], 10, 0)
- if err != nil {
- return -1, err
- }
-
- unitPrefix := strings.ToLower(matches[2])
- if mul, ok := uMap[unitPrefix]; ok {
- size *= mul
- }
-
- return size, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/ulimit.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/ulimit.go
deleted file mode 100644
index 5ac7fd825f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units/ulimit.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package units
-
-import (
- "fmt"
- "strconv"
- "strings"
-)
-
-// Ulimit is a human friendly version of Rlimit.
-type Ulimit struct {
- Name string
- Hard int64
- Soft int64
-}
-
-// Rlimit specifies the resource limits, such as max open files.
-type Rlimit struct {
- Type int `json:"type,omitempty"`
- Hard uint64 `json:"hard,omitempty"`
- Soft uint64 `json:"soft,omitempty"`
-}
-
-const (
- // magic numbers for making the syscall
- // some of these are defined in the syscall package, but not all.
- // Also since Windows client doesn't get access to the syscall package, need to
- // define these here
- rlimitAs = 9
- rlimitCore = 4
- rlimitCPU = 0
- rlimitData = 2
- rlimitFsize = 1
- rlimitLocks = 10
- rlimitMemlock = 8
- rlimitMsgqueue = 12
- rlimitNice = 13
- rlimitNofile = 7
- rlimitNproc = 6
- rlimitRss = 5
- rlimitRtprio = 14
- rlimitRttime = 15
- rlimitSigpending = 11
- rlimitStack = 3
-)
-
-var ulimitNameMapping = map[string]int{
- //"as": rlimitAs, // Disabled since this doesn't seem usable with the way Docker inits a container.
- "core": rlimitCore,
- "cpu": rlimitCPU,
- "data": rlimitData,
- "fsize": rlimitFsize,
- "locks": rlimitLocks,
- "memlock": rlimitMemlock,
- "msgqueue": rlimitMsgqueue,
- "nice": rlimitNice,
- "nofile": rlimitNofile,
- "nproc": rlimitNproc,
- "rss": rlimitRss,
- "rtprio": rlimitRtprio,
- "rttime": rlimitRttime,
- "sigpending": rlimitSigpending,
- "stack": rlimitStack,
-}
-
-// ParseUlimit parses and returns a Ulimit from the specified string.
-func ParseUlimit(val string) (*Ulimit, error) {
- parts := strings.SplitN(val, "=", 2)
- if len(parts) != 2 {
- return nil, fmt.Errorf("invalid ulimit argument: %s", val)
- }
-
- if _, exists := ulimitNameMapping[parts[0]]; !exists {
- return nil, fmt.Errorf("invalid ulimit type: %s", parts[0])
- }
-
- var (
- soft int64
- hard = &soft // default to soft in case no hard was set
- temp int64
- err error
- )
- switch limitVals := strings.Split(parts[1], ":"); len(limitVals) {
- case 2:
- temp, err = strconv.ParseInt(limitVals[1], 10, 64)
- if err != nil {
- return nil, err
- }
- hard = &temp
- fallthrough
- case 1:
- soft, err = strconv.ParseInt(limitVals[0], 10, 64)
- if err != nil {
- return nil, err
- }
- default:
- return nil, fmt.Errorf("too many limit value arguments - %s, can only have up to two, `soft[:hard]`", parts[1])
- }
-
- if soft > *hard {
- return nil, fmt.Errorf("ulimit soft limit must be less than or equal to hard limit: %d > %d", soft, *hard)
- }
-
- return &Ulimit{Name: parts[0], Soft: soft, Hard: *hard}, nil
-}
-
-// GetRlimit returns the RLimit corresponding to Ulimit.
-func (u *Ulimit) GetRlimit() (*Rlimit, error) {
- t, exists := ulimitNameMapping[u.Name]
- if !exists {
- return nil, fmt.Errorf("invalid ulimit name %s", u.Name)
- }
-
- return &Rlimit{Type: t, Soft: uint64(u.Soft), Hard: uint64(u.Hard)}, nil
-}
-
-func (u *Ulimit) String() string {
- return fmt.Sprintf("%s=%d:%d", u.Name, u.Soft, u.Hard)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/LICENSE b/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/LICENSE
deleted file mode 100644
index e87a115e46..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/LICENSE
+++ /dev/null
@@ -1,363 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
- means each individual or legal entity that creates, contributes to the
- creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
- means the combination of the Contributions of others (if any) used by a
- Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
- means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
- means Source Code Form to which the initial Contributor has attached the
- notice in Exhibit A, the Executable Form of such Source Code Form, and
- Modifications of such Source Code Form, in each case including portions
- thereof.
-
-1.5. "Incompatible With Secondary Licenses"
- means
-
- a. that the initial Contributor has attached the notice described in
- Exhibit B to the Covered Software; or
-
- b. that the Covered Software was made available under the terms of
- version 1.1 or earlier of the License, but not also under the terms of
- a Secondary License.
-
-1.6. "Executable Form"
-
- means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
- means a work that combines Covered Software with other material, in a
- separate file or files, that is not Covered Software.
-
-1.8. "License"
-
- means this document.
-
-1.9. "Licensable"
-
- means having the right to grant, to the maximum extent possible, whether
- at the time of the initial grant or subsequently, any and all of the
- rights conveyed by this License.
-
-1.10. "Modifications"
-
- means any of the following:
-
- a. any file in Source Code Form that results from an addition to,
- deletion from, or modification of the contents of Covered Software; or
-
- b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
- means any patent claim(s), including without limitation, method,
- process, and apparatus claims, in any patent Licensable by such
- Contributor that would be infringed, but for the grant of the License,
- by the making, using, selling, offering for sale, having made, import,
- or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
- means either the GNU General Public License, Version 2.0, the GNU Lesser
- General Public License, Version 2.1, the GNU Affero General Public
- License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
- means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
- means an individual or a legal entity exercising rights under this
- License. For legal entities, "You" includes any entity that controls, is
- controlled by, or is under common control with You. For purposes of this
- definition, "control" means (a) the power, direct or indirect, to cause
- the direction or management of such entity, whether by contract or
- otherwise, or (b) ownership of more than fifty percent (50%) of the
- outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
- Each Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license:
-
- a. under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or
- as part of a Larger Work; and
-
- b. under Patent Claims of such Contributor to make, use, sell, offer for
- sale, have made, import, and otherwise transfer either its
- Contributions or its Contributor Version.
-
-2.2. Effective Date
-
- The licenses granted in Section 2.1 with respect to any Contribution
- become effective for each Contribution on the date the Contributor first
- distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
- The licenses granted in this Section 2 are the only rights granted under
- this License. No additional rights or licenses will be implied from the
- distribution or licensing of Covered Software under this License.
- Notwithstanding Section 2.1(b) above, no patent license is granted by a
- Contributor:
-
- a. for any code that a Contributor has removed from Covered Software; or
-
- b. for infringements caused by: (i) Your and any other third party's
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
- c. under Patent Claims infringed by Covered Software in the absence of
- its Contributions.
-
- This License does not grant any rights in the trademarks, service marks,
- or logos of any Contributor (except as may be necessary to comply with
- the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
- No Contributor makes additional grants as a result of Your choice to
- distribute the Covered Software under a subsequent version of this
- License (see Section 10.2) or under the terms of a Secondary License (if
- permitted under the terms of Section 3.3).
-
-2.5. Representation
-
- Each Contributor represents that the Contributor believes its
- Contributions are its original creation(s) or it has sufficient rights to
- grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
- This License is not intended to limit any rights You have under
- applicable copyright doctrines of fair use, fair dealing, or other
- equivalents.
-
-2.7. Conditions
-
- Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
- Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
- All distribution of Covered Software in Source Code Form, including any
- Modifications that You create or to which You contribute, must be under
- the terms of this License. You must inform recipients that the Source
- Code Form of the Covered Software is governed by the terms of this
- License, and how they can obtain a copy of this License. You may not
- attempt to alter or restrict the recipients' rights in the Source Code
- Form.
-
-3.2. Distribution of Executable Form
-
- If You distribute Covered Software in Executable Form then:
-
- a. such Covered Software must also be made available in Source Code Form,
- as described in Section 3.1, and You must inform recipients of the
- Executable Form how they can obtain a copy of such Source Code Form by
- reasonable means in a timely manner, at a charge no more than the cost
- of distribution to the recipient; and
-
- b. You may distribute such Executable Form under the terms of this
- License, or sublicense it under different terms, provided that the
- license for the Executable Form does not attempt to limit or alter the
- recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
- You may create and distribute a Larger Work under terms of Your choice,
- provided that You also comply with the requirements of this License for
- the Covered Software. If the Larger Work is a combination of Covered
- Software with a work governed by one or more Secondary Licenses, and the
- Covered Software is not Incompatible With Secondary Licenses, this
- License permits You to additionally distribute such Covered Software
- under the terms of such Secondary License(s), so that the recipient of
- the Larger Work may, at their option, further distribute the Covered
- Software under the terms of either this License or such Secondary
- License(s).
-
-3.4. Notices
-
- You may not remove or alter the substance of any license notices
- (including copyright notices, patent notices, disclaimers of warranty, or
- limitations of liability) contained within the Source Code Form of the
- Covered Software, except that You may alter any license notices to the
- extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
- You may choose to offer, and to charge a fee for, warranty, support,
- indemnity or liability obligations to one or more recipients of Covered
- Software. However, You may do so only on Your own behalf, and not on
- behalf of any Contributor. You must make it absolutely clear that any
- such warranty, support, indemnity, or liability obligation is offered by
- You alone, and You hereby agree to indemnify every Contributor for any
- liability incurred by such Contributor as a result of warranty, support,
- indemnity or liability terms You offer. You may include additional
- disclaimers of warranty and limitations of liability specific to any
- jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
- If it is impossible for You to comply with any of the terms of this License
- with respect to some or all of the Covered Software due to statute,
- judicial order, or regulation then You must: (a) comply with the terms of
- this License to the maximum extent possible; and (b) describe the
- limitations and the code they affect. Such description must be placed in a
- text file included with all distributions of the Covered Software under
- this License. Except to the extent prohibited by statute or regulation,
- such description must be sufficiently detailed for a recipient of ordinary
- skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
- fail to comply with any of its terms. However, if You become compliant,
- then the rights granted under this License from a particular Contributor
- are reinstated (a) provisionally, unless and until such Contributor
- explicitly and finally terminates Your grants, and (b) on an ongoing
- basis, if such Contributor fails to notify You of the non-compliance by
- some reasonable means prior to 60 days after You have come back into
- compliance. Moreover, Your grants from a particular Contributor are
- reinstated on an ongoing basis if such Contributor notifies You of the
- non-compliance by some reasonable means, this is the first time You have
- received notice of non-compliance with this License from such
- Contributor, and You become compliant prior to 30 days after Your receipt
- of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
- infringement claim (excluding declaratory judgment actions,
- counter-claims, and cross-claims) alleging that a Contributor Version
- directly or indirectly infringes any patent, then the rights granted to
- You by any and all Contributors for the Covered Software under Section
- 2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
- license agreements (excluding distributors and resellers) which have been
- validly granted by You or Your distributors under this License prior to
- termination shall survive termination.
-
-6. Disclaimer of Warranty
-
- Covered Software is provided under this License on an "as is" basis,
- without warranty of any kind, either expressed, implied, or statutory,
- including, without limitation, warranties that the Covered Software is free
- of defects, merchantable, fit for a particular purpose or non-infringing.
- The entire risk as to the quality and performance of the Covered Software
- is with You. Should any Covered Software prove defective in any respect,
- You (not any Contributor) assume the cost of any necessary servicing,
- repair, or correction. This disclaimer of warranty constitutes an essential
- part of this License. No use of any Covered Software is authorized under
- this License except under this disclaimer.
-
-7. Limitation of Liability
-
- Under no circumstances and under no legal theory, whether tort (including
- negligence), contract, or otherwise, shall any Contributor, or anyone who
- distributes Covered Software as permitted above, be liable to You for any
- direct, indirect, special, incidental, or consequential damages of any
- character including, without limitation, damages for lost profits, loss of
- goodwill, work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses, even if such party shall have been
- informed of the possibility of such damages. This limitation of liability
- shall not apply to liability for death or personal injury resulting from
- such party's negligence to the extent applicable law prohibits such
- limitation. Some jurisdictions do not allow the exclusion or limitation of
- incidental or consequential damages, so this exclusion and limitation may
- not apply to You.
-
-8. Litigation
-
- Any litigation relating to this License may be brought only in the courts
- of a jurisdiction where the defendant maintains its principal place of
- business and such litigation shall be governed by laws of that
- jurisdiction, without reference to its conflict-of-law provisions. Nothing
- in this Section shall prevent a party's ability to bring cross-claims or
- counter-claims.
-
-9. Miscellaneous
-
- This License represents the complete agreement concerning the subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. Any law or regulation which provides that
- the language of a contract shall be construed against the drafter shall not
- be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
- Mozilla Foundation is the license steward. Except as provided in Section
- 10.3, no one other than the license steward has the right to modify or
- publish new versions of this License. Each version will be given a
- distinguishing version number.
-
-10.2. Effect of New Versions
-
- You may distribute the Covered Software under the terms of the version
- of the License under which You originally received the Covered Software,
- or under the terms of any subsequent version published by the license
- steward.
-
-10.3. Modified Versions
-
- If you create software not governed by this License, and you want to
- create a new license for such software, you may create and use a
- modified version of this License if you rename the license and remove
- any references to the name of the license steward (except to note that
- such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
- Licenses If You choose to distribute Source Code Form that is
- Incompatible With Secondary Licenses under the terms of this version of
- the License, the notice described in Exhibit B of this License must be
- attached.
-
-Exhibit A - Source Code Form License Notice
-
- This Source Code Form is subject to the
- terms of the Mozilla Public License, v.
- 2.0. If a copy of the MPL was not
- distributed with this file, You can
- obtain one at
- http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
- This Source Code Form is "Incompatible
- With Secondary Licenses", as defined by
- the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/README.md b/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/README.md
deleted file mode 100644
index 036e5313fc..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# cleanhttp
-
-Functions for accessing "clean" Go http.Client values
-
--------------
-
-The Go standard library contains a default `http.Client` called
-`http.DefaultClient`. It is a common idiom in Go code to start with
-`http.DefaultClient` and tweak it as necessary, and in fact, this is
-encouraged; from the `http` package documentation:
-
-> The Client's Transport typically has internal state (cached TCP connections),
-so Clients should be reused instead of created as needed. Clients are safe for
-concurrent use by multiple goroutines.
-
-Unfortunately, this is a shared value, and it is not uncommon for libraries to
-assume that they are free to modify it at will. With enough dependencies, it
-can be very easy to encounter strange problems and race conditions due to
-manipulation of this shared value across libraries and goroutines (clients are
-safe for concurrent use, but writing values to the client struct itself is not
-protected).
-
-Making things worse is the fact that a bare `http.Client` will use a default
-`http.Transport` called `http.DefaultTransport`, which is another global value
-that behaves the same way. So it is not simply enough to replace
-`http.DefaultClient` with `&http.Client{}`.
-
-This repository provides some simple functions to get a "clean" `http.Client`
--- one that uses the same default values as the Go standard library, but
-returns a client that does not share any state with other clients.
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/cleanhttp.go
deleted file mode 100644
index c692e23f46..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp/cleanhttp.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package cleanhttp
-
-import (
- "net"
- "net/http"
- "runtime"
- "time"
-)
-
-// DefaultTransport returns a new http.Transport with the same default values
-// as http.DefaultTransport
-func DefaultTransport() *http.Transport {
- transport := &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- TLSHandshakeTimeout: 10 * time.Second,
- }
- SetTransportFinalizer(transport)
- return transport
-}
-
-// DefaultClient returns a new http.Client with the same default values as
-// http.Client, but with a non-shared Transport
-func DefaultClient() *http.Client {
- return &http.Client{
- Transport: DefaultTransport(),
- }
-}
-
-// SetTransportFinalizer sets a finalizer on the transport to ensure that
-// idle connections are closed prior to garbage collection; otherwise
-// these may leak
-func SetTransportFinalizer(transport *http.Transport) {
- runtime.SetFinalizer(&transport, func(t **http.Transport) {
- (*t).CloseIdleConnections()
- })
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS b/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS
deleted file mode 100644
index edbe200669..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS
+++ /dev/null
@@ -1,2 +0,0 @@
-Tianon Gravi (@tianon)
-Aleksa Sarai (@cyphar)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup.go
deleted file mode 100644
index 6f8a982ff7..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package user
-
-import (
- "errors"
- "fmt"
- "syscall"
-)
-
-var (
- // The current operating system does not provide the required data for user lookups.
- ErrUnsupported = errors.New("user lookup: operating system does not provide passwd-formatted data")
-)
-
-func lookupUser(filter func(u User) bool) (User, error) {
- // Get operating system-specific passwd reader-closer.
- passwd, err := GetPasswd()
- if err != nil {
- return User{}, err
- }
- defer passwd.Close()
-
- // Get the users.
- users, err := ParsePasswdFilter(passwd, filter)
- if err != nil {
- return User{}, err
- }
-
- // No user entries found.
- if len(users) == 0 {
- return User{}, fmt.Errorf("no matching entries in passwd file")
- }
-
- // Assume the first entry is the "correct" one.
- return users[0], nil
-}
-
-// CurrentUser looks up the current user by their user id in /etc/passwd. If the
-// user cannot be found (or there is no /etc/passwd file on the filesystem),
-// then CurrentUser returns an error.
-func CurrentUser() (User, error) {
- return LookupUid(syscall.Getuid())
-}
-
-// LookupUser looks up a user by their username in /etc/passwd. If the user
-// cannot be found (or there is no /etc/passwd file on the filesystem), then
-// LookupUser returns an error.
-func LookupUser(username string) (User, error) {
- return lookupUser(func(u User) bool {
- return u.Name == username
- })
-}
-
-// LookupUid looks up a user by their user id in /etc/passwd. If the user cannot
-// be found (or there is no /etc/passwd file on the filesystem), then LookupId
-// returns an error.
-func LookupUid(uid int) (User, error) {
- return lookupUser(func(u User) bool {
- return u.Uid == uid
- })
-}
-
-func lookupGroup(filter func(g Group) bool) (Group, error) {
- // Get operating system-specific group reader-closer.
- group, err := GetGroup()
- if err != nil {
- return Group{}, err
- }
- defer group.Close()
-
- // Get the users.
- groups, err := ParseGroupFilter(group, filter)
- if err != nil {
- return Group{}, err
- }
-
- // No user entries found.
- if len(groups) == 0 {
- return Group{}, fmt.Errorf("no matching entries in group file")
- }
-
- // Assume the first entry is the "correct" one.
- return groups[0], nil
-}
-
-// CurrentGroup looks up the current user's group by their primary group id's
-// entry in /etc/passwd. If the group cannot be found (or there is no
-// /etc/group file on the filesystem), then CurrentGroup returns an error.
-func CurrentGroup() (Group, error) {
- return LookupGid(syscall.Getgid())
-}
-
-// LookupGroup looks up a group by its name in /etc/group. If the group cannot
-// be found (or there is no /etc/group file on the filesystem), then LookupGroup
-// returns an error.
-func LookupGroup(groupname string) (Group, error) {
- return lookupGroup(func(g Group) bool {
- return g.Name == groupname
- })
-}
-
-// LookupGid looks up a group by its group id in /etc/group. If the group cannot
-// be found (or there is no /etc/group file on the filesystem), then LookupGid
-// returns an error.
-func LookupGid(gid int) (Group, error) {
- return lookupGroup(func(g Group) bool {
- return g.Gid == gid
- })
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go
deleted file mode 100644
index 758b734c22..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package user
-
-import (
- "io"
- "os"
-)
-
-// Unix-specific path to the passwd and group formatted files.
-const (
- unixPasswdPath = "/etc/passwd"
- unixGroupPath = "/etc/group"
-)
-
-func GetPasswdPath() (string, error) {
- return unixPasswdPath, nil
-}
-
-func GetPasswd() (io.ReadCloser, error) {
- return os.Open(unixPasswdPath)
-}
-
-func GetGroupPath() (string, error) {
- return unixGroupPath, nil
-}
-
-func GetGroup() (io.ReadCloser, error) {
- return os.Open(unixGroupPath)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go
deleted file mode 100644
index 7217948870..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
-
-package user
-
-import "io"
-
-func GetPasswdPath() (string, error) {
- return "", ErrUnsupported
-}
-
-func GetPasswd() (io.ReadCloser, error) {
- return nil, ErrUnsupported
-}
-
-func GetGroupPath() (string, error) {
- return "", ErrUnsupported
-}
-
-func GetGroup() (io.ReadCloser, error) {
- return nil, ErrUnsupported
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/user.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/user.go
deleted file mode 100644
index e6375ea4dd..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/user.go
+++ /dev/null
@@ -1,418 +0,0 @@
-package user
-
-import (
- "bufio"
- "fmt"
- "io"
- "os"
- "strconv"
- "strings"
-)
-
-const (
- minId = 0
- maxId = 1<<31 - 1 //for 32-bit systems compatibility
-)
-
-var (
- ErrRange = fmt.Errorf("Uids and gids must be in range %d-%d", minId, maxId)
-)
-
-type User struct {
- Name string
- Pass string
- Uid int
- Gid int
- Gecos string
- Home string
- Shell string
-}
-
-type Group struct {
- Name string
- Pass string
- Gid int
- List []string
-}
-
-func parseLine(line string, v ...interface{}) {
- if line == "" {
- return
- }
-
- parts := strings.Split(line, ":")
- for i, p := range parts {
- if len(v) <= i {
- // if we have more "parts" than we have places to put them, bail for great "tolerance" of naughty configuration files
- break
- }
-
- switch e := v[i].(type) {
- case *string:
- // "root", "adm", "/bin/bash"
- *e = p
- case *int:
- // "0", "4", "1000"
- // ignore string to int conversion errors, for great "tolerance" of naughty configuration files
- *e, _ = strconv.Atoi(p)
- case *[]string:
- // "", "root", "root,adm,daemon"
- if p != "" {
- *e = strings.Split(p, ",")
- } else {
- *e = []string{}
- }
- default:
- // panic, because this is a programming/logic error, not a runtime one
- panic("parseLine expects only pointers! argument " + strconv.Itoa(i) + " is not a pointer!")
- }
- }
-}
-
-func ParsePasswdFile(path string) ([]User, error) {
- passwd, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- defer passwd.Close()
- return ParsePasswd(passwd)
-}
-
-func ParsePasswd(passwd io.Reader) ([]User, error) {
- return ParsePasswdFilter(passwd, nil)
-}
-
-func ParsePasswdFileFilter(path string, filter func(User) bool) ([]User, error) {
- passwd, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- defer passwd.Close()
- return ParsePasswdFilter(passwd, filter)
-}
-
-func ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) {
- if r == nil {
- return nil, fmt.Errorf("nil source for passwd-formatted data")
- }
-
- var (
- s = bufio.NewScanner(r)
- out = []User{}
- )
-
- for s.Scan() {
- if err := s.Err(); err != nil {
- return nil, err
- }
-
- text := strings.TrimSpace(s.Text())
- if text == "" {
- continue
- }
-
- // see: man 5 passwd
- // name:password:UID:GID:GECOS:directory:shell
- // Name:Pass:Uid:Gid:Gecos:Home:Shell
- // root:x:0:0:root:/root:/bin/bash
- // adm:x:3:4:adm:/var/adm:/bin/false
- p := User{}
- parseLine(
- text,
- &p.Name, &p.Pass, &p.Uid, &p.Gid, &p.Gecos, &p.Home, &p.Shell,
- )
-
- if filter == nil || filter(p) {
- out = append(out, p)
- }
- }
-
- return out, nil
-}
-
-func ParseGroupFile(path string) ([]Group, error) {
- group, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- defer group.Close()
- return ParseGroup(group)
-}
-
-func ParseGroup(group io.Reader) ([]Group, error) {
- return ParseGroupFilter(group, nil)
-}
-
-func ParseGroupFileFilter(path string, filter func(Group) bool) ([]Group, error) {
- group, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- defer group.Close()
- return ParseGroupFilter(group, filter)
-}
-
-func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) {
- if r == nil {
- return nil, fmt.Errorf("nil source for group-formatted data")
- }
-
- var (
- s = bufio.NewScanner(r)
- out = []Group{}
- )
-
- for s.Scan() {
- if err := s.Err(); err != nil {
- return nil, err
- }
-
- text := s.Text()
- if text == "" {
- continue
- }
-
- // see: man 5 group
- // group_name:password:GID:user_list
- // Name:Pass:Gid:List
- // root:x:0:root
- // adm:x:4:root,adm,daemon
- p := Group{}
- parseLine(
- text,
- &p.Name, &p.Pass, &p.Gid, &p.List,
- )
-
- if filter == nil || filter(p) {
- out = append(out, p)
- }
- }
-
- return out, nil
-}
-
-type ExecUser struct {
- Uid, Gid int
- Sgids []int
- Home string
-}
-
-// GetExecUserPath is a wrapper for GetExecUser. It reads data from each of the
-// given file paths and uses that data as the arguments to GetExecUser. If the
-// files cannot be opened for any reason, the error is ignored and a nil
-// io.Reader is passed instead.
-func GetExecUserPath(userSpec string, defaults *ExecUser, passwdPath, groupPath string) (*ExecUser, error) {
- passwd, err := os.Open(passwdPath)
- if err != nil {
- passwd = nil
- } else {
- defer passwd.Close()
- }
-
- group, err := os.Open(groupPath)
- if err != nil {
- group = nil
- } else {
- defer group.Close()
- }
-
- return GetExecUser(userSpec, defaults, passwd, group)
-}
-
-// GetExecUser parses a user specification string (using the passwd and group
-// readers as sources for /etc/passwd and /etc/group data, respectively). In
-// the case of blank fields or missing data from the sources, the values in
-// defaults is used.
-//
-// GetExecUser will return an error if a user or group literal could not be
-// found in any entry in passwd and group respectively.
-//
-// Examples of valid user specifications are:
-// * ""
-// * "user"
-// * "uid"
-// * "user:group"
-// * "uid:gid
-// * "user:gid"
-// * "uid:group"
-func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) (*ExecUser, error) {
- var (
- userArg, groupArg string
- name string
- )
-
- if defaults == nil {
- defaults = new(ExecUser)
- }
-
- // Copy over defaults.
- user := &ExecUser{
- Uid: defaults.Uid,
- Gid: defaults.Gid,
- Sgids: defaults.Sgids,
- Home: defaults.Home,
- }
-
- // Sgids slice *cannot* be nil.
- if user.Sgids == nil {
- user.Sgids = []int{}
- }
-
- // allow for userArg to have either "user" syntax, or optionally "user:group" syntax
- parseLine(userSpec, &userArg, &groupArg)
-
- users, err := ParsePasswdFilter(passwd, func(u User) bool {
- if userArg == "" {
- return u.Uid == user.Uid
- }
- return u.Name == userArg || strconv.Itoa(u.Uid) == userArg
- })
- if err != nil && passwd != nil {
- if userArg == "" {
- userArg = strconv.Itoa(user.Uid)
- }
- return nil, fmt.Errorf("Unable to find user %v: %v", userArg, err)
- }
-
- haveUser := users != nil && len(users) > 0
- if haveUser {
- // if we found any user entries that matched our filter, let's take the first one as "correct"
- name = users[0].Name
- user.Uid = users[0].Uid
- user.Gid = users[0].Gid
- user.Home = users[0].Home
- } else if userArg != "" {
- // we asked for a user but didn't find them... let's check to see if we wanted a numeric user
- user.Uid, err = strconv.Atoi(userArg)
- if err != nil {
- // not numeric - we have to bail
- return nil, fmt.Errorf("Unable to find user %v", userArg)
- }
-
- // Must be inside valid uid range.
- if user.Uid < minId || user.Uid > maxId {
- return nil, ErrRange
- }
-
- // if userArg couldn't be found in /etc/passwd but is numeric, just roll with it - this is legit
- }
-
- if groupArg != "" || name != "" {
- groups, err := ParseGroupFilter(group, func(g Group) bool {
- // Explicit group format takes precedence.
- if groupArg != "" {
- return g.Name == groupArg || strconv.Itoa(g.Gid) == groupArg
- }
-
- // Check if user is a member.
- for _, u := range g.List {
- if u == name {
- return true
- }
- }
-
- return false
- })
- if err != nil && group != nil {
- return nil, fmt.Errorf("Unable to find groups for user %v: %v", users[0].Name, err)
- }
-
- haveGroup := groups != nil && len(groups) > 0
- if groupArg != "" {
- if haveGroup {
- // if we found any group entries that matched our filter, let's take the first one as "correct"
- user.Gid = groups[0].Gid
- } else {
- // we asked for a group but didn't find id... let's check to see if we wanted a numeric group
- user.Gid, err = strconv.Atoi(groupArg)
- if err != nil {
- // not numeric - we have to bail
- return nil, fmt.Errorf("Unable to find group %v", groupArg)
- }
-
- // Ensure gid is inside gid range.
- if user.Gid < minId || user.Gid > maxId {
- return nil, ErrRange
- }
-
- // if groupArg couldn't be found in /etc/group but is numeric, just roll with it - this is legit
- }
- } else if haveGroup {
- // If implicit group format, fill supplementary gids.
- user.Sgids = make([]int, len(groups))
- for i, group := range groups {
- user.Sgids[i] = group.Gid
- }
- }
- }
-
- return user, nil
-}
-
-// GetAdditionalGroups looks up a list of groups by name or group id
-// against the given /etc/group formatted data. If a group name cannot
-// be found, an error will be returned. If a group id cannot be found,
-// or the given group data is nil, the id will be returned as-is
-// provided it is in the legal range.
-func GetAdditionalGroups(additionalGroups []string, group io.Reader) ([]int, error) {
- var groups = []Group{}
- if group != nil {
- var err error
- groups, err = ParseGroupFilter(group, func(g Group) bool {
- for _, ag := range additionalGroups {
- if g.Name == ag || strconv.Itoa(g.Gid) == ag {
- return true
- }
- }
- return false
- })
- if err != nil {
- return nil, fmt.Errorf("Unable to find additional groups %v: %v", additionalGroups, err)
- }
- }
-
- gidMap := make(map[int]struct{})
- for _, ag := range additionalGroups {
- var found bool
- for _, g := range groups {
- // if we found a matched group either by name or gid, take the
- // first matched as correct
- if g.Name == ag || strconv.Itoa(g.Gid) == ag {
- if _, ok := gidMap[g.Gid]; !ok {
- gidMap[g.Gid] = struct{}{}
- found = true
- break
- }
- }
- }
- // we asked for a group but didn't find it. let's check to see
- // if we wanted a numeric group
- if !found {
- gid, err := strconv.Atoi(ag)
- if err != nil {
- return nil, fmt.Errorf("Unable to find group %s", ag)
- }
- // Ensure gid is inside gid range.
- if gid < minId || gid > maxId {
- return nil, ErrRange
- }
- gidMap[gid] = struct{}{}
- }
- }
- gids := []int{}
- for gid := range gidMap {
- gids = append(gids, gid)
- }
- return gids, nil
-}
-
-// GetAdditionalGroupsPath is a wrapper around GetAdditionalGroups
-// that opens the groupPath given and gives it as an argument to
-// GetAdditionalGroups.
-func GetAdditionalGroupsPath(additionalGroups []string, groupPath string) ([]int, error) {
- group, err := os.Open(groupPath)
- if err == nil {
- defer group.Close()
- }
- return GetAdditionalGroups(additionalGroups, group)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm.s
deleted file mode 100644
index 8ed2fdb94b..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·use(SB),NOSPLIT,$0
- RET
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a7278319e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d506..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e0174371..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_dragonfly_386.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_dragonfly_386.s
deleted file mode 100644
index 7e55e0d317..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_dragonfly_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-32
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-44
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-56
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-32
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index d5ed6726cc..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-64
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-88
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-112
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-64
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_386.s
deleted file mode 100644
index c9a0a26015..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 35172477c8..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c875bf..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_386.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_386.s
deleted file mode 100644
index 4db2909323..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_386.s
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for 386, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- JMP syscall·socketcall(SB)
-
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
- JMP syscall·rawsocketcall(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-28
- JMP syscall·seek(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_amd64.s
deleted file mode 100644
index 44e25c62f9..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for AMD64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·gettimeofday(SB),NOSPLIT,$0-16
- JMP syscall·gettimeofday(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_arm.s
deleted file mode 100644
index cf0b574658..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for arm, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-32
- B syscall·seek(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_arm64.s
deleted file mode 100644
index 4be9bfedea..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_linux_arm64.s
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build arm64
-// +build !gccgo
-
-#include "textflag.h"
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index 48bdcd7632..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_netbsd_amd64.s
deleted file mode 100644
index 2ede05c72f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3c83..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 790ef77f86..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_solaris_amd64.s
deleted file mode 100644
index 43ed17a05f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
-//
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-64
- JMP syscall·sysvicall6(SB)
-
-TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
- JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/constants.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/constants.go
deleted file mode 100644
index a96f0ebc26..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/constants.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-const (
- R_OK = 0x4
- W_OK = 0x2
- X_OK = 0x1
-)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/env_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/env_unix.go
deleted file mode 100644
index 45e281a047..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/env_unix.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Unix environment variables.
-
-package unix
-
-import "syscall"
-
-func Getenv(key string) (value string, found bool) {
- return syscall.Getenv(key)
-}
-
-func Setenv(key, value string) error {
- return syscall.Setenv(key, value)
-}
-
-func Clearenv() {
- syscall.Clearenv()
-}
-
-func Environ() []string {
- return syscall.Environ()
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/env_unset.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/env_unset.go
deleted file mode 100644
index 9222262559..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/env_unset.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.4
-
-package unix
-
-import "syscall"
-
-func Unsetenv(key string) error {
- // This was added in Go 1.4.
- return syscall.Unsetenv(key)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go
deleted file mode 100644
index ce67a59528..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package unix
-
-import "unsafe"
-
-// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
-// systems by flock_linux_32bit.go to be SYS_FCNTL64.
-var fcntl64Syscall uintptr = SYS_FCNTL
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
- if errno == 0 {
- return nil
- }
- return errno
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock_linux_32bit.go
deleted file mode 100644
index 362831c3f7..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock_linux_32bit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build linux,386 linux,arm
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-func init() {
- // On 32-bit Linux systems, the fcntl syscall that matches Go's
- // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
- fcntl64Syscall = SYS_FCNTL64
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo.go
deleted file mode 100644
index 94c8232124..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package unix
-
-import "syscall"
-
-// We can't use the gc-syntax .s files for gccgo. On the plus side
-// much of the functionality can be written directly in Go.
-
-//extern gccgoRealSyscall
-func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo_c.c b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo_c.c
deleted file mode 100644
index 07f6be0392..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo_c.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-#include
-#include
-#include
-
-#define _STRINGIFY2_(x) #x
-#define _STRINGIFY_(x) _STRINGIFY2_(x)
-#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
-
-// Call syscall from C code because the gccgo support for calling from
-// Go to C does not support varargs functions.
-
-struct ret {
- uintptr_t r;
- uintptr_t err;
-};
-
-struct ret
-gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
-{
- struct ret r;
-
- errno = 0;
- r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
- r.err = errno;
- return r;
-}
-
-// Define the use function in C so that it is not inlined.
-
-extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
-
-void
-use(void *p __attribute__ ((unused)))
-{
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo_linux_amd64.go
deleted file mode 100644
index bffe1a77db..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo,linux,amd64
-
-package unix
-
-import "syscall"
-
-//extern gettimeofday
-func realGettimeofday(*Timeval, *byte) int32
-
-func gettimeofday(tv *Timeval) (err syscall.Errno) {
- r := realGettimeofday(tv, nil)
- if r < 0 {
- return syscall.GetErrno()
- }
- return 0
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkall.sh b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkall.sh
deleted file mode 100644
index de95a4bbcf..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkall.sh
+++ /dev/null
@@ -1,274 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# The unix package provides access to the raw system call
-# interface of the underlying operating system. Porting Go to
-# a new architecture/operating system combination requires
-# some manual effort, though there are tools that automate
-# much of the process. The auto-generated files have names
-# beginning with z.
-#
-# This script runs or (given -n) prints suggested commands to generate z files
-# for the current system. Running those commands is not automatic.
-# This script is documentation more than anything else.
-#
-# * asm_${GOOS}_${GOARCH}.s
-#
-# This hand-written assembly file implements system call dispatch.
-# There are three entry points:
-#
-# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-#
-# The first and second are the standard ones; they differ only in
-# how many arguments can be passed to the kernel.
-# The third is for low-level use by the ForkExec wrapper;
-# unlike the first two, it does not call into the scheduler to
-# let it know that a system call is running.
-#
-# * syscall_${GOOS}.go
-#
-# This hand-written Go file implements system calls that need
-# special handling and lists "//sys" comments giving prototypes
-# for ones that can be auto-generated. Mksyscall reads those
-# comments to generate the stubs.
-#
-# * syscall_${GOOS}_${GOARCH}.go
-#
-# Same as syscall_${GOOS}.go except that it contains code specific
-# to ${GOOS} on one particular architecture.
-#
-# * types_${GOOS}.c
-#
-# This hand-written C file includes standard C headers and then
-# creates typedef or enum names beginning with a dollar sign
-# (use of $ in variable names is a gcc extension). The hardest
-# part about preparing this file is figuring out which headers to
-# include and which symbols need to be #defined to get the
-# actual data structures that pass through to the kernel system calls.
-# Some C libraries present alternate versions for binary compatibility
-# and translate them on the way in and out of system calls, but
-# there is almost always a #define that can get the real ones.
-# See types_darwin.c and types_linux.c for examples.
-#
-# * zerror_${GOOS}_${GOARCH}.go
-#
-# This machine-generated file defines the system's error numbers,
-# error strings, and signal numbers. The generator is "mkerrors.sh".
-# Usually no arguments are needed, but mkerrors.sh will pass its
-# arguments on to godefs.
-#
-# * zsyscall_${GOOS}_${GOARCH}.go
-#
-# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
-#
-# * zsysnum_${GOOS}_${GOARCH}.go
-#
-# Generated by mksysnum_${GOOS}.
-#
-# * ztypes_${GOOS}_${GOARCH}.go
-#
-# Generated by godefs; see types_${GOOS}.c above.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-
-case "$1" in
--syscalls)
- for i in zsyscall*go
- do
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
- rm _$i
- done
- exit 0
- ;;
--n)
- run="cat"
- shift
-esac
-
-case "$#" in
-0)
- ;;
-*)
- echo 'usage: mkall.sh [-n]' 1>&2
- exit 2
-esac
-
-GOOSARCH_in=syscall_$GOOSARCH.go
-case "$GOOSARCH" in
-_* | *_ | _)
- echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
- exit 1
- ;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm)
- mkerrors="$mkerrors"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be singed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_amd64)
- unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm64)
- unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mksysnum="./mksysnum_linux.pl $unistd_h"
- # Let the type of C char be singed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_ppc64)
- GOOSARCH_in=syscall_linux_ppc64x.go
- unistd_h=/usr/include/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_ppc64le)
- GOOSARCH_in=syscall_linux_ppc64x.go
- unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-solaris_amd64)
- mksyscall="./mksyscall_solaris.pl"
- mkerrors="$mkerrors -m64"
- mksysnum=
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-*)
- echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
- exit 1
- ;;
-esac
-
-(
- if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
- case "$GOOS" in
- *)
- syscall_goos="syscall_$GOOS.go"
- case "$GOOS" in
- darwin | dragonfly | freebsd | netbsd | openbsd)
- syscall_goos="syscall_bsd.go $syscall_goos"
- ;;
- esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
- esac
- if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
- if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
- if [ -n "$mktypes" ]; then
- echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go";
- echo "$mktypes types_$GOOS.go | gofmt >>ztypes_$GOOSARCH.go";
- fi
-) | $run
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkerrors.sh b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkerrors.sh
deleted file mode 100644
index c40d788c4a..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkerrors.sh
+++ /dev/null
@@ -1,476 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Generate Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-if test -z "$GOARCH" -o -z "$GOOS"; then
- echo 1>&2 "GOARCH or GOOS not defined in environment"
- exit 1
-fi
-
-CC=${CC:-cc}
-
-if [[ "$GOOS" -eq "solaris" ]]; then
- # Assumes GNU versions of utilities in PATH.
- export PATH=/usr/gnu/bin:$PATH
-fi
-
-uname=$(uname)
-
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-includes_DragonFly='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-includes_FreeBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#ifndef __LP64__
-#define _FILE_OFFSET_BITS 64
-#endif
-#define _GNU_SOURCE
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN 0x20000000
-#endif
-
-#ifndef PTRACE_GETREGS
-#define PTRACE_GETREGS 0xc
-#endif
-
-#ifndef PTRACE_SETREGS
-#define PTRACE_SETREGS 0xd
-#endif
-'
-
-includes_NetBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Needed since refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED 0x1
-#define EMUL_NATIVE 0x2
-#define IPV6_FAITH 0x1d
-#define IPV6_OPTIONS 0x1
-#define IPV6_RTHDR_STRICT 0x1
-#define IPV6_SOCKOPT_RESERVED1 0x3
-#define SIOCGIFGENERIC 0xc020693a
-#define SIOCSIFGENERIC 0x80206939
-#define WALTSIG 0x4
-'
-
-includes_SunOS='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-
-includes='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-ccflags="$@"
-
-# Write go tool cgo -godefs input.
-(
- echo package unix
- echo
- echo '/*'
- indirect="includes_$(uname)"
- echo "${!indirect} $includes"
- echo '*/'
- echo 'import "C"'
- echo 'import "syscall"'
- echo
- echo 'const ('
-
- # The gcc command line prints all the #defines
- # it encounters while processing the input
- echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
- awk '
- $1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
-
- $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
- $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
- $2 ~ /^(SCM_SRCRT)$/ {next}
- $2 ~ /^(MAP_FAILED)$/ {next}
- $2 ~ /^ELF_.*$/ {next}# contains ELF_ARCH, etc.
-
- $2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
- $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
-
- $2 !~ /^ETH_/ &&
- $2 !~ /^EPROC_/ &&
- $2 !~ /^EQUIV_/ &&
- $2 !~ /^EXPR_/ &&
- $2 ~ /^E[A-Z0-9_]+$/ ||
- $2 ~ /^B[0-9_]+$/ ||
- $2 == "BOTHER" ||
- $2 ~ /^CI?BAUD(EX)?$/ ||
- $2 == "IBSHIFT" ||
- $2 ~ /^V[A-Z0-9]+$/ ||
- $2 ~ /^CS[A-Z0-9]/ ||
- $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
- $2 ~ /^IGN/ ||
- $2 ~ /^IX(ON|ANY|OFF)$/ ||
- $2 ~ /^IN(LCR|PCK)$/ ||
- $2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
- $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||
- $2 == "BRKINT" ||
- $2 == "HUPCL" ||
- $2 == "PENDIN" ||
- $2 == "TOSTOP" ||
- $2 == "XCASE" ||
- $2 == "ALTWERASE" ||
- $2 == "NOKERNINFO" ||
- $2 ~ /^PAR/ ||
- $2 ~ /^SIG[^_]/ ||
- $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
- $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
- $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
- $2 ~ /^O?XTABS$/ ||
- $2 ~ /^TC[IO](ON|OFF)$/ ||
- $2 ~ /^IN_/ ||
- $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
- $2 == "ICMPV6_FILTER" ||
- $2 == "SOMAXCONN" ||
- $2 == "NAME_MAX" ||
- $2 == "IFNAMSIZ" ||
- $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
- $2 ~ /^SYSCTL_VERS/ ||
- $2 ~ /^(MS|MNT)_/ ||
- $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
- $2 ~ /^LINUX_REBOOT_CMD_/ ||
- $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
- $2 !~ "NLA_TYPE_MASK" &&
- $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
- $2 ~ /^SIOC/ ||
- $2 ~ /^TIOC/ ||
- $2 ~ /^TCGET/ ||
- $2 ~ /^TCSET/ ||
- $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
- $2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
- $2 ~ /^BIOC/ ||
- $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
- $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
- $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
- $2 ~ /^CLONE_[A-Z_]+/ ||
- $2 !~ /^(BPF_TIMEVAL)$/ &&
- $2 ~ /^(BPF|DLT)_/ ||
- $2 ~ /^CLOCK_/ ||
- $2 !~ "WMESGLEN" &&
- $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
- $2 ~ /^__WCOREFLAG$/ {next}
- $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
-
- {next}
- ' | sort
-
- echo ')'
-) >_const.go
-
-# Pull out the error names for later.
-errors=$(
- echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
- sort
-)
-
-# Pull out the signal names for later.
-signals=$(
- echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort
-)
-
-# Again, writing regexps to a file.
-echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
- sort >_error.grep
-echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort >_signal.grep
-
-echo '// mkerrors.sh' "$@"
-echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
-echo
-echo "// +build ${GOARCH},${GOOS}"
-echo
-go tool cgo -godefs -- "$@" _const.go >_error.out
-cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
-echo
-echo '// Errors'
-echo 'const ('
-cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/'
-echo ')'
-
-echo
-echo '// Signals'
-echo 'const ('
-cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/'
-echo ')'
-
-# Run C program to print error and syscall strings.
-(
- echo -E "
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
-
-int errors[] = {
-"
- for i in $errors
- do
- echo -E ' '$i,
- done
-
- echo -E "
-};
-
-int signals[] = {
-"
- for i in $signals
- do
- echo -E ' '$i,
- done
-
- # Use -E because on some systems bash builtin interprets \n itself.
- echo -E '
-};
-
-static int
-intcmp(const void *a, const void *b)
-{
- return *(int*)a - *(int*)b;
-}
-
-int
-main(void)
-{
- int i, j, e;
- char buf[1024], *p;
-
- printf("\n\n// Error table\n");
- printf("var errors = [...]string {\n");
- qsort(errors, nelem(errors), sizeof errors[0], intcmp);
- for(i=0; i 0 && errors[i-1] == e)
- continue;
- strcpy(buf, strerror(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- printf("\n\n// Signal table\n");
- printf("var signals = [...]string {\n");
- qsort(signals, nelem(signals), sizeof signals[0], intcmp);
- for(i=0; i 0 && signals[i-1] == e)
- continue;
- strcpy(buf, strsignal(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- // cut trailing : number.
- p = strrchr(buf, ":"[0]);
- if(p)
- *p = '\0';
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- return 0;
-}
-
-'
-) >_errors.c
-
-$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall.pl
deleted file mode 100644
index b1e7766dae..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall.pl
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This program reads a file containing function prototypes
-# (like syscall_darwin.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named errno.
-
-# A line beginning with //sysnb is like //sys, except that the
-# goroutine will not be suspended during the execution of the system
-# call. This must only be used for system calls which can never
-# block, as otherwise the system call could cause all goroutines to
-# hang.
-
-use strict;
-
-my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-my $plan9 = 0;
-my $openbsd = 0;
-my $netbsd = 0;
-my $dragonfly = 0;
-my $arm = 0; # 64-bit value should use (even, odd)-pair
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-if($ARGV[0] eq "-plan9") {
- $plan9 = 1;
- shift;
-}
-if($ARGV[0] eq "-openbsd") {
- $openbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-netbsd") {
- $netbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-dragonfly") {
- $dragonfly = 1;
- shift;
-}
-if($ARGV[0] eq "-arm") {
- $arm = 1;
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
- exit 1;
-}
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $text = "";
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, errno error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # Try in vain to keep people from editing this file.
- # The theory is that they jump into the middle of the file
- # without reading the header.
- $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
-
- # Go function header.
- my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my @uses = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, _ = BytePtrFromString($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass dummy pointer in that case.
- # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
- $text .= "\tvar _p$n unsafe.Pointer\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
- $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
- $text .= "\n";
- push @args, "uintptr(_p$n)", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && ($openbsd || $netbsd)) {
- push @args, "0";
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $dragonfly) {
- if ($func !~ /^extp(read|write)/i) {
- push @args, "0";
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $_32bit ne "") {
- if(@args % 2 && $arm) {
- # arm abi specifies 64-bit argument uses
- # (even, odd) pair
- push @args, "0"
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- }
- } else {
- push @args, "uintptr($name)";
- }
- }
-
- # Determine which form to use; pad args with zeros.
- my $asm = "Syscall";
- if ($nonblock) {
- $asm = "RawSyscall";
- }
- if(@args <= 3) {
- while(@args < 3) {
- push @args, "0";
- }
- } elsif(@args <= 6) {
- $asm .= "6";
- while(@args < 6) {
- push @args, "0";
- }
- } elsif(@args <= 9) {
- $asm .= "9";
- while(@args < 9) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # System call number.
- if($sysname eq "") {
- $sysname = "SYS_$func";
- $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
- $sysname =~ y/a-z/A-Z/;
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm($sysname, $args)";
-
- # Assign return values.
- my $body = "";
- my @ret = ("_", "_", "_");
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err" && !$plan9) {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } elsif($name eq "err" && $plan9) {
- $ret[0] = "r0";
- $ret[2] = "e1";
- next;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1" || $plan9) {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
- $text .= $body;
-
- if ($plan9 && $ret[2] eq "e1") {
- $text .= "\tif int32(r0) == -1 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- } elsif ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = errnoErr(e1)\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n\n";
-}
-
-chomp $text;
-chomp $text;
-
-if($errors) {
- exit 1;
-}
-
-print <) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- $package = $1 if !$package && /^package (\S+)$/;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, err error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # So file name.
- if($modname eq "") {
- $modname = "libc";
- }
-
- # System call name.
- if($sysname eq "") {
- $sysname = "$func";
- }
-
- # System call pointer variable name.
- my $sysvarname = "proc$sysname";
-
- my $strconvfunc = "BytePtrFromString";
- my $strconvtype = "*byte";
-
- $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
-
- # Runtime import of function to allow cross-platform builds.
- $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
- # Link symbol to proc address variable.
- $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
- # Library proc address variable.
- push @vars, $sysvarname;
-
- # Go function header.
- $out = join(', ', @out);
- if($out ne "") {
- $out = " ($out)";
- }
- if($text ne "") {
- $text .= "\n"
- }
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my @uses = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, _ = $strconvfunc($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass nil in that case.
- $text .= "\tvar _p$n *$1\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && $_32bit ne "") {
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name >> 32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name >> 32)";
- }
- } elsif($type eq "bool") {
- $text .= "\tvar _p$n uint32\n";
- $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
- push @args, "uintptr(_p$n)";
- $n++;
- } else {
- push @args, "uintptr($name)";
- }
- }
- my $nargs = @args;
-
- # Determine which form to use; pad args with zeros.
- my $asm = "sysvicall6";
- if ($nonblock) {
- $asm = "rawSysvicall6";
- }
- if(@args <= 6) {
- while(@args < 6) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
-
- # Assign return values.
- my $body = "";
- my $failexpr = "";
- my @ret = ("_", "_", "_");
- my @pout= ();
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err") {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1") {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
- $text .= $body;
-
- if ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n";
-}
-
-if($errors) {
- exit 1;
-}
-
-print < "net.inet",
- "net.inet.ipproto" => "net.inet",
- "net.inet6.ipv6proto" => "net.inet6",
- "net.inet6.ipv6" => "net.inet6.ip6",
- "net.inet.icmpv6" => "net.inet6.icmp6",
- "net.inet6.divert6" => "net.inet6.divert",
- "net.inet6.tcp6" => "net.inet.tcp",
- "net.inet6.udp6" => "net.inet.udp",
- "mpls" => "net.mpls",
- "swpenc" => "vm.swapencrypt"
-);
-
-# Node mappings
-my %node_map = (
- "net.inet.ip.ifq" => "net.ifq",
- "net.inet.pfsync" => "net.pfsync",
- "net.mpls.ifq" => "net.ifq"
-);
-
-my $ctlname;
-my %mib = ();
-my %sysctl = ();
-my $node;
-
-sub debug() {
- print STDERR "$_[0]\n" if $debug;
-}
-
-# Walk the MIB and build a sysctl name to OID mapping.
-sub build_sysctl() {
- my ($node, $name, $oid) = @_;
- my %node = %{$node};
- my @oid = @{$oid};
-
- foreach my $key (sort keys %node) {
- my @node = @{$node{$key}};
- my $nodename = $name.($name ne '' ? '.' : '').$key;
- my @nodeoid = (@oid, $node[0]);
- if ($node[1] eq 'CTLTYPE_NODE') {
- if (exists $node_map{$nodename}) {
- $node = \%mib;
- $ctlname = $node_map{$nodename};
- foreach my $part (split /\./, $ctlname) {
- $node = \%{@{$$node{$part}}[2]};
- }
- } else {
- $node = $node[2];
- }
- &build_sysctl($node, $nodename, \@nodeoid);
- } elsif ($node[1] ne '') {
- $sysctl{$nodename} = \@nodeoid;
- }
- }
-}
-
-foreach my $ctl (@ctls) {
- $ctls{$ctl} = $ctl;
-}
-
-# Build MIB
-foreach my $header (@headers) {
- &debug("Processing $header...");
- open HEADER, "/usr/include/$header" ||
- print STDERR "Failed to open $header\n";
- while () {
- if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
- $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
- $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
- if ($1 eq 'CTL_NAMES') {
- # Top level.
- $node = \%mib;
- } else {
- # Node.
- my $nodename = lc($2);
- if ($header =~ /^netinet\//) {
- $ctlname = "net.inet.$nodename";
- } elsif ($header =~ /^netinet6\//) {
- $ctlname = "net.inet6.$nodename";
- } elsif ($header =~ /^net\//) {
- $ctlname = "net.$nodename";
- } else {
- $ctlname = "$nodename";
- $ctlname =~ s/^(fs|net|kern)_/$1\./;
- }
- if (exists $ctl_map{$ctlname}) {
- $ctlname = $ctl_map{$ctlname};
- }
- if (not exists $ctls{$ctlname}) {
- &debug("Ignoring $ctlname...");
- next;
- }
-
- # Walk down from the top of the MIB.
- $node = \%mib;
- foreach my $part (split /\./, $ctlname) {
- if (not exists $$node{$part}) {
- &debug("Missing node $part");
- $$node{$part} = [ 0, '', {} ];
- }
- $node = \%{@{$$node{$part}}[2]};
- }
- }
-
- # Populate current node with entries.
- my $i = -1;
- while (defined($_) && $_ !~ /^}/) {
- $_ = ;
- $i++ if $_ =~ /{.*}/;
- next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
- $$node{$1} = [ $i, $2, {} ];
- }
- }
- }
- close HEADER;
-}
-
-&build_sysctl(\%mib, "", []);
-
-print <){
- if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
- my $name = $1;
- my $num = $2;
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;"
- }
-}
-
-print <){
- if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print <){
- if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
- if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
- next
- }
-
- print " $name = $num; // $proto\n";
-
- # We keep Capsicum syscall numbers for FreeBSD
- # 9-STABLE here because we are not sure whether they
- # are mature and stable.
- if($num == 513){
- print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
- print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
- print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
- print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
- }
- }
-}
-
-print < 999){
- # ignore deprecated syscalls that are no longer implemented
- # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
- return;
- }
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;\n";
-}
-
-my $prev;
-open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
-while(){
- if(/^#define __NR_syscalls\s+/) {
- # ignore redefinitions of __NR_syscalls
- }
- elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
- fmt($1, $prev+$2)
- }
-}
-
-print <){
- if($line =~ /^(.*)\\$/) {
- # Handle continuation
- $line = $1;
- $_ =~ s/^\s+//;
- $line .= $_;
- } else {
- # New line
- $line = $_;
- }
- next if $line =~ /\\$/;
- if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
- my $num = $1;
- my $proto = $6;
- my $compat = $8;
- my $name = "$7_$9";
-
- $name = "$7_$11" if $11 ne '';
- $name =~ y/a-z/A-Z/;
-
- if($compat eq '' || $compat eq '30' || $compat eq '50') {
- print " $name = $num; // $proto\n";
- }
- }
-}
-
-print <){
- if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
- my $num = $1;
- my $proto = $3;
- my $name = $4;
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print < len(b) {
- return nil, nil, EINVAL
- }
- return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
-}
-
-// UnixRights encodes a set of open file descriptors into a socket
-// control message for sending to another process.
-func UnixRights(fds ...int) []byte {
- datalen := len(fds) * 4
- b := make([]byte, CmsgSpace(datalen))
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- h.Level = SOL_SOCKET
- h.Type = SCM_RIGHTS
- h.SetLen(CmsgLen(datalen))
- data := cmsgData(h)
- for _, fd := range fds {
- *(*int32)(data) = int32(fd)
- data = unsafe.Pointer(uintptr(data) + 4)
- }
- return b
-}
-
-// ParseUnixRights decodes a socket control message that contains an
-// integer array of open file descriptors from another process.
-func ParseUnixRights(m *SocketControlMessage) ([]int, error) {
- if m.Header.Level != SOL_SOCKET {
- return nil, EINVAL
- }
- if m.Header.Type != SCM_RIGHTS {
- return nil, EINVAL
- }
- fds := make([]int, len(m.Data)>>2)
- for i, j := 0, 0; i < len(m.Data); i += 4 {
- fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i])))
- j++
- }
- return fds, nil
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/str.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/str.go
deleted file mode 100644
index 35ed664353..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/str.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
- if val < 0 {
- return "-" + uitoa(uint(-val))
- }
- return uitoa(uint(val))
-}
-
-func uitoa(val uint) string {
- var buf [32]byte // big enough for int64
- i := len(buf) - 1
- for val >= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go
deleted file mode 100644
index a48d47cff8..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Package unix contains an interface to the low-level operating system
-// primitives. OS details vary depending on the underlying system, and
-// by default, godoc will display OS-specific documentation for the current
-// system. If you want godoc to display OS documentation for another
-// system, set $GOOS and $GOARCH to the desired system. For example, if
-// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
-// to freebsd and $GOARCH to arm.
-// The primary use of this package is inside other packages that provide a more
-// portable interface to the system, such as "os", "time" and "net". Use
-// those packages rather than this one if you can.
-// For details of the functions and data types in this package consult
-// the manuals for the appropriate operating system.
-// These calls return err == nil to indicate success; otherwise
-// err represents an operating system error describing the failure and
-// holds a value of type syscall.Errno.
-package unix
-
-import "unsafe"
-
-// ByteSliceFromString returns a NUL-terminated slice of bytes
-// containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, EINVAL
- }
- }
- a := make([]byte, len(s)+1)
- copy(a, s)
- return a, nil
-}
-
-// BytePtrFromString returns a pointer to a NUL-terminated array of
-// bytes containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func BytePtrFromString(s string) (*byte, error) {
- a, err := ByteSliceFromString(s)
- if err != nil {
- return nil, err
- }
- return &a[0], nil
-}
-
-// Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mkunix.pl.
-var _zero uintptr
-
-func (ts *Timespec) Unix() (sec int64, nsec int64) {
- return int64(ts.Sec), int64(ts.Nsec)
-}
-
-func (tv *Timeval) Unix() (sec int64, nsec int64) {
- return int64(tv.Sec), int64(tv.Usec) * 1000
-}
-
-func (ts *Timespec) Nano() int64 {
- return int64(ts.Sec)*1e9 + int64(ts.Nsec)
-}
-
-func (tv *Timeval) Nano() int64 {
- return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
-}
-
-// use is a no-op, but the compiler cannot see that it is.
-// Calling use(p) ensures that p is kept live until that point.
-//go:noescape
-func use(p unsafe.Pointer)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_bsd.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_bsd.go
deleted file mode 100644
index e9671764cc..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_bsd.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// BSD system call wrappers shared by *BSD based systems
-// including OS X (Darwin) and FreeBSD. Like the other
-// syscall_*.go files it is compiled as Go code but also
-// used as input to mksyscall which parses the //sys
-// lines and generates system call stubs.
-
-package unix
-
-import (
- "runtime"
- "syscall"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 16 on BSD.
- if n < 0 || n > 1000 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // 64 bits should be enough. (32 bits isn't even on 386). Since the
- // actual system call is getdirentries64, 64 is a good guess.
- // TODO(rsc): Can we use a single global basep for all calls?
- var base = (*uintptr)(unsafe.Pointer(new(uint64)))
- return Getdirentries(fd, buf, base)
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
- sig := syscall.Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys Shutdown(s int, how int) (err error)
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet4
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet6
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) || n == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Index == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = sa.Len
- sa.raw.Family = AF_LINK
- sa.raw.Index = sa.Index
- sa.raw.Type = sa.Type
- sa.raw.Nlen = sa.Nlen
- sa.raw.Alen = sa.Alen
- sa.raw.Slen = sa.Slen
- for i := 0; i < len(sa.raw.Data); i++ {
- sa.raw.Data[i] = sa.Data[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_LINK:
- pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
- sa := new(SockaddrDatalink)
- sa.Len = pp.Len
- sa.Family = pp.Family
- sa.Index = pp.Index
- sa.Type = pp.Type
- sa.Nlen = pp.Nlen
- sa.Alen = pp.Alen
- sa.Slen = pp.Slen
- for i := 0; i < len(sa.Data); i++ {
- sa.Data[i] = pp.Data[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- if pp.Len < 2 || pp.Len > SizeofSockaddrUnix {
- return nil, EINVAL
- }
- sa := new(SockaddrUnix)
-
- // Some BSDs include the trailing NUL in the length, whereas
- // others do not. Work around this by subtracting the leading
- // family and len. The path is then scanned to see if a NUL
- // terminator still exists within the length.
- n := int(pp.Len) - 2 // subtract leading Family, Len
- for i := 0; i < n; i++ {
- if pp.Path[i] == 0 {
- // found early NUL; assume Len included the NUL
- // or was overestimating.
- n = i
- break
- }
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- if runtime.GOOS == "darwin" && len == 0 {
- // Accepted socket has no address.
- // This is likely due to a bug in xnu kernels,
- // where instead of ECONNABORTED error socket
- // is accepted, but has no address.
- Close(nfd)
- return 0, nil, ECONNABORTED
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be
- // reported upstream.
- if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
- rsa.Addr.Family = AF_UNIX
- rsa.Addr.Len = SizeofSockaddrUnix
- }
- return anyToSockaddr(&rsa)
-}
-
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-
-func GetsockoptByte(fd, level, opt int) (value byte, err error) {
- var n byte
- vallen := _Socklen(1)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return n, err
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error)
-
-func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {
- var change, event unsafe.Pointer
- if len(changes) > 0 {
- change = unsafe.Pointer(&changes[0])
- }
- if len(events) > 0 {
- event = unsafe.Pointer(&events[0])
- }
- return kevent(kq, change, len(changes), event, len(events), timeout)
-}
-
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
-
-// sysctlmib translates name to mib number and appends any additional args.
-func sysctlmib(name string, args ...int) ([]_C_int, error) {
- // Translate name to mib number.
- mib, err := nametomib(name)
- if err != nil {
- return nil, err
- }
-
- for _, a := range args {
- mib = append(mib, _C_int(a))
- }
-
- return mib, nil
-}
-
-func Sysctl(name string) (string, error) {
- return SysctlArgs(name)
-}
-
-func SysctlArgs(name string, args ...int) (string, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return "", err
- }
-
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return "", err
- }
- if n == 0 {
- return "", nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return "", err
- }
-
- // Throw away terminating NUL.
- if n > 0 && buf[n-1] == '\x00' {
- n--
- }
- return string(buf[0:n]), nil
-}
-
-func SysctlUint32(name string) (uint32, error) {
- return SysctlUint32Args(name)
-}
-
-func SysctlUint32Args(name string, args ...int) (uint32, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return 0, err
- }
-
- n := uintptr(4)
- buf := make([]byte, 4)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 4 {
- return 0, EIO
- }
- return *(*uint32)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlUint64(name string, args ...int) (uint64, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return 0, err
- }
-
- n := uintptr(8)
- buf := make([]byte, 8)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 8 {
- return 0, EIO
- }
- return *(*uint64)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlRaw(name string, args ...int) ([]byte, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return nil, err
- }
-
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return nil, err
- }
-
- // The actual call may return less than the original reported required
- // size so ensure we deal with that.
- return buf[:n], nil
-}
-
-//sys utimes(path string, timeval *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- return utimes(path, nil)
- }
- // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it
- // isn't supported by darwin so this uses utimes instead
- if len(ts) != 2 {
- return EINVAL
- }
- // Not as efficient as it could be because Timespec and
- // Timeval have different types in the different OSes
- tv := [2]Timeval{
- NsecToTimeval(TimespecToNsec(ts[0])),
- NsecToTimeval(TimespecToNsec(ts[1])),
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys futimes(fd int, timeval *[2]Timeval) (err error)
-
-func Futimes(fd int, tv []Timeval) error {
- if tv == nil {
- return futimes(fd, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// TODO: wrap
-// Acct(name nil-string) (err error)
-// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
-// Madvise(addr *byte, len int, behav int) (err error)
-// Mprotect(addr *byte, len int, prot int) (err error)
-// Msync(addr *byte, len int, flags int) (err error)
-// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin.go
deleted file mode 100644
index 0d1771c3fc..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin.go
+++ /dev/null
@@ -1,509 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Darwin system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- errorspkg "errors"
- "syscall"
- "unsafe"
-)
-
-const ImplementsGetwd = true
-
-func Getwd() (string, error) {
- buf := make([]byte, 2048)
- attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
- if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
- wd := string(attrs[0])
- // Sanity check that it's an absolute path and ends
- // in a null byte, which we then strip.
- if wd[0] == '/' && wd[len(wd)-1] == 0 {
- return wd[:len(wd)-1], nil
- }
- }
- // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
- // slow algorithm.
- return "", ENOTSUP
-}
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
-func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-
-const (
- attrBitMapCount = 5
- attrCmnFullpath = 0x08000000
-)
-
-type attrList struct {
- bitmapCount uint16
- _ uint16
- CommonAttr uint32
- VolAttr uint32
- DirAttr uint32
- FileAttr uint32
- Forkattr uint32
-}
-
-func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
- if len(attrBuf) < 4 {
- return nil, errorspkg.New("attrBuf too small")
- }
- attrList.bitmapCount = attrBitMapCount
-
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
-
- _, _, e1 := Syscall6(
- SYS_GETATTRLIST,
- uintptr(unsafe.Pointer(_p0)),
- uintptr(unsafe.Pointer(&attrList)),
- uintptr(unsafe.Pointer(&attrBuf[0])),
- uintptr(len(attrBuf)),
- uintptr(options),
- 0,
- )
- if e1 != 0 {
- return nil, e1
- }
- size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
-
- // dat is the section of attrBuf that contains valid data,
- // without the 4 byte length header. All attribute offsets
- // are relative to dat.
- dat := attrBuf
- if int(size) < len(attrBuf) {
- dat = dat[:size]
- }
- dat = dat[4:] // remove length prefix
-
- for i := uint32(0); int(i) < len(dat); {
- header := dat[i:]
- if len(header) < 8 {
- return attrs, errorspkg.New("truncated attribute header")
- }
- datOff := *(*int32)(unsafe.Pointer(&header[0]))
- attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
- if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
- return attrs, errorspkg.New("truncated results; attrBuf too small")
- }
- end := uint32(datOff) + attrLen
- attrs = append(attrs, dat[datOff:end])
- i = end
- if r := i % 4; r != 0 {
- i += (4 - r)
- }
- }
- return
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Wrapped
- */
-
-//sys kill(pid int, signum int, posix int) (err error)
-
-func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exchangedata(path1 string, path2 string, options int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Getuid() (uid int)
-//sysnb Issetugid() (tainted bool)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sys Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setprivexec(flag int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// sendfile
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_386.go
deleted file mode 100644
index 3195c8bf5c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_386.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/386 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_amd64.go
deleted file mode 100644
index 7adb98ded5..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_arm.go
deleted file mode 100644
index e47ffd7396..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_arm64.go
deleted file mode 100644
index 2560a95998..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 16384 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly.go
deleted file mode 100644
index fbbe0dce25..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly.go
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- reclen := int(16+dirent.Namlen+1+7) & ^7
- buf = buf[reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- return extpread(fd, p, 0, offset)
-}
-
-//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- return extpwrite(fd, p, 0, offset)
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- * TODO(jsing): Update this list for DragonFly.
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly_386.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly_386.go
deleted file mode 100644
index 41c2e69782..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly_386.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,dragonfly
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
deleted file mode 100644
index 2ed92590e2..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,dragonfly
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd.go
deleted file mode 100644
index ec56ed608a..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd.go
+++ /dev/null
@@ -1,682 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, errno
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// Derive extattr namespace and attribute name
-
-func xattrnamespace(fullattr string) (ns int, attr string, err error) {
- s := -1
- for idx, val := range fullattr {
- if val == '.' {
- s = idx
- break
- }
- }
-
- if s == -1 {
- return -1, "", ENOATTR
- }
-
- namespace := fullattr[0:s]
- attr = fullattr[s+1:]
-
- switch namespace {
- case "user":
- return EXTATTR_NAMESPACE_USER, attr, nil
- case "system":
- return EXTATTR_NAMESPACE_SYSTEM, attr, nil
- default:
- return -1, "", ENOATTR
- }
-}
-
-func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
- if len(dest) > idx {
- return unsafe.Pointer(&dest[idx])
- } else {
- return unsafe.Pointer(_zero)
- }
-}
-
-// FreeBSD implements its own syscalls to handle extended attributes
-
-func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
-}
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
-}
-
-func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
-}
-
-// flags are unused on FreeBSD
-
-func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Setxattr(file string, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Removexattr(file string, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteFile(file, nsid, a)
- return
-}
-
-func Fremovexattr(fd int, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteFd(fd, nsid, a)
- return
-}
-
-func Lremovexattr(link string, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteLink(link, nsid, a)
- return
-}
-
-func Listxattr(file string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- // FreeBSD won't allow you to list xattrs from multiple namespaces
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
-
- /* Errors accessing system attrs are ignored so that
- * we can implement the Linux-like behavior of omitting errors that
- * we don't have read permissions on
- *
- * Linux will still error if we ask for user attributes on a file that
- * we don't have read permissions on, so don't ignore those errors
- */
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-func Llistxattr(link string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
-//sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
-//sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
-//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_386.go
deleted file mode 100644
index 6255d40ff8..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_amd64.go
deleted file mode 100644
index 8b395d596d..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_arm.go
deleted file mode 100644
index 4e72d46a81..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return tv.Sec*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux.go
deleted file mode 100644
index d3ee5d2c2f..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux.go
+++ /dev/null
@@ -1,1086 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Linux system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and
-// wrap it in our own nicer implementation.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-func Access(path string, mode uint32) (err error) {
- return Faccessat(AT_FDCWD, path, mode, 0)
-}
-
-func Chmod(path string, mode uint32) (err error) {
- return Fchmodat(AT_FDCWD, path, mode, 0)
-}
-
-func Chown(path string, uid int, gid int) (err error) {
- return Fchownat(AT_FDCWD, path, uid, gid, 0)
-}
-
-func Creat(path string, mode uint32) (fd int, err error) {
- return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
-}
-
-//sys linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
-
-func Link(oldpath string, newpath string) (err error) {
- return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- return Mkdirat(AT_FDCWD, path, mode)
-}
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- return Mknodat(AT_FDCWD, path, mode, dev)
-}
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- return openat(AT_FDCWD, path, mode|O_LARGEFILE, perm)
-}
-
-//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-
-func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- return openat(dirfd, path, flags|O_LARGEFILE, mode)
-}
-
-//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
-
-func Readlink(path string, buf []byte) (n int, err error) {
- return readlinkat(AT_FDCWD, path, buf)
-}
-
-func Rename(oldpath string, newpath string) (err error) {
- return Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath)
-}
-
-func Rmdir(path string) error {
- return unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
-}
-
-//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error)
-
-func Symlink(oldpath string, newpath string) (err error) {
- return symlinkat(oldpath, AT_FDCWD, newpath)
-}
-
-func Unlink(path string) error {
- return unlinkat(AT_FDCWD, path, 0)
-}
-
-//sys unlinkat(dirfd int, path string, flags int) (err error)
-
-func Unlinkat(dirfd int, path string) error {
- return unlinkat(dirfd, path, 0)
-}
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) (err error) {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- err := utimensat(AT_FDCWD, path, nil, 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, nil)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
- if err != ENOSYS {
- return err
- }
- // If the utimensat syscall isn't available (utimensat was added to Linux
- // in 2.6.22, Released, 8 July 2007) then fall back to utimes
- var tv [2]Timeval
- for i := 0; i < 2; i++ {
- tv[i].Sec = ts[i].Sec
- tv[i].Usec = ts[i].Nsec / 1000
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
- if ts == nil {
- return utimensat(dirfd, path, nil, flags)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- if tv == nil {
- return futimesat(dirfd, pathp, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func Futimes(fd int, tv []Timeval) (err error) {
- // Believe it or not, this is the best we can do on Linux
- // (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- n, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- // Getcwd returns the number of bytes written to buf, including the NUL.
- if n < 1 || n > len(buf) || buf[n-1] != 0 {
- return "", EINVAL
- }
- return string(buf[0 : n-1]), nil
-}
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 1<<16 on Linux.
- if n < 0 || n > 1<<20 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-type WaitStatus uint32
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits. At least that's the idea.
-// There are various irregularities. For example, the
-// "continued" status is 0xFFFF, distinguishing itself
-// from stopped via the core dump bit.
-
-const (
- mask = 0x7F
- core = 0x80
- exited = 0x00
- stopped = 0x7F
- shift = 8
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
-
-func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
-
-func (w WaitStatus) Continued() bool { return w == 0xFFFF }
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) ExitStatus() int {
- if !w.Exited() {
- return -1
- }
- return int(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) Signal() syscall.Signal {
- if !w.Signaled() {
- return -1
- }
- return syscall.Signal(w & mask)
-}
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int {
- if w.StopSignal() != SIGTRAP {
- return -1
- }
- return int(w>>shift) >> 8
-}
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-func Mkfifo(path string, mode uint32) (err error) {
- return Mknod(path, mode|S_IFIFO, 0)
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-type SockaddrLinklayer struct {
- Protocol uint16
- Ifindex int
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]byte
- raw RawSockaddrLinklayer
-}
-
-func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_PACKET
- sa.raw.Protocol = sa.Protocol
- sa.raw.Ifindex = int32(sa.Ifindex)
- sa.raw.Hatype = sa.Hatype
- sa.raw.Pkttype = sa.Pkttype
- sa.raw.Halen = sa.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
-}
-
-type SockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
- raw RawSockaddrNetlink
-}
-
-func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_NETLINK
- sa.raw.Pad = sa.Pad
- sa.raw.Pid = sa.Pid
- sa.raw.Groups = sa.Groups
- return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_NETLINK:
- pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
- sa := new(SockaddrNetlink)
- sa.Family = pp.Family
- sa.Pad = pp.Pad
- sa.Pid = pp.Pid
- sa.Groups = pp.Groups
- return sa, nil
-
- case AF_PACKET:
- pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa))
- sa := new(SockaddrLinklayer)
- sa.Protocol = pp.Protocol
- sa.Ifindex = int(pp.Ifindex)
- sa.Hatype = pp.Hatype
- sa.Pkttype = pp.Pkttype
- sa.Halen = pp.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- if pp.Path[0] == 0 {
- // "Abstract" Unix domain socket.
- // Rewrite leading NUL as @ for textual display.
- // (This is the standard convention.)
- // Not friendly to overwrite in place,
- // but the callers below don't care.
- pp.Path[0] = '@'
- }
-
- // Assume path ends at NUL.
- // This is not technically the Linux semantics for
- // abstract Unix domain sockets--they are supposed
- // to be uninterpreted fixed-size binary blobs--but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
- var value Ucred
- vallen := _Socklen(SizeofUcred)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- var err error
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-// BindToDevice binds the socket associated with fd to device.
-func BindToDevice(fd int, device string) (err error) {
- return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-
-func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
- // The peek requests are machine-size oriented, so we wrap it
- // to retrieve arbitrary-length data.
-
- // The ptrace syscall differs from glibc's ptrace.
- // Peeks returns the word in *data, not as the return value.
-
- var buf [sizeofPtr]byte
-
- // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
- // access (PEEKUSER warns that it might), but if we don't
- // align our reads, we might straddle an unmapped page
- // boundary and not get the bytes leading up to the page
- // boundary.
- n := 0
- if addr%sizeofPtr != 0 {
- err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(out, buf[addr%sizeofPtr:])
- out = out[n:]
- }
-
- // Remainder.
- for len(out) > 0 {
- // We use an internal buffer to guarantee alignment.
- // It's not documented if this is necessary, but we're paranoid.
- err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copied := copy(out, buf[0:])
- n += copied
- out = out[copied:]
- }
-
- return n, nil
-}
-
-func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out)
-}
-
-func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
-}
-
-func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
- // As for ptracePeek, we need to align our accesses to deal
- // with the possibility of straddling an invalid page.
-
- // Leading edge.
- n := 0
- if addr%sizeofPtr != 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(buf[addr%sizeofPtr:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
- if err != nil {
- return 0, err
- }
- data = data[n:]
- }
-
- // Interior.
- for len(data) > sizeofPtr {
- word := *((*uintptr)(unsafe.Pointer(&data[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += sizeofPtr
- data = data[sizeofPtr:]
- }
-
- // Trailing edge.
- if len(data) > 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copy(buf[0:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += len(data)
- }
-
- return n, nil
-}
-
-func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data)
-}
-
-func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
-}
-
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
-}
-
-func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
-}
-
-func PtraceSetOptions(pid int, options int) (err error) {
- return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options))
-}
-
-func PtraceGetEventMsg(pid int) (msg uint, err error) {
- var data _C_long
- err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
- msg = uint(data)
- return
-}
-
-func PtraceCont(pid int, signal int) (err error) {
- return ptrace(PTRACE_CONT, pid, 0, uintptr(signal))
-}
-
-func PtraceSyscall(pid int, signal int) (err error) {
- return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))
-}
-
-func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
-
-func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
-
-func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
-
-//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
-
-func Reboot(cmd int) (err error) {
- return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- return Getdents(fd, buf)
-}
-
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- count = 0
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
-
-func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
- // Certain file systems get rather angry and EINVAL if you give
- // them an empty string of data, rather than NULL.
- if data == "" {
- return mount(source, target, fstype, flags, nil)
- }
- datap, err := BytePtrFromString(data)
- if err != nil {
- return err
- }
- return mount(source, target, fstype, flags, datap)
-}
-
-// Sendto
-// Recvfrom
-// Socketpair
-
-/*
- * Direct access
- */
-//sys Acct(path string) (err error)
-//sys Adjtimex(buf *Timex) (state int, err error)
-//sys Chdir(path string) (err error)
-//sys Chroot(path string) (err error)
-//sys ClockGettime(clockid int32, time *Timespec) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(oldfd int) (fd int, err error)
-//sys Dup3(oldfd int, newfd int, flags int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
-//sysnb EpollCreate1(flag int) (fd int, err error)
-//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Exit(code int) = SYS_EXIT_GROUP
-//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-//sys Fdatasync(fd int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fsync(fd int) (err error)
-//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
-//sysnb Getpgid(pid int) (pgid int, err error)
-
-func Getpgrp() (pid int) {
- pid, _ = Getpgid(0)
- return
-}
-
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Gettid() (tid int)
-//sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
-//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
-//sysnb InotifyInit1(flags int) (fd int, err error)
-//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
-//sysnb Kill(pid int, sig syscall.Signal) (err error)
-//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
-//sys Listxattr(path string, dest []byte) (sz int, err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Pause() (err error)
-//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
-//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Removexattr(path string, attr string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys Setdomainname(p []byte) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tv *Timeval) (err error)
-
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
-
-func Setuid(uid int) (err error) {
- return EOPNOTSUPP
-}
-
-func Setgid(uid int) (err error) {
- return EOPNOTSUPP
-}
-
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
-//sys Sync()
-//sysnb Sysinfo(info *Sysinfo_t) (err error)
-//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
-//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sysnb Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2
-//sys Unshare(flags int) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys Utime(path string, buf *Utimbuf) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys exitThread(code int) (err error) = SYS_EXIT
-//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
-//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
-
-// mmap varies by architecture; see syscall_linux_*.go.
-//sys munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Munlockall() (err error)
-
-/*
- * Unimplemented
- */
-// AddKey
-// AfsSyscall
-// Alarm
-// ArchPrctl
-// Brk
-// Capget
-// Capset
-// ClockGetres
-// ClockNanosleep
-// ClockSettime
-// Clone
-// CreateModule
-// DeleteModule
-// EpollCtlOld
-// EpollPwait
-// EpollWaitOld
-// Eventfd
-// Execve
-// Fgetxattr
-// Flistxattr
-// Fork
-// Fremovexattr
-// Fsetxattr
-// Futex
-// GetKernelSyms
-// GetMempolicy
-// GetRobustList
-// GetThreadArea
-// Getitimer
-// Getpmsg
-// IoCancel
-// IoDestroy
-// IoGetevents
-// IoSetup
-// IoSubmit
-// Ioctl
-// IoprioGet
-// IoprioSet
-// KexecLoad
-// Keyctl
-// Lgetxattr
-// Llistxattr
-// LookupDcookie
-// Lremovexattr
-// Lsetxattr
-// Mbind
-// MigratePages
-// Mincore
-// ModifyLdt
-// Mount
-// MovePages
-// Mprotect
-// MqGetsetattr
-// MqNotify
-// MqOpen
-// MqTimedreceive
-// MqTimedsend
-// MqUnlink
-// Mremap
-// Msgctl
-// Msgget
-// Msgrcv
-// Msgsnd
-// Msync
-// Newfstatat
-// Nfsservctl
-// Personality
-// Poll
-// Ppoll
-// Pselect6
-// Ptrace
-// Putpmsg
-// QueryModule
-// Quotactl
-// Readahead
-// Readv
-// RemapFilePages
-// RequestKey
-// RestartSyscall
-// RtSigaction
-// RtSigpending
-// RtSigprocmask
-// RtSigqueueinfo
-// RtSigreturn
-// RtSigsuspend
-// RtSigtimedwait
-// SchedGetPriorityMax
-// SchedGetPriorityMin
-// SchedGetaffinity
-// SchedGetparam
-// SchedGetscheduler
-// SchedRrGetInterval
-// SchedSetaffinity
-// SchedSetparam
-// SchedYield
-// Security
-// Semctl
-// Semget
-// Semop
-// Semtimedop
-// SetMempolicy
-// SetRobustList
-// SetThreadArea
-// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Sigaltstack
-// Signalfd
-// Swapoff
-// Swapon
-// Sysfs
-// TimerCreate
-// TimerDelete
-// TimerGetoverrun
-// TimerGettime
-// TimerSettime
-// Timerfd
-// Tkill (obsolete)
-// Tuxcall
-// Umount2
-// Uselib
-// Utimensat
-// Vfork
-// Vhangup
-// Vmsplice
-// Vserver
-// Waitid
-// _Sysctl
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux_386.go
deleted file mode 100644
index 7171219af7..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux_386.go
+++ /dev/null
@@ -1,388 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-// +build 386,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// 64-bit file system and 32-bit uid calls
-// (386 default is 32-bit file system and 16-bit uid).
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-// On x86 Linux, all the socket calls go through an extra indirection,
-// I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom. Instead the
-// arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr. We hide the pointer in the
-// socketcall assembly to avoid allocation on every system call.
-
-const (
- // see linux/net.h
- _SOCKET = 1
- _BIND = 2
- _CONNECT = 3
- _LISTEN = 4
- _ACCEPT = 5
- _GETSOCKNAME = 6
- _GETPEERNAME = 7
- _SOCKETPAIR = 8
- _SEND = 9
- _RECV = 10
- _SENDTO = 11
- _RECVFROM = 12
- _SHUTDOWN = 13
- _SETSOCKOPT = 14
- _GETSOCKOPT = 15
- _SENDMSG = 16
- _RECVMSG = 17
- _ACCEPT4 = 18
- _RECVMMSG = 19
- _SENDMMSG = 20
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
- _, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- _, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Listen(s int, n int) (err error) {
- _, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Shutdown(s, how int) (err error) {
- _, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux_ppc64x.go
deleted file mode 100644
index 67eed6334c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package unix
-
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
-//sysnb Getuid() (uid int)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Nip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd.go
deleted file mode 100644
index c4e945cd69..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd.go
+++ /dev/null
@@ -1,492 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// NetBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
- var olen uintptr
-
- // Get a list of all sysctl nodes below the given MIB by performing
- // a sysctl for the given MIB with CTL_QUERY appended.
- mib = append(mib, CTL_QUERY)
- qnode := Sysctlnode{Flags: SYSCTL_VERS_1}
- qp := (*byte)(unsafe.Pointer(&qnode))
- sz := unsafe.Sizeof(qnode)
- if err = sysctl(mib, nil, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- // Now that we know the size, get the actual nodes.
- nodes = make([]Sysctlnode, olen/sz)
- np := (*byte)(unsafe.Pointer(&nodes[0]))
- if err = sysctl(mib, np, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- return nodes, nil
-}
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Split name into components.
- var parts []string
- last := 0
- for i := 0; i < len(name); i++ {
- if name[i] == '.' {
- parts = append(parts, name[last:i])
- last = i + 1
- }
- }
- parts = append(parts, name[last:])
-
- // Discover the nodes and construct the MIB OID.
- for partno, part := range parts {
- nodes, err := sysctlNodes(mib)
- if err != nil {
- return nil, err
- }
- for _, node := range nodes {
- n := make([]byte, 0)
- for i := range node.Name {
- if node.Name[i] != 0 {
- n = append(n, byte(node.Name[i]))
- }
- }
- if string(n) == part {
- mib = append(mib, _C_int(node.Num))
- break
- }
- }
- if len(mib) != partno+1 {
- return nil, EINVAL
- }
- }
-
- return mib, nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (fd1 int, fd2 int, err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// ____semctl13
-// __clone
-// __fhopen40
-// __fhstat40
-// __fhstatvfs140
-// __fstat30
-// __getcwd
-// __getfh30
-// __getlogin
-// __lstat30
-// __mount50
-// __msgctl13
-// __msync13
-// __ntp_gettime30
-// __posix_chown
-// __posix_fadvise50
-// __posix_fchown
-// __posix_lchown
-// __posix_rename
-// __setlogin
-// __shmctl13
-// __sigaction_sigtramp
-// __sigaltstack14
-// __sigpending14
-// __sigprocmask14
-// __sigsuspend14
-// __sigtimedwait
-// __stat30
-// __syscall
-// __vfork14
-// _ksem_close
-// _ksem_destroy
-// _ksem_getvalue
-// _ksem_init
-// _ksem_open
-// _ksem_post
-// _ksem_trywait
-// _ksem_unlink
-// _ksem_wait
-// _lwp_continue
-// _lwp_create
-// _lwp_ctl
-// _lwp_detach
-// _lwp_exit
-// _lwp_getname
-// _lwp_getprivate
-// _lwp_kill
-// _lwp_park
-// _lwp_self
-// _lwp_setname
-// _lwp_setprivate
-// _lwp_suspend
-// _lwp_unpark
-// _lwp_unpark_all
-// _lwp_wait
-// _lwp_wakeup
-// _pset_bind
-// _sched_getaffinity
-// _sched_getparam
-// _sched_setaffinity
-// _sched_setparam
-// acct
-// aio_cancel
-// aio_error
-// aio_fsync
-// aio_read
-// aio_return
-// aio_suspend
-// aio_write
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// compat_09_ogetdomainname
-// compat_09_osetdomainname
-// compat_09_ouname
-// compat_10_omsgsys
-// compat_10_osemsys
-// compat_10_oshmsys
-// compat_12_fstat12
-// compat_12_getdirentries
-// compat_12_lstat12
-// compat_12_msync
-// compat_12_oreboot
-// compat_12_oswapon
-// compat_12_stat12
-// compat_13_sigaction13
-// compat_13_sigaltstack13
-// compat_13_sigpending13
-// compat_13_sigprocmask13
-// compat_13_sigreturn13
-// compat_13_sigsuspend13
-// compat_14___semctl
-// compat_14_msgctl
-// compat_14_shmctl
-// compat_16___sigaction14
-// compat_16___sigreturn14
-// compat_20_fhstatfs
-// compat_20_fstatfs
-// compat_20_getfsstat
-// compat_20_statfs
-// compat_30___fhstat30
-// compat_30___fstat13
-// compat_30___lstat13
-// compat_30___stat13
-// compat_30_fhopen
-// compat_30_fhstat
-// compat_30_fhstatvfs1
-// compat_30_getdents
-// compat_30_getfh
-// compat_30_ntp_gettime
-// compat_30_socket
-// compat_40_mount
-// compat_43_fstat43
-// compat_43_lstat43
-// compat_43_oaccept
-// compat_43_ocreat
-// compat_43_oftruncate
-// compat_43_ogetdirentries
-// compat_43_ogetdtablesize
-// compat_43_ogethostid
-// compat_43_ogethostname
-// compat_43_ogetkerninfo
-// compat_43_ogetpagesize
-// compat_43_ogetpeername
-// compat_43_ogetrlimit
-// compat_43_ogetsockname
-// compat_43_okillpg
-// compat_43_olseek
-// compat_43_ommap
-// compat_43_oquota
-// compat_43_orecv
-// compat_43_orecvfrom
-// compat_43_orecvmsg
-// compat_43_osend
-// compat_43_osendmsg
-// compat_43_osethostid
-// compat_43_osethostname
-// compat_43_osetrlimit
-// compat_43_osigblock
-// compat_43_osigsetmask
-// compat_43_osigstack
-// compat_43_osigvec
-// compat_43_otruncate
-// compat_43_owait
-// compat_43_stat43
-// execve
-// extattr_delete_fd
-// extattr_delete_file
-// extattr_delete_link
-// extattr_get_fd
-// extattr_get_file
-// extattr_get_link
-// extattr_list_fd
-// extattr_list_file
-// extattr_list_link
-// extattr_set_fd
-// extattr_set_file
-// extattr_set_link
-// extattrctl
-// fchroot
-// fdatasync
-// fgetxattr
-// fktrace
-// flistxattr
-// fork
-// fremovexattr
-// fsetxattr
-// fstatvfs1
-// fsync_range
-// getcontext
-// getitimer
-// getvfsstat
-// getxattr
-// ioctl
-// ktrace
-// lchflags
-// lchmod
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// lgetxattr
-// lio_listio
-// listxattr
-// llistxattr
-// lremovexattr
-// lseek
-// lsetxattr
-// lutimes
-// madvise
-// mincore
-// minherit
-// modctl
-// mq_close
-// mq_getattr
-// mq_notify
-// mq_open
-// mq_receive
-// mq_send
-// mq_setattr
-// mq_timedreceive
-// mq_timedsend
-// mq_unlink
-// mremap
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// ntp_adjtime
-// pmc_control
-// pmc_get_info
-// poll
-// pollts
-// preadv
-// profil
-// pselect
-// pset_assign
-// pset_create
-// pset_destroy
-// ptrace
-// pwritev
-// quotactl
-// rasctl
-// readv
-// reboot
-// removexattr
-// sa_enable
-// sa_preempt
-// sa_register
-// sa_setconcurrency
-// sa_stacks
-// sa_yield
-// sbrk
-// sched_yield
-// semconfig
-// semget
-// semop
-// setcontext
-// setitimer
-// setxattr
-// shmat
-// shmdt
-// shmget
-// sstk
-// statvfs1
-// swapctl
-// sysarch
-// syscall
-// timer_create
-// timer_delete
-// timer_getoverrun
-// timer_gettime
-// timer_settime
-// undelete
-// utrace
-// uuidgen
-// vadvise
-// vfork
-// writev
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_386.go
deleted file mode 100644
index 1b0e1af125..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_amd64.go
deleted file mode 100644
index 1b6dcbe35d..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int64(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_arm.go
deleted file mode 100644
index 87d1d6fed1..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_no_getwd.go
deleted file mode 100644
index 530792ea93..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_no_getwd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly freebsd netbsd openbsd
-
-package unix
-
-const ImplementsGetwd = false
-
-func Getwd() (string, error) { return "", ENOTSUP }
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd.go
deleted file mode 100644
index 246131d2af..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd.go
+++ /dev/null
@@ -1,303 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// OpenBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [24]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Perform lookup via a binary search
- left := 0
- right := len(sysctlMib) - 1
- for {
- idx := left + (right-left)/2
- switch {
- case name == sysctlMib[idx].ctlname:
- return sysctlMib[idx].ctloid, nil
- case name > sysctlMib[idx].ctlname:
- left = idx + 1
- default:
- right = idx - 1
- }
- if left > right {
- break
- }
- }
- return nil, EINVAL
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// __getcwd
-// __semctl
-// __syscall
-// __sysctl
-// adjfreq
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// closefrom
-// execve
-// faccessat
-// fchmodat
-// fchownat
-// fcntl
-// fhopen
-// fhstat
-// fhstatfs
-// fork
-// fstatat
-// futimens
-// getfh
-// getgid
-// getitimer
-// getlogin
-// getresgid
-// getresuid
-// getrtable
-// getthrid
-// ioctl
-// ktrace
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// linkat
-// mincore
-// minherit
-// mkdirat
-// mkfifoat
-// mknodat
-// mount
-// mquery
-// msgctl
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// nnpfspioctl
-// openat
-// poll
-// preadv
-// profil
-// pwritev
-// quotactl
-// readlinkat
-// readv
-// reboot
-// renameat
-// rfork
-// sched_yield
-// semget
-// semop
-// setgroups
-// setitimer
-// setrtable
-// setsockopt
-// shmat
-// shmctl
-// shmdt
-// shmget
-// sigaction
-// sigaltstack
-// sigpending
-// sigprocmask
-// sigreturn
-// sigsuspend
-// symlinkat
-// sysarch
-// syscall
-// threxit
-// thrsigdivert
-// thrsleep
-// thrwakeup
-// unlinkat
-// utimensat
-// vfork
-// writev
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd_386.go
deleted file mode 100644
index 9529b20e82..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd_amd64.go
deleted file mode 100644
index fc6402946e..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_solaris.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_solaris.go
deleted file mode 100644
index 0083732648..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_solaris.go
+++ /dev/null
@@ -1,713 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Solaris system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_solaris.go or syscall_unix.go.
-
-package unix
-
-import (
- "sync/atomic"
- "syscall"
- "unsafe"
-)
-
-// Implemented in runtime/syscall_solaris.go.
-type syscallFunc uintptr
-
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-type SockaddrDatalink struct {
- Family uint16
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [244]int8
- raw RawSockaddrDatalink
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-func pipe() (r uintptr, w uintptr, err uintptr)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- r0, w0, e1 := pipe()
- if e1 != 0 {
- err = syscall.Errno(e1)
- }
- p[0], p[1] = int(r0), int(w0)
- return
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- // Getcwd will return an error if it failed for any reason.
- _, err = Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- // Check for error and sanity check group count. Newer versions of
- // Solaris allow up to 1024 (NGROUPS_MAX).
- if n < 0 || n > 1024 {
- if err != nil {
- return nil, err
- }
- return nil, EINVAL
- } else if n == 0 {
- return nil, nil
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if n == -1 {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // TODO(rsc): Can we use a single global basep for all calls?
- return Getdents(fd, buf, new(uintptr))
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
- sig := syscall.Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage)
- if e1 != 0 {
- err = syscall.Errno(e1)
- }
- return int(r0), err
-}
-
-func gethostname() (name string, err uintptr)
-
-func Gethostname() (name string, err error) {
- name, e1 := gethostname()
- if e1 != 0 {
- err = syscall.Errno(e1)
- }
- return name, err
-}
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) (err error) {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(fd int, path string, times *[2]Timespec, flag int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- return utimensat(AT_FDCWD, path, nil, 0)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
- if ts == nil {
- return utimensat(dirfd, path, nil, flags)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)
- if e1 != 0 {
- return e1
- }
- return nil
-}
-
-//sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- if tv == nil {
- return futimesat(dirfd, pathp, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-// Solaris doesn't have an futimes function because it allows NULL to be
-// specified as the path for futimesat. However, Go doesn't like
-// NULL-style string interfaces, so this simple wrapper is provided.
-func Futimes(fd int, tv []Timeval) error {
- if tv == nil {
- return futimesat(fd, nil, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- // Assume path ends at NUL.
- // This is not technically the Solaris semantics for
- // abstract Unix domain sockets -- they are supposed
- // to be uninterpreted fixed-size binary blobs -- but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if nfd == -1 {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); n == -1 {
- return
- }
- oobn = int(msg.Accrightslen)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys acct(path *byte) (err error)
-
-func Acct(path string) (err error) {
- if len(path) == 0 {
- // Assume caller wants to disable accounting.
- return acct(nil)
- }
-
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- return acct(pathp)
-}
-
-/*
- * Expose the ioctl function
- */
-
-//sys ioctl(fd int, req int, arg uintptr) (err error)
-
-func IoctlSetInt(fd int, req int, value int) (err error) {
- return ioctl(fd, req, uintptr(value))
-}
-
-func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermios(fd int, req int, value *Termios) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermio(fd int, req int, value *Termio) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlGetInt(fd int, req int) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req int) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermio(fd int, req int) (*Termio, error) {
- var value Termio
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Creat(path string, mode uint32) (fd int, err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys Fdatasync(fd int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sysnb Getgid() (gid int)
-//sysnb Getpid() (pid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgid int, err error)
-//sys Geteuid() (euid int)
-//sys Getegid() (egid int)
-//sys Getppid() (ppid int)
-//sys Getpriority(which int, who int) (n int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error) = libsocket.listen
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Setuid(uid int) (err error)
-//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unmount(target string, flags int) (err error) = libc.umount
-//sys Unlink(path string) (err error)
-//sys Unlinkat(dirfd int, path string) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys Utime(path string, buf *Utimbuf) (err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto
-//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair
-//sys write(fd int, p []byte) (n int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys sysconf(name int) (n int64, err error)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
- n := atomic.LoadInt64(&pageSize)
- if n == 0 {
- n, _ = sysconf(_SC_PAGESIZE)
- atomic.StoreInt64(&pageSize, n)
- }
- return int(n)
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_solaris_amd64.go
deleted file mode 100644
index 2e44630cd0..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,solaris
-
-package unix
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- // TODO(aram): implement this, see issue 5847.
- panic("unimplemented")
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_unix.go
deleted file mode 100644
index b46b25028c..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall_unix.go
+++ /dev/null
@@ -1,297 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-import (
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-var (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-const (
- darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
- dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
- netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
-)
-
-// Do the interface allocations only once for common
-// Errno values.
-var (
- errEAGAIN error = syscall.EAGAIN
- errEINVAL error = syscall.EINVAL
- errENOENT error = syscall.ENOENT
-)
-
-// errnoErr returns common boxed Errno values, to prevent
-// allocations at runtime.
-func errnoErr(e syscall.Errno) error {
- switch e {
- case 0:
- return nil
- case EAGAIN:
- return errEAGAIN
- case EINVAL:
- return errEINVAL
- case ENOENT:
- return errENOENT
- }
- return e
-}
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// Mmap manager, for use by operating system-specific implementations.
-
-type mmapper struct {
- sync.Mutex
- active map[*byte][]byte // active mappings; key is last byte in mapping
- mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
- munmap func(addr uintptr, length uintptr) error
-}
-
-func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- if length <= 0 {
- return nil, EINVAL
- }
-
- // Map the requested memory.
- addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
- if errno != nil {
- return nil, errno
- }
-
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafe to turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
-
- // Register mapping in m and return it.
- p := &b[cap(b)-1]
- m.Lock()
- defer m.Unlock()
- m.active[p] = b
- return b, nil
-}
-
-func (m *mmapper) Munmap(data []byte) (err error) {
- if len(data) == 0 || len(data) != cap(data) {
- return EINVAL
- }
-
- // Find the base of the mapping.
- p := &data[cap(data)-1]
- m.Lock()
- defer m.Unlock()
- b := m.active[p]
- if b == nil || &b[0] != &data[0] {
- return EINVAL
- }
-
- // Unmap the memory and update m.
- if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
- return errno
- }
- delete(m.active, p)
- return nil
-}
-
-func Read(fd int, p []byte) (n int, err error) {
- n, err = read(fd, p)
- if raceenabled {
- if n > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), n)
- }
- if err == nil {
- raceAcquire(unsafe.Pointer(&ioSync))
- }
- }
- return
-}
-
-func Write(fd int, p []byte) (n int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = write(fd, p)
- if raceenabled && n > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), n)
- }
- return
-}
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-type Sockaddr interface {
- sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
-}
-
-type SockaddrInet4 struct {
- Port int
- Addr [4]byte
- raw RawSockaddrInet4
-}
-
-type SockaddrInet6 struct {
- Port int
- ZoneId uint32
- Addr [16]byte
- raw RawSockaddrInet6
-}
-
-type SockaddrUnix struct {
- Name string
- raw RawSockaddrUnix
-}
-
-func Bind(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return bind(fd, ptr, n)
-}
-
-func Connect(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return connect(fd, ptr, n)
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getpeername(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
- var n int32
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return int(n), err
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
- return
- }
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
- ptr, n, err := to.sockaddr()
- if err != nil {
- return err
- }
- return sendto(fd, p, flags, ptr, n)
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
-}
-
-func SetsockoptInt(fd, level, opt int, value int) (err error) {
- var n = int32(value)
- return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
-}
-
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
-}
-
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
-}
-
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
- return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
-}
-
-func SetsockoptString(fd, level, opt int, s string) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
-}
-
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
-}
-
-func Socket(domain, typ, proto int) (fd int, err error) {
- if domain == AF_INET6 && SocketDisableIPv6 {
- return -1, EAFNOSUPPORT
- }
- fd, err = socket(domain, typ, proto)
- return
-}
-
-func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
- var fdx [2]int32
- err = socketpair(domain, typ, proto, &fdx)
- if err == nil {
- fd[0] = int(fdx[0])
- fd[1] = int(fdx[1])
- }
- return
-}
-
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- return sendfile(outfd, infd, offset, count)
-}
-
-var ioSync int64
-
-func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
-
-func SetNonblock(fd int, nonblocking bool) (err error) {
- flag, err := fcntl(fd, F_GETFL, 0)
- if err != nil {
- return err
- }
- if nonblocking {
- flag |= O_NONBLOCK
- } else {
- flag &= ^O_NONBLOCK
- }
- _, err = fcntl(fd, F_SETFL, flag)
- return err
-}
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/types_darwin.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/types_darwin.go
deleted file mode 100644
index 1153261822..0000000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/types_darwin.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define __DARWIN_UNIX03 0
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include