mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-03 16:07:43 +00:00
Remove dead or redundant code
Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
@@ -211,6 +211,6 @@ func assertContent(t *testing.T, path, expected string) {
|
||||
t.Fatalf("can't read %v: %v", path, err)
|
||||
}
|
||||
if !bytes.Equal(file, []byte(expected)) {
|
||||
t.Fatalf("%v: expected %v but has %v", path, string(expected), string(file))
|
||||
t.Fatalf("%v: expected %v but has %v", path, expected, string(file))
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ func (p *ProviderAWS) String() string {
|
||||
func (p *ProviderAWS) Probe() bool {
|
||||
// Getting the hostname should always work...
|
||||
_, err := awsGet(metaDataURL + "hostname")
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the AWS specific and generic userdata
|
||||
|
@@ -31,7 +31,7 @@ func (p *ProviderDigitalOcean) String() string {
|
||||
func (p *ProviderDigitalOcean) Probe() bool {
|
||||
// Getting the index should always work...
|
||||
_, err := digitalOceanGet(digitalOceanMetaDataURL)
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the DigitalOcean specific and generic userdata
|
||||
|
@@ -33,7 +33,7 @@ func (p *ProviderGCP) String() string {
|
||||
func (p *ProviderGCP) Probe() bool {
|
||||
// Getting the hostname should always work...
|
||||
_, err := gcpGet(instance + "hostname")
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the GCP specific and generic userdata
|
||||
|
@@ -28,7 +28,7 @@ func (p *ProviderHetzner) String() string {
|
||||
func (p *ProviderHetzner) Probe() bool {
|
||||
// Getting the hostname should always work...
|
||||
_, err := hetznerGet(metaDataURL + "hostname")
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the Hetzner specific and generic userdata
|
||||
|
@@ -33,7 +33,7 @@ func (p *ProviderMetaldata) Probe() bool {
|
||||
log.Println("Metaldata: Probing...")
|
||||
// Getting the hostname should always work...
|
||||
_, err := metaldataGet(metaldataMetaDataURL + "hostname")
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the Metaldata specific and generic userdata
|
||||
|
@@ -27,7 +27,7 @@ func (p *ProviderOpenstack) String() string {
|
||||
func (p *ProviderOpenstack) Probe() bool {
|
||||
// Getting the hostname should always work...
|
||||
_, err := openstackGet(metaDataURL + "hostname")
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the OpenStack specific and generic userdata
|
||||
|
@@ -31,7 +31,7 @@ func (p *ProviderVultr) String() string {
|
||||
func (p *ProviderVultr) Probe() bool {
|
||||
// Getting the index should always work...
|
||||
_, err := vultrGet(vultrMetaDataURL)
|
||||
return (err == nil)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Extract gets both the Vultr specific and generic userdata
|
||||
|
Reference in New Issue
Block a user