Browse Source

fix golint issues (#532)

Kevin Wan 3 năm trước cách đây
mục cha
commit
c4b2cddef7
2 tập tin đã thay đổi với 6 bổ sung5 xóa
  1. 1 0
      core/stat/internal/cpu_linux.go
  2. 5 5
      zrpc/internal/resolver/resolver.go

+ 1 - 0
core/stat/internal/cpu_linux.go

@@ -67,6 +67,7 @@ func init() {
 	}
 }
 
+// RefreshCpu refreshes cpu usage and returns.
 func RefreshCpu() uint64 {
 	total, err := totalCpuUsage()
 	if err != nil {

+ 5 - 5
zrpc/internal/resolver/resolver.go

@@ -7,25 +7,25 @@ import (
 )
 
 const (
-	// DirectScheme stands for direct schema.
+	// DirectScheme stands for direct scheme.
 	DirectScheme = "direct"
-	// DiscovSchema stands for discov schema.
+	// DiscovScheme stands for discov scheme.
 	DiscovScheme = "discov"
-	// EnpointSepChar is the separator cha in endpoints.
+	// EndpointSepChar is the separator cha in endpoints.
 	EndpointSepChar = ','
 
 	subsetSize = 32
 )
 
 var (
-	// EnpointSep is the separator string in endpoints.
+	// EndpointSep is the separator string in endpoints.
 	EndpointSep = fmt.Sprintf("%c", EndpointSepChar)
 
 	dirBuilder directBuilder
 	disBuilder discovBuilder
 )
 
-// RegisterResolver registers the direct and discov schemas to the resolver.
+// RegisterResolver registers the direct and discov schemes to the resolver.
 func RegisterResolver() {
 	resolver.Register(&dirBuilder)
 	resolver.Register(&disBuilder)