Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit d17c76c

Browse files
committed
Merge pull request #422 from crawford/vendor
vendor: move from Godeps
2 parents c3894a1 + daf8cc8 commit d17c76c

File tree

133 files changed

+142
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+142
-203
lines changed

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
language: go
2-
sudo: false
32
matrix:
43
include:
5-
- go: 1.4
6-
install:
7-
- go get golang.org/x/tools/cmd/cover
8-
- go get golang.org/x/tools/cmd/vet
94
- go: 1.5
5+
env: GO15VENDOREXPERIMENT=1
6+
- go: 1.6
107

118
script:
129
- ./test

Godeps/Godeps.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

Godeps/Readme

Lines changed: 0 additions & 5 deletions
This file was deleted.

Godeps/_workspace/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strings"
2222
"unicode"
2323

24-
"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/coreos/yaml"
24+
"github.com/coreos/yaml"
2525
)
2626

2727
// CloudConfig encapsulates the entire cloud-config configuration file and maps

config/config_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ func TestNewCloudConfig(t *testing.T) {
3030
{},
3131
{
3232
contents: "#cloud-config\nwrite_files:\n - path: underscore",
33-
config: CloudConfig{WriteFiles: []File{File{Path: "underscore"}}},
33+
config: CloudConfig{WriteFiles: []File{{Path: "underscore"}}},
3434
},
3535
{
3636
contents: "#cloud-config\nwrite-files:\n - path: hyphen",
37-
config: CloudConfig{WriteFiles: []File{File{Path: "hyphen"}}},
37+
config: CloudConfig{WriteFiles: []File{{Path: "hyphen"}}},
3838
},
3939
{
4040
contents: "#cloud-config\ncoreos:\n update:\n reboot-strategy: off",
@@ -46,19 +46,19 @@ func TestNewCloudConfig(t *testing.T) {
4646
},
4747
{
4848
contents: "#cloud-config\nwrite_files:\n - permissions: 0744",
49-
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "0744"}}},
49+
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "0744"}}},
5050
},
5151
{
5252
contents: "#cloud-config\nwrite_files:\n - permissions: 744",
53-
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "744"}}},
53+
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "744"}}},
5454
},
5555
{
5656
contents: "#cloud-config\nwrite_files:\n - permissions: '0744'",
57-
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "0744"}}},
57+
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "0744"}}},
5858
},
5959
{
6060
contents: "#cloud-config\nwrite_files:\n - permissions: '744'",
61-
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "744"}}},
61+
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "744"}}},
6262
},
6363
}
6464

config/validate/node_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ func TestChild(t *testing.T) {
3333
{
3434
parent: node{
3535
children: []node{
36-
node{name: "c1"},
37-
node{name: "c2"},
38-
node{name: "c3"},
36+
{name: "c1"},
37+
{name: "c2"},
38+
{name: "c3"},
3939
},
4040
},
4141
},
4242
{
4343
parent: node{
4444
children: []node{
45-
node{name: "c1"},
46-
node{name: "c2"},
47-
node{name: "c3"},
45+
{name: "c1"},
46+
{name: "c2"},
47+
{name: "c3"},
4848
},
4949
},
5050
name: "c2",
@@ -76,8 +76,8 @@ func TestHumanType(t *testing.T) {
7676
node: node{
7777
Value: reflect.ValueOf([]int{1, 2}),
7878
children: []node{
79-
node{Value: reflect.ValueOf(1)},
80-
node{Value: reflect.ValueOf(2)},
79+
{Value: reflect.ValueOf(1)},
80+
{Value: reflect.ValueOf(2)},
8181
}},
8282
humanType: "[]int",
8383
},
@@ -108,7 +108,7 @@ func TestToNode(t *testing.T) {
108108
}{},
109109
node: node{
110110
children: []node{
111-
node{
111+
{
112112
name: "a",
113113
field: reflect.TypeOf(struct {
114114
A int `yaml:"a"`
@@ -123,7 +123,7 @@ func TestToNode(t *testing.T) {
123123
}{},
124124
node: node{
125125
children: []node{
126-
node{
126+
{
127127
name: "a",
128128
field: reflect.TypeOf(struct {
129129
A []int `yaml:"a"`
@@ -141,11 +141,11 @@ func TestToNode(t *testing.T) {
141141
context: NewContext([]byte("a:\n b: 2")),
142142
node: node{
143143
children: []node{
144-
node{
144+
{
145145
line: 1,
146146
name: "a",
147147
children: []node{
148-
node{name: "b", line: 2},
148+
{name: "b", line: 2},
149149
},
150150
},
151151
},
@@ -159,10 +159,10 @@ func TestToNode(t *testing.T) {
159159
}{},
160160
node: node{
161161
children: []node{
162-
node{
162+
{
163163
name: "a",
164164
children: []node{
165-
node{
165+
{
166166
name: "b",
167167
field: reflect.TypeOf(struct {
168168
Jon bool `yaml:"b"`

config/validate/report_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ func TestReport(t *testing.T) {
7777
{(*Report).Info, 10, "test info 10"},
7878
},
7979
[]Entry{
80-
Entry{entryWarning, "test warning 1", 1},
81-
Entry{entryError, "test error 2", 2},
82-
Entry{entryInfo, "test info 10", 10},
80+
{entryWarning, "test warning 1", 1},
81+
{entryError, "test error 2", 2},
82+
{entryInfo, "test info 10", 10},
8383
},
8484
},
8585
}

config/validate/validate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/coreos/coreos-cloudinit/config"
2525

26-
"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/coreos/yaml"
26+
"github.com/coreos/yaml"
2727
)
2828

2929
var (
@@ -46,7 +46,7 @@ func Validate(userdataBytes []byte) (Report, error) {
4646
return validateCloudConfig(userdataBytes, Rules)
4747
default:
4848
return Report{entries: []Entry{
49-
Entry{kind: entryError, message: `must be "#cloud-config" or begin with "#!"`, line: 1},
49+
{kind: entryError, message: `must be "#cloud-config" or begin with "#!"`, line: 1},
5050
}}, nil
5151
}
5252
}

coreos-cloudinit.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,28 +104,28 @@ type oemConfig map[string]string
104104

105105
var (
106106
oemConfigs = map[string]oemConfig{
107-
"digitalocean": oemConfig{
107+
"digitalocean": {
108108
"from-digitalocean-metadata": "http://169.254.169.254/",
109109
"convert-netconf": "digitalocean",
110110
},
111-
"ec2-compat": oemConfig{
111+
"ec2-compat": {
112112
"from-ec2-metadata": "http://169.254.169.254/",
113113
"from-configdrive": "/media/configdrive",
114114
},
115-
"rackspace-onmetal": oemConfig{
115+
"rackspace-onmetal": {
116116
"from-configdrive": "/media/configdrive",
117117
"convert-netconf": "debian",
118118
},
119-
"azure": oemConfig{
119+
"azure": {
120120
"from-waagent": "/var/lib/waagent",
121121
},
122-
"cloudsigma": oemConfig{
122+
"cloudsigma": {
123123
"from-cloudsigma-metadata": "true",
124124
},
125-
"packet": oemConfig{
125+
"packet": {
126126
"from-packet-metadata": "https://metadata.packet.net/",
127127
},
128-
"vmware": oemConfig{
128+
"vmware": {
129129
"from-vmware-guestinfo": "true",
130130
"convert-netconf": "vmware",
131131
},

0 commit comments

Comments
 (0)