diff --git a/apps.gen.go b/apps.gen.go index d390869..b6a4ea6 100644 --- a/apps.gen.go +++ b/apps.gen.go @@ -196,7 +196,7 @@ type AppVariableDefinition struct { // The name Key string `json:"key"` // The value. If the type is SECRET, the value will be encrypted on first submission. On following submissions, the encrypted value must be used. - Value string `json:"value,omitempty"` + Value string `json:"value,omitempty"` Scope AppVariableScope `json:"scope,omitempty"` Type AppVariableType `json:"type,omitempty"` } @@ -265,11 +265,11 @@ const ( // DeploymentProgress struct for DeploymentProgress type DeploymentProgress struct { - PendingSteps int32 `json:"pending_steps,omitempty"` - RunningSteps int32 `json:"running_steps,omitempty"` - SuccessSteps int32 `json:"success_steps,omitempty"` - ErrorSteps int32 `json:"error_steps,omitempty"` - TotalSteps int32 `json:"total_steps,omitempty"` + PendingSteps int32 `json:"pending_steps,omitempty"` + RunningSteps int32 `json:"running_steps,omitempty"` + SuccessSteps int32 `json:"success_steps,omitempty"` + ErrorSteps int32 `json:"error_steps,omitempty"` + TotalSteps int32 `json:"total_steps,omitempty"` Steps []*DeploymentProgressStep `json:"steps,omitempty"` SummarySteps []*DeploymentProgressStep `json:"summary_steps,omitempty"` } @@ -307,13 +307,13 @@ type GitSourceSpec struct { // DeploymentProgressStep struct for DeploymentProgressStep type DeploymentProgressStep struct { - Name string `json:"name,omitempty"` - Status DeploymentProgressStepStatus `json:"status,omitempty"` - Steps []*DeploymentProgressStep `json:"steps,omitempty"` - StartedAt time.Time `json:"started_at,omitempty"` - EndedAt time.Time `json:"ended_at,omitempty"` - Reason *DeploymentProgressStepReason `json:"reason,omitempty"` - ComponentName string `json:"component_name,omitempty"` + Name string `json:"name,omitempty"` + Status DeploymentProgressStepStatus `json:"status,omitempty"` + Steps []*DeploymentProgressStep `json:"steps,omitempty"` + StartedAt time.Time `json:"started_at,omitempty"` + EndedAt time.Time `json:"ended_at,omitempty"` + Reason *DeploymentProgressStepReason `json:"reason,omitempty"` + ComponentName string `json:"component_name,omitempty"` // The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: message_base = \"Building service\" component_name = \"api\" MessageBase string `json:"message_base,omitempty"` } diff --git a/databases_test.go b/databases_test.go index f45818d..5f1a2d9 100644 --- a/databases_test.go +++ b/databases_test.go @@ -36,7 +36,7 @@ var db = Database{ SSL: true, }, Users: []DatabaseUser{ - DatabaseUser{ + { Name: "doadmin", Role: "primary", Password: "zt91mum075ofzyww", @@ -366,11 +366,11 @@ func TestDatabases_ListBackups(t *testing.T) { defer teardown() want := []DatabaseBackup{ - DatabaseBackup{ + { CreatedAt: time.Date(2019, 1, 11, 18, 42, 27, 0, time.UTC), SizeGigabytes: 0.03357696, }, - DatabaseBackup{ + { CreatedAt: time.Date(2019, 1, 12, 18, 42, 29, 0, time.UTC), SizeGigabytes: 0.03364864, }, diff --git a/firewalls_test.go b/firewalls_test.go index 7e50b9b..d7dfae9 100644 --- a/firewalls_test.go +++ b/firewalls_test.go @@ -807,7 +807,7 @@ func TestFirewalls_RemoveRules(t *testing.T) { func makeExpectedFirewalls() []Firewall { return []Firewall{ - Firewall{ + { ID: "fe6b88f2-b42b-4bf7-bbd3-5ae20208f0b0", Name: "f-i-r-e-w-a-l-l", InboundRules: []InboundRule{ diff --git a/kubernetes_test.go b/kubernetes_test.go index 7016370..252af3c 100644 --- a/kubernetes_test.go +++ b/kubernetes_test.go @@ -19,7 +19,7 @@ func TestKubernetesClusters_ListClusters(t *testing.T) { kubeSvc := client.Kubernetes wantClusters := []*KubernetesCluster{ - &KubernetesCluster{ + { ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8f", Name: "blablabla", RegionSlug: "nyc1", @@ -61,7 +61,7 @@ func TestKubernetesClusters_ListClusters(t *testing.T) { CreatedAt: time.Date(2018, 6, 21, 8, 44, 38, 0, time.UTC), UpdatedAt: time.Date(2018, 6, 21, 8, 44, 38, 0, time.UTC), }, - &KubernetesCluster{ + { ID: "deadbeef-dead-4aa5-beef-deadbeef347d", Name: "antoine", RegionSlug: "nyc1", @@ -524,7 +524,7 @@ func TestKubernetesClusters_Create(t *testing.T) { VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", SurgeUpgrade: true, NodePools: []*KubernetesNodePool{ - &KubernetesNodePool{ + { ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", Size: "s-1vcpu-1gb", Count: 2, @@ -546,7 +546,7 @@ func TestKubernetesClusters_Create(t *testing.T) { VPCUUID: want.VPCUUID, SurgeUpgrade: true, NodePools: []*KubernetesNodePoolCreateRequest{ - &KubernetesNodePoolCreateRequest{ + { Size: want.NodePools[0].Size, Count: want.NodePools[0].Count, Name: want.NodePools[0].Name, @@ -629,7 +629,7 @@ func TestKubernetesClusters_Create_AutoScalePool(t *testing.T) { Tags: []string{"cluster-tag-1", "cluster-tag-2"}, VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", NodePools: []*KubernetesNodePool{ - &KubernetesNodePool{ + { ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", Size: "s-1vcpu-1gb", Count: 2, @@ -652,7 +652,7 @@ func TestKubernetesClusters_Create_AutoScalePool(t *testing.T) { Tags: want.Tags, VPCUUID: want.VPCUUID, NodePools: []*KubernetesNodePoolCreateRequest{ - &KubernetesNodePoolCreateRequest{ + { Size: want.NodePools[0].Size, Count: want.NodePools[0].Count, Name: want.NodePools[0].Name, @@ -734,7 +734,7 @@ func TestKubernetesClusters_Update(t *testing.T) { VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", SurgeUpgrade: true, NodePools: []*KubernetesNodePool{ - &KubernetesNodePool{ + { ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", Size: "s-1vcpu-1gb", Count: 2, @@ -831,7 +831,7 @@ func TestKubernetesClusters_Update_FalseAutoUpgrade(t *testing.T) { Tags: []string{"cluster-tag-1", "cluster-tag-2"}, VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", NodePools: []*KubernetesNodePool{ - &KubernetesNodePool{ + { ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", Size: "s-1vcpu-1gb", Count: 2, diff --git a/load_balancers_test.go b/load_balancers_test.go index 0743180..6d4316d 100644 --- a/load_balancers_test.go +++ b/load_balancers_test.go @@ -850,7 +850,7 @@ func TestLoadBalancers_AsRequest(t *testing.T) { Algorithm: "least_connections", Region: "lon1", SizeSlug: "lb-small", - ForwardingRules: []ForwardingRule{ForwardingRule{ + ForwardingRules: []ForwardingRule{{ EntryProtocol: "http", EntryPort: 80, TargetProtocol: "http", @@ -901,13 +901,13 @@ func TestLoadBalancers_AsRequest(t *testing.T) { }) assert.Equal(t, []int{12345, 54321}, r.DropletIDs) assert.Equal(t, []ForwardingRule{ - ForwardingRule{ + { EntryProtocol: "http", EntryPort: 80, TargetProtocol: "http", TargetPort: 80, }, - ForwardingRule{ + { EntryProtocol: "https", EntryPort: 443, TargetProtocol: "https",