Closed
Description
When migrating from 1.8.1 to 1.9 in https://github.com/status-im/status-go/, I started seeing the following errors:
lib/main.go:5:5: var statusBackend is unused (megacheck)
var statusBackend = api.NewStatusBackend()
^
lib/types.go:10:6: type APIResponse is unused (megacheck)
type APIResponse struct {
^
lib/types.go:16:6: type APIDetailedResponse is unused (megacheck)
type APIDetailedResponse struct {
^
lib/types.go:35:6: type APIFieldError is unused (megacheck)
type APIFieldError struct {
^
lib/types.go:56:6: type APIError is unused (megacheck)
type APIError struct {
^
lib/types.go:66:6: type AccountInfo is unused (megacheck)
type AccountInfo struct {
^
lib/types.go:74:6: type NotifyResult is unused (megacheck)
type NotifyResult struct {
^
lib/types.go:80:6: type SignRequestResult is unused (megacheck)
type SignRequestResult struct {
^
lib/types.go:87:6: type SignRequestsResult is unused (megacheck)
type SignRequestsResult struct {
^
lib/types.go:92:6: type DiscardSignRequestResult is unused (megacheck)
type DiscardSignRequestResult struct {
^
lib/types.go:98:6: type DiscardSignRequestsResult is unused (megacheck)
type DiscardSignRequestsResult struct {
^
lib/utils.go:8:6: func ParseJSONArray is unused (megacheck)
func ParseJSONArray(items string) ([]string, error) {
^
These variables/types are indeed used, so it seems a bug exists in megacheck linter on 1.9.