Merge pull request #379 from mycodeself/run-gofmt

Run gofmt to fix some issues in codebase
This commit is contained in:
Ben Tranter 2020-10-06 15:23:48 -04:00 committed by GitHub
commit b82227ae5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 28 deletions

View File

@ -196,7 +196,7 @@ type AppVariableDefinition struct {
// The name // The name
Key string `json:"key"` 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. // 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"` Scope AppVariableScope `json:"scope,omitempty"`
Type AppVariableType `json:"type,omitempty"` Type AppVariableType `json:"type,omitempty"`
} }
@ -265,11 +265,11 @@ const (
// DeploymentProgress struct for DeploymentProgress // DeploymentProgress struct for DeploymentProgress
type DeploymentProgress struct { type DeploymentProgress struct {
PendingSteps int32 `json:"pending_steps,omitempty"` PendingSteps int32 `json:"pending_steps,omitempty"`
RunningSteps int32 `json:"running_steps,omitempty"` RunningSteps int32 `json:"running_steps,omitempty"`
SuccessSteps int32 `json:"success_steps,omitempty"` SuccessSteps int32 `json:"success_steps,omitempty"`
ErrorSteps int32 `json:"error_steps,omitempty"` ErrorSteps int32 `json:"error_steps,omitempty"`
TotalSteps int32 `json:"total_steps,omitempty"` TotalSteps int32 `json:"total_steps,omitempty"`
Steps []*DeploymentProgressStep `json:"steps,omitempty"` Steps []*DeploymentProgressStep `json:"steps,omitempty"`
SummarySteps []*DeploymentProgressStep `json:"summary_steps,omitempty"` SummarySteps []*DeploymentProgressStep `json:"summary_steps,omitempty"`
} }
@ -307,13 +307,13 @@ type GitSourceSpec struct {
// DeploymentProgressStep struct for DeploymentProgressStep // DeploymentProgressStep struct for DeploymentProgressStep
type DeploymentProgressStep struct { type DeploymentProgressStep struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
Status DeploymentProgressStepStatus `json:"status,omitempty"` Status DeploymentProgressStepStatus `json:"status,omitempty"`
Steps []*DeploymentProgressStep `json:"steps,omitempty"` Steps []*DeploymentProgressStep `json:"steps,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"` StartedAt time.Time `json:"started_at,omitempty"`
EndedAt time.Time `json:"ended_at,omitempty"` EndedAt time.Time `json:"ended_at,omitempty"`
Reason *DeploymentProgressStepReason `json:"reason,omitempty"` Reason *DeploymentProgressStepReason `json:"reason,omitempty"`
ComponentName string `json:"component_name,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\" // 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"` MessageBase string `json:"message_base,omitempty"`
} }

View File

@ -36,7 +36,7 @@ var db = Database{
SSL: true, SSL: true,
}, },
Users: []DatabaseUser{ Users: []DatabaseUser{
DatabaseUser{ {
Name: "doadmin", Name: "doadmin",
Role: "primary", Role: "primary",
Password: "zt91mum075ofzyww", Password: "zt91mum075ofzyww",
@ -366,11 +366,11 @@ func TestDatabases_ListBackups(t *testing.T) {
defer teardown() defer teardown()
want := []DatabaseBackup{ want := []DatabaseBackup{
DatabaseBackup{ {
CreatedAt: time.Date(2019, 1, 11, 18, 42, 27, 0, time.UTC), CreatedAt: time.Date(2019, 1, 11, 18, 42, 27, 0, time.UTC),
SizeGigabytes: 0.03357696, SizeGigabytes: 0.03357696,
}, },
DatabaseBackup{ {
CreatedAt: time.Date(2019, 1, 12, 18, 42, 29, 0, time.UTC), CreatedAt: time.Date(2019, 1, 12, 18, 42, 29, 0, time.UTC),
SizeGigabytes: 0.03364864, SizeGigabytes: 0.03364864,
}, },

View File

@ -807,7 +807,7 @@ func TestFirewalls_RemoveRules(t *testing.T) {
func makeExpectedFirewalls() []Firewall { func makeExpectedFirewalls() []Firewall {
return []Firewall{ return []Firewall{
Firewall{ {
ID: "fe6b88f2-b42b-4bf7-bbd3-5ae20208f0b0", ID: "fe6b88f2-b42b-4bf7-bbd3-5ae20208f0b0",
Name: "f-i-r-e-w-a-l-l", Name: "f-i-r-e-w-a-l-l",
InboundRules: []InboundRule{ InboundRules: []InboundRule{

View File

@ -19,7 +19,7 @@ func TestKubernetesClusters_ListClusters(t *testing.T) {
kubeSvc := client.Kubernetes kubeSvc := client.Kubernetes
wantClusters := []*KubernetesCluster{ wantClusters := []*KubernetesCluster{
&KubernetesCluster{ {
ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8f", ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8f",
Name: "blablabla", Name: "blablabla",
RegionSlug: "nyc1", RegionSlug: "nyc1",
@ -61,7 +61,7 @@ func TestKubernetesClusters_ListClusters(t *testing.T) {
CreatedAt: time.Date(2018, 6, 21, 8, 44, 38, 0, time.UTC), CreatedAt: time.Date(2018, 6, 21, 8, 44, 38, 0, time.UTC),
UpdatedAt: 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", ID: "deadbeef-dead-4aa5-beef-deadbeef347d",
Name: "antoine", Name: "antoine",
RegionSlug: "nyc1", RegionSlug: "nyc1",
@ -524,7 +524,7 @@ func TestKubernetesClusters_Create(t *testing.T) {
VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6",
SurgeUpgrade: true, SurgeUpgrade: true,
NodePools: []*KubernetesNodePool{ NodePools: []*KubernetesNodePool{
&KubernetesNodePool{ {
ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a",
Size: "s-1vcpu-1gb", Size: "s-1vcpu-1gb",
Count: 2, Count: 2,
@ -546,7 +546,7 @@ func TestKubernetesClusters_Create(t *testing.T) {
VPCUUID: want.VPCUUID, VPCUUID: want.VPCUUID,
SurgeUpgrade: true, SurgeUpgrade: true,
NodePools: []*KubernetesNodePoolCreateRequest{ NodePools: []*KubernetesNodePoolCreateRequest{
&KubernetesNodePoolCreateRequest{ {
Size: want.NodePools[0].Size, Size: want.NodePools[0].Size,
Count: want.NodePools[0].Count, Count: want.NodePools[0].Count,
Name: want.NodePools[0].Name, Name: want.NodePools[0].Name,
@ -629,7 +629,7 @@ func TestKubernetesClusters_Create_AutoScalePool(t *testing.T) {
Tags: []string{"cluster-tag-1", "cluster-tag-2"}, Tags: []string{"cluster-tag-1", "cluster-tag-2"},
VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6",
NodePools: []*KubernetesNodePool{ NodePools: []*KubernetesNodePool{
&KubernetesNodePool{ {
ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a",
Size: "s-1vcpu-1gb", Size: "s-1vcpu-1gb",
Count: 2, Count: 2,
@ -652,7 +652,7 @@ func TestKubernetesClusters_Create_AutoScalePool(t *testing.T) {
Tags: want.Tags, Tags: want.Tags,
VPCUUID: want.VPCUUID, VPCUUID: want.VPCUUID,
NodePools: []*KubernetesNodePoolCreateRequest{ NodePools: []*KubernetesNodePoolCreateRequest{
&KubernetesNodePoolCreateRequest{ {
Size: want.NodePools[0].Size, Size: want.NodePools[0].Size,
Count: want.NodePools[0].Count, Count: want.NodePools[0].Count,
Name: want.NodePools[0].Name, Name: want.NodePools[0].Name,
@ -734,7 +734,7 @@ func TestKubernetesClusters_Update(t *testing.T) {
VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6",
SurgeUpgrade: true, SurgeUpgrade: true,
NodePools: []*KubernetesNodePool{ NodePools: []*KubernetesNodePool{
&KubernetesNodePool{ {
ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a",
Size: "s-1vcpu-1gb", Size: "s-1vcpu-1gb",
Count: 2, Count: 2,
@ -831,7 +831,7 @@ func TestKubernetesClusters_Update_FalseAutoUpgrade(t *testing.T) {
Tags: []string{"cluster-tag-1", "cluster-tag-2"}, Tags: []string{"cluster-tag-1", "cluster-tag-2"},
VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6", VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6",
NodePools: []*KubernetesNodePool{ NodePools: []*KubernetesNodePool{
&KubernetesNodePool{ {
ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a", ID: "8d91899c-0739-4a1a-acc5-deadbeefbb8a",
Size: "s-1vcpu-1gb", Size: "s-1vcpu-1gb",
Count: 2, Count: 2,

View File

@ -850,7 +850,7 @@ func TestLoadBalancers_AsRequest(t *testing.T) {
Algorithm: "least_connections", Algorithm: "least_connections",
Region: "lon1", Region: "lon1",
SizeSlug: "lb-small", SizeSlug: "lb-small",
ForwardingRules: []ForwardingRule{ForwardingRule{ ForwardingRules: []ForwardingRule{{
EntryProtocol: "http", EntryProtocol: "http",
EntryPort: 80, EntryPort: 80,
TargetProtocol: "http", TargetProtocol: "http",
@ -901,13 +901,13 @@ func TestLoadBalancers_AsRequest(t *testing.T) {
}) })
assert.Equal(t, []int{12345, 54321}, r.DropletIDs) assert.Equal(t, []int{12345, 54321}, r.DropletIDs)
assert.Equal(t, []ForwardingRule{ assert.Equal(t, []ForwardingRule{
ForwardingRule{ {
EntryProtocol: "http", EntryProtocol: "http",
EntryPort: 80, EntryPort: 80,
TargetProtocol: "http", TargetProtocol: "http",
TargetPort: 80, TargetPort: 80,
}, },
ForwardingRule{ {
EntryProtocol: "https", EntryProtocol: "https",
EntryPort: 443, EntryPort: 443,
TargetProtocol: "https", TargetProtocol: "https",