From 3f50782ad456445cb7d51e25dd1bcdad0cc9781a Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Sat, 22 Dec 2018 11:46:33 +0300 Subject: [PATCH] Add omitempty to channel settings --- v1/types.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/v1/types.go b/v1/types.go index 951b3e6..0e48d75 100644 --- a/v1/types.go +++ b/v1/types.go @@ -76,40 +76,40 @@ type ChannelSettings struct { // Product type type Product struct { - Creating string `json:"creating"` - Editing string `json:"editing"` - Deleting string `json:"deleting"` + Creating string `json:"creating,omitempty"` + Editing string `json:"editing,omitempty"` + Deleting string `json:"deleting,omitempty"` } // Order type type Order struct { - Creating string `json:"creating"` - Editing string `json:"editing"` - Deleting string `json:"deleting"` + Creating string `json:"creating,omitempty"` + Editing string `json:"editing,omitempty"` + Deleting string `json:"deleting,omitempty"` } // Status struct type Status struct { - Delivered string `json:"delivered"` - Read string `json:"read"` + Delivered string `json:"delivered,omitempty"` + Read string `json:"read,omitempty"` } // ChannelSettingsText struct type ChannelSettingsText struct { - Creating string `json:"creating"` - Editing string `json:"editing"` - Quoting string `json:"quoting"` - Deleting string `json:"deleting"` - MaxCharsCount uint16 `json:"max_chars_count"` + Creating string `json:"creating,omitempty"` + Editing string `json:"editing,omitempty"` + Quoting string `json:"quoting,omitempty"` + Deleting string `json:"deleting,omitempty"` + MaxCharsCount uint16 `json:"max_chars_count,omitempty"` } // ChannelSettingsFilesBase struct type ChannelSettingsFilesBase struct { - Creating string `json:"creating"` - Editing string `json:"editing"` - Quoting string `json:"quoting"` - Deleting string `json:"deleting"` - Max uint64 `json:"max_items_count"` + Creating string `json:"creating,omitempty"` + Editing string `json:"editing,omitempty"` + Quoting string `json:"quoting,omitempty"` + Deleting string `json:"deleting,omitempty"` + Max uint64 `json:"max_items_count,omitempty"` } // FullFileResponse uploaded file data