diff --git a/pkg/model/alimodel/convenience.go b/pkg/model/alimodel/convenience.go index 4b767f18fa7b4..2364051b5d1eb 100644 --- a/pkg/model/alimodel/convenience.go +++ b/pkg/model/alimodel/convenience.go @@ -23,16 +23,6 @@ func s(v string) *string { return fi.String(v) } -// i64 is a helper that builds a *int64 from an int64 value -func i64(v int64) *int64 { - return fi.Int64(v) -} - -// i32 is a helper that builds a *int32 from an int32 value -func i32(v int32) *int32 { - return fi.Int32(v) -} - // i is a helper that builds a *int from an int value func i(v int) *int { return fi.Int(v) diff --git a/pkg/model/convenience.go b/pkg/model/convenience.go index 5e052e1b34a5d..fc481e5797104 100644 --- a/pkg/model/convenience.go +++ b/pkg/model/convenience.go @@ -29,8 +29,3 @@ func s(v string) *string { func i64(v int64) *int64 { return fi.Int64(v) } - -// i32 is a helper that builds a *int32 from an int32 value -func i32(v int32) *int32 { - return fi.Int32(v) -} diff --git a/pkg/model/dns.go b/pkg/model/dns.go index 3c859b0dfc9e7..3899e01e9a909 100644 --- a/pkg/model/dns.go +++ b/pkg/model/dns.go @@ -56,7 +56,7 @@ func (b *DNSModelBuilder) ensureDNSZone(c *fi.ModelBuilderContext) error { dnsZone.PrivateVPC = b.LinkToVPC() default: - return fmt.Errorf("Unknown DNS type %q", topology.DNS.Type) + return fmt.Errorf("unknown DNS type %q", topology.DNS.Type) } } diff --git a/pkg/model/openstackmodel/context.go b/pkg/model/openstackmodel/context.go index aabff3e83d781..c99917e1ce55f 100644 --- a/pkg/model/openstackmodel/context.go +++ b/pkg/model/openstackmodel/context.go @@ -59,7 +59,7 @@ func (c *OpenstackModelContext) findSubnetClusterSpec(subnet string) (string, er return name, nil } } - return "", fmt.Errorf("Could not find subnet %s from clusterSpec", subnet) + return "", fmt.Errorf("could not find subnet %s from clusterSpec", subnet) } func (c *OpenstackModelContext) findSubnetNameByID(subnetID string, subnetName string) (string, error) { diff --git a/pkg/model/openstackmodel/convenience.go b/pkg/model/openstackmodel/convenience.go index 5ccdef7edf195..1376d772f7a2d 100644 --- a/pkg/model/openstackmodel/convenience.go +++ b/pkg/model/openstackmodel/convenience.go @@ -23,11 +23,6 @@ func s(v string) *string { return fi.String(v) } -// i64 is a helper that builds a *int64 from an int64 value -func i64(v int64) *int64 { - return fi.Int64(v) -} - // i32 is a helper that builds a *int32 from an int32 value func i32(v int32) *int32 { return fi.Int32(v) diff --git a/pkg/model/openstackmodel/servergroup.go b/pkg/model/openstackmodel/servergroup.go index 1673fb556d27d..36e5ff4b125a0 100644 --- a/pkg/model/openstackmodel/servergroup.go +++ b/pkg/model/openstackmodel/servergroup.go @@ -79,13 +79,13 @@ func (b *ServerGroupModelBuilder) buildInstances(c *fi.ModelBuilderContext, sg * startupScript, err := b.BootstrapScript.ResourceNodeUp(ig, b.Cluster) if err != nil { - return fmt.Errorf("Could not create startup script for instance group %s: %v", ig.Name, err) + return fmt.Errorf("could not create startup script for instance group %s: %v", ig.Name, err) } if startupScript != nil { // var userData bytes.Buffer startupStr, err := startupScript.AsString() if err != nil { - return fmt.Errorf("Could not create startup script for instance group %s: %v", ig.Name, err) + return fmt.Errorf("could not create startup script for instance group %s: %v", ig.Name, err) } igUserData = fi.String(startupStr) } diff --git a/pkg/nodeidentity/openstack/identify.go b/pkg/nodeidentity/openstack/identify.go index 47716a16de61f..2182e5422b7f0 100644 --- a/pkg/nodeidentity/openstack/identify.go +++ b/pkg/nodeidentity/openstack/identify.go @@ -43,7 +43,7 @@ func New() (nodeidentity.Identifier, error) { region := os.Getenv("OS_REGION_NAME") if region == "" { - return nil, fmt.Errorf("Unable to find region") + return nil, fmt.Errorf("unable to find region") } provider, err := openstack.NewClient(env.IdentityEndpoint) @@ -106,5 +106,5 @@ func (i *nodeIdentifier) getInstanceGroup(instanceID string) (string, error) { if val, ok := instance.Metadata["KopsInstanceGroup"]; ok { return val, nil } - return "", fmt.Errorf("Could not find tag 'KopsInstanceGroup' from instance metadata") + return "", fmt.Errorf("could not find tag 'KopsInstanceGroup' from instance metadata") } diff --git a/pkg/pki/sshkey.go b/pkg/pki/sshkey.go index 0c23bb496b5ec..18f9f652fe534 100644 --- a/pkg/pki/sshkey.go +++ b/pkg/pki/sshkey.go @@ -114,7 +114,7 @@ func toDER(pubkey ssh.PublicKey) ([]byte, error) { // cryptoKey = dsaPublicKey default: - return nil, fmt.Errorf("Unexpected type of SSH key (%q); AWS can only import RSA keys", typeName) + return nil, fmt.Errorf("unexpected type of SSH key (%q); AWS can only import RSA keys", typeName) } der, err := x509.MarshalPKIXPublicKey(cryptoKey)