From c955c934157cfdedeeea63de65b8f9719ca119e6 Mon Sep 17 00:00:00 2001 From: tdstein Date: Fri, 8 Sep 2023 11:11:24 -0400 Subject: [PATCH] Sets omitempty on optional fields. --- internal/state/connect.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/state/connect.go b/internal/state/connect.go index c60a840b8c..2b9daf15b4 100644 --- a/internal/state/connect.go +++ b/internal/state/connect.go @@ -14,24 +14,24 @@ type ConnectDeployment struct { } type ConnectContent struct { - Name types.ContentName `json:"name,omitempty"` + Name types.ContentName `json:"name,"` Title string `json:"title,omitempty"` - Description string `json:"description,omitempty"` - AccessType string `json:"access_type,omitempty"` - ConnectionTimeout types.NullInt32 `json:"connection_timeout"` - ReadTimeout types.NullInt32 `json:"read_timeout"` - InitTimeout types.NullInt32 `json:"init_timeout"` - IdleTimeout types.NullInt32 `json:"idle_timeout"` - MaxProcesses types.NullInt32 `json:"max_processes"` - MinProcesses types.NullInt32 `json:"min_processes"` - MaxConnsPerProcess types.NullInt32 `json:"max_conns_per_process" kong:"name='max-connections'"` - LoadFactor types.NullFloat64 `json:"load_factor"` + Description string `json:"description"` + AccessType string `json:"access_type"` + ConnectionTimeout types.NullInt32 `json:"connection_timeout,omitempty"` + ReadTimeout types.NullInt32 `json:"read_timeout,omitempty"` + InitTimeout types.NullInt32 `json:"init_timeout,omitempty"` + IdleTimeout types.NullInt32 `json:"idle_timeout,omitempty"` + MaxProcesses types.NullInt32 `json:"max_processes,omitempty"` + MinProcesses types.NullInt32 `json:"min_processes,omitempty"` + MaxConnsPerProcess types.NullInt32 `json:"max_conns_per_process,omitempty" kong:"name='max-connections'"` + LoadFactor types.NullFloat64 `json:"load_factor,omitempty"` RunAs string `json:"run_as,omitempty"` - RunAsCurrentUser types.NullBool `json:"run_as_current_user"` - MemoryRequest types.NullInt64 `json:"memory_request"` - MemoryLimit types.NullInt64 `json:"memory_limit"` - CPURequest types.NullFloat64 `json:"cpu_request"` - CPULimit types.NullFloat64 `json:"cpu_limit"` + RunAsCurrentUser types.NullBool `json:"run_as_current_user,omitempty"` + MemoryRequest types.NullInt64 `json:"memory_request,omitempty"` + MemoryLimit types.NullInt64 `json:"memory_limit,omitempty"` + CPURequest types.NullFloat64 `json:"cpu_request,omitempty"` + CPULimit types.NullFloat64 `json:"cpu_limit,omitempty"` ServiceAccountName string `json:"service_account_name,omitempty"` DefaultImageName string `json:"default_image_name,omitempty"` }