From d1588573613b952107e492bd6aceae4d1bbc7d07 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Mon, 15 May 2023 16:51:58 +0800 Subject: [PATCH] fix: fail to save locations #116 --- server/internal/nginx/type.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/internal/nginx/type.go b/server/internal/nginx/type.go index 5ff5851f0..e583ea07d 100644 --- a/server/internal/nginx/type.go +++ b/server/internal/nginx/type.go @@ -9,21 +9,21 @@ import ( type NgxConfig struct { FileName string `json:"file_name"` Name string `json:"name"` - Upstreams []*NgxUpstream `json:"upstreams,omitempty"` - Servers []*NgxServer `json:"servers,omitempty"` + Upstreams []*NgxUpstream `json:"upstreams"` + Servers []*NgxServer `json:"servers"` Custom string `json:"custom"` c *gonginx.Config } type NgxServer struct { - Directives []*NgxDirective `json:"directives,omitempty"` - Locations []*NgxLocation `json:"locations,omitempty"` + Directives []*NgxDirective `json:"directives"` + Locations []*NgxLocation `json:"locations"` Comments string `json:"comments"` } type NgxUpstream struct { Name string `json:"name"` - Directives []*NgxDirective `json:"directives,omitempty"` + Directives []*NgxDirective `json:"directives"` Comments string `json:"comments"` }