Merge pull request #3848 from dgageot/remove-more-dead-code-pkg

Remove dead or redundant code (packages)
This commit is contained in:
Avi Deitcher
2022-10-10 20:55:02 +03:00
committed by GitHub
12 changed files with 12 additions and 12 deletions

View File

@@ -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))
}
}

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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