etcd-diagnosis icon indicating copy to clipboard operation
etcd-diagnosis copied to clipboard

golangci-lint errors

Open ahrtr opened this issue 8 months ago • 1 comments

Running [/home/runner/golangci-lint-1.53.3-linux-amd64/golangci-lint run] in [/home/runner/work/etcd-diagnosis/etcd-diagnosis] ...
  Error: plugins/epstatus/plugin.go:58:35: ck.GlobalConfig undefined (type *epStatusChecker has no field or method GlobalConfig) (typecheck)
  	if eps, err = agent.Endpoints(ck.GlobalConfig); err != nil {
  	                                 ^
  Error: plugins/epstatus/plugin.go:75:73: ck.GlobalConfig undefined (type *epStatusChecker has no field or method GlobalConfig) (typecheck)
  			if chkResult.EpStatusList[i].EpStatus, err = agent.EndpointStatus(ck.GlobalConfig, ep); err != nil {
  			                                                                     ^
  Error: plugins/epstatus/plugin.go:113:29: ck.GlobalConfig undefined (type *epStatusChecker has no field or method GlobalConfig) (typecheck)
  	checkDBSize(&chkResult, ck.GlobalConfig)
  	                           ^
  Error: plugins/membership/plugin.go:53:35: ck.GlobalConfig undefined (type *membershipChecker has no field or method GlobalConfig) (typecheck)
  	if eps, err = agent.Endpoints(ck.GlobalConfig); err != nil {
  	                                 ^
  Error: plugins/membership/plugin.go:62:48: ck.GlobalConfig undefined (type *membershipChecker has no field or method GlobalConfig) (typecheck)
  		if memberLists[i], err = agent.MemberList(ck.GlobalConfig, []string{ep}, clientv3.WithSerializable()); err != nil {
  		                                             ^
  Error: plugins/metrics/plugin.go:66:35: ck.GlobalConfig undefined (type *metricsChecker has no field or method GlobalConfig) (typecheck)
  	if eps, err = agent.Endpoints(ck.GlobalConfig); err != nil {
  	                                 ^
  Error: plugins/metrics/plugin.go:84:39: ck.GlobalConfig undefined (type *metricsChecker has no field or method GlobalConfig) (typecheck)
  		allMetrics, err := agent.Metrics(ck.GlobalConfig, ep)
  		                                    ^
  Error: plugins/read/plugin.go:67:35: ck.GlobalConfig undefined (type *readChecker has no field or method GlobalConfig) (typecheck)
  	if eps, err = agent.Endpoints(ck.GlobalConfig); err != nil {
  	                                 ^
  Error: plugins/read/plugin.go:88:[28](https://github.com/ahrtr/etcd-diagnosis/actions/runs/9417024444/job/25941371734#step:4:30): ck.GlobalConfig undefined (type *readChecker has no field or method GlobalConfig) (typecheck)
  				_, err = agent.Read(ck.GlobalConfig, []string{ep}, "health")
  				                       ^
  Error: plugins/read/plugin.go:90:28: ck.GlobalConfig undefined (type *readChecker has no field or method GlobalConfig) (typecheck)
  				_, err = agent.Read(ck.GlobalConfig, []string{ep}, "health", clientv3.WithSerializable())
  				                       ^
  Error: ../../../../../opt/hostedtoolcache/go/1.21.11/x64/src/net/http/internal/chunked.go:79:14: undefined: max (typecheck)
  	cr.excess = max(cr.excess, 0)
  	            ^

ahrtr avatar Jun 07 '24 12:06 ahrtr