浏览代码

Add omitempty for listen_port

世界 3 年之前
父节点
当前提交
c57ea9e47c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      option/inbound.go

+ 1 - 1
option/inbound.go

@@ -92,7 +92,7 @@ type InboundOptions struct {
 
 type ListenOptions struct {
 	Listen      ListenAddress `json:"listen"`
-	ListenPort  uint16        `json:"listen_port"`
+	ListenPort  uint16        `json:"listen_port,omitempty"`
 	TCPFastOpen bool          `json:"tcp_fast_open,omitempty"`
 	UDPTimeout  int64         `json:"udp_timeout,omitempty"`
 	InboundOptions