提交 118e9cc0 编写于 作者: T Thomas Stromberg

Apply go 1.11 formatting using `gofmt -s -l -w`

上级 88f2676b
...@@ -47,10 +47,10 @@ var configTestCases = []configTestCase{ ...@@ -47,10 +47,10 @@ var configTestCases = []configTestCase{
"vm-driver": "kvm" "vm-driver": "kvm"
}`, }`,
config: map[string]interface{}{ config: map[string]interface{}{
"vm-driver": "kvm", "vm-driver": "kvm",
"cpus": 4, "cpus": 4,
"disk-size": "20g", "disk-size": "20g",
"v": 5, "v": 5,
"show-libmachine-logs": true, "show-libmachine-logs": true,
"log_dir": "/etc/hosts", "log_dir": "/etc/hosts",
"ReminderWaitPeriodInHours": 99, "ReminderWaitPeriodInHours": 99,
......
...@@ -105,8 +105,8 @@ var addonsConfigureCmd = &cobra.Command{ ...@@ -105,8 +105,8 @@ var addonsConfigureCmd = &cobra.Command{
"aws-assume-role": awsRole, "aws-assume-role": awsRole,
}, },
map[string]string{ map[string]string{
"app": "registry-creds", "app": "registry-creds",
"cloud": "ecr", "cloud": "ecr",
"kubernetes.io/minikube-addons": "registry-creds", "kubernetes.io/minikube-addons": "registry-creds",
}) })
...@@ -120,11 +120,11 @@ var addonsConfigureCmd = &cobra.Command{ ...@@ -120,11 +120,11 @@ var addonsConfigureCmd = &cobra.Command{
"registry-creds-gcr", "registry-creds-gcr",
map[string]string{ map[string]string{
"application_default_credentials.json": gcrApplicationDefaultCredentials, "application_default_credentials.json": gcrApplicationDefaultCredentials,
"gcrurl": gcrURL, "gcrurl": gcrURL,
}, },
map[string]string{ map[string]string{
"app": "registry-creds", "app": "registry-creds",
"cloud": "gcr", "cloud": "gcr",
"kubernetes.io/minikube-addons": "registry-creds", "kubernetes.io/minikube-addons": "registry-creds",
}) })
...@@ -142,8 +142,8 @@ var addonsConfigureCmd = &cobra.Command{ ...@@ -142,8 +142,8 @@ var addonsConfigureCmd = &cobra.Command{
"DOCKER_PRIVATE_REGISTRY_PASSWORD": dockerPass, "DOCKER_PRIVATE_REGISTRY_PASSWORD": dockerPass,
}, },
map[string]string{ map[string]string{
"app": "registry-creds", "app": "registry-creds",
"cloud": "dpr", "cloud": "dpr",
"kubernetes.io/minikube-addons": "registry-creds", "kubernetes.io/minikube-addons": "registry-creds",
}) })
......
...@@ -47,10 +47,10 @@ var configTestCases = []configTestCase{ ...@@ -47,10 +47,10 @@ var configTestCases = []configTestCase{
"vm-driver": "kvm" "vm-driver": "kvm"
}`, }`,
config: map[string]interface{}{ config: map[string]interface{}{
"vm-driver": "kvm", "vm-driver": "kvm",
"cpus": 4, "cpus": 4,
"disk-size": "20g", "disk-size": "20g",
"v": 5, "v": 5,
"show-libmachine-logs": true, "show-libmachine-logs": true,
"log_dir": "/etc/hosts", "log_dir": "/etc/hosts",
"ReminderWaitPeriodInHours": 99, "ReminderWaitPeriodInHours": 99,
......
...@@ -258,30 +258,30 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) { ...@@ -258,30 +258,30 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) {
expectedIsHTTPSchemedURL bool expectedIsHTTPSchemedURL bool
}{ }{
{ {
description: "no https for http schemed with no https option", description: "no https for http schemed with no https option",
bareURLString: "http://192.168.99.100:30563", bareURLString: "http://192.168.99.100:30563",
https: false, https: false,
expectedHTTPSFormattedURLString: "http://192.168.99.100:30563", expectedHTTPSFormattedURLString: "http://192.168.99.100:30563",
expectedIsHTTPSchemedURL: true, expectedIsHTTPSchemedURL: true,
}, },
{ {
description: "no https for non-http schemed with no https option", description: "no https for non-http schemed with no https option",
bareURLString: "xyz.http.myservice:30563", bareURLString: "xyz.http.myservice:30563",
https: false, https: false,
expectedHTTPSFormattedURLString: "xyz.http.myservice:30563", expectedHTTPSFormattedURLString: "xyz.http.myservice:30563",
expectedIsHTTPSchemedURL: false, expectedIsHTTPSchemedURL: false,
}, },
{ {
description: "https for http schemed with https option", description: "https for http schemed with https option",
bareURLString: "http://192.168.99.100:30563", bareURLString: "http://192.168.99.100:30563",
https: true, https: true,
expectedHTTPSFormattedURLString: "https://192.168.99.100:30563", expectedHTTPSFormattedURLString: "https://192.168.99.100:30563",
expectedIsHTTPSchemedURL: true, expectedIsHTTPSchemedURL: true,
}, },
{ {
description: "no https for non-http schemed with https option and http substring", description: "no https for non-http schemed with https option and http substring",
bareURLString: "xyz.http.myservice:30563", bareURLString: "xyz.http.myservice:30563",
https: true, https: true,
expectedHTTPSFormattedURLString: "xyz.http.myservice:30563", expectedHTTPSFormattedURLString: "xyz.http.myservice:30563",
expectedIsHTTPSchemedURL: false, expectedIsHTTPSchemedURL: false,
}, },
......
...@@ -50,7 +50,7 @@ func GenerateCACert(certPath, keyPath string, name string) error { ...@@ -50,7 +50,7 @@ func GenerateCACert(certPath, keyPath string, name string) error {
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},
BasicConstraintsValid: true, BasicConstraintsValid: true,
IsCA: true, IsCA: true,
} }
return writeCertsAndKeys(&template, certPath, priv, keyPath, &template, priv) return writeCertsAndKeys(&template, certPath, priv, keyPath, &template, priv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册