From 74272546caa6354237e60628eb00cd67f55621ed Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Mon, 15 Mar 2021 17:06:06 +0800 Subject: [PATCH] fix json tag (#769) --- log/level.go | 5 ----- registry/registry.go | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/log/level.go b/log/level.go index 94b32e632..2082b77b8 100644 --- a/log/level.go +++ b/log/level.go @@ -17,11 +17,6 @@ const ( LevelError ) -// Enabled compare whether the logging level is enabled. -func (l Level) Enabled(lv Level) bool { - return lv >= l -} - func (l Level) String() string { switch l { case LevelDebug: diff --git a/registry/registry.go b/registry/registry.go index fcd21b250..a4b4b9540 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -32,16 +32,16 @@ type Watcher interface { // ServiceInstance is an instance of a service in a discovery system. type ServiceInstance struct { // ID is the unique instance ID as registered. - ID string + ID string `json:"id"` // Name is the service name as registered. - Name string + Name string `json:"name"` // Version is the version of the compiled. - Version string + Version string `json:"version"` // Metadata is the kv pair metadata associated with the service instance. - Metadata map[string]string + Metadata map[string]string `json:"metadata"` // Endpoints is endpoint addresses of the service instance. // schema: // http://127.0.0.1:8000?isSecure=false // grpc://127.0.0.1:9000?isSecure=false - Endpoints []string + Endpoints []string `json:"endpoints"` }