Skip to content

Commit

Permalink
Sets omitempty on optional fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Sep 8, 2023
1 parent 3665d24 commit 5c3087b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions internal/state/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down

0 comments on commit 5c3087b

Please sign in to comment.