You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x@x:~/code/influxdb-client-go$ git log -n 1
commit fa15edd8bd9549750d2f93b6ccb386434df63fbe (HEAD -> master, tag: v2.2.3, origin/master, origin/HEAD)
Author: vlastahajek <vlastimil.hajek@bonitoo.io>
Date: Thu Apr 1 17:17:29 2021 +0200
release version 2.2.3
x@x:~/code/influxdb-client-go$ go get -u golang.org/x/lint/golint
go: downloading golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5
go: downloading golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7
go get: added golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5
go get: upgraded golang.org/x/net v0.0.0-20191112182307-2180aed22343 => v0.0.0-20201021035429-f5854403a974
go get: upgraded golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f => v0.1.0
x@x:~/code/influxdb-client-go$ golint ./...
version.go:15:2: exported const Version should have comment (or a comment on this block) or be unexported
api/authorizations.go:43:1: exported functionNewAuthorizationsAPI should have comment or be unexported
api/buckets.go:70:1: exported functionNewBucketsAPI should have comment or be unexported
api/buckets.go:115:9: if block ends with a return statement, so drop this else and outdent its block
api/delete.go:31:1: exported functionNewDeleteAPI should have comment or be unexported
api/labels.go:47:1: exported functionNewLabelsAPI should have comment or be unexported
api/organizations.go:66:1: exported functionNewOrganizationsAPI should have comment or be unexported
api/organizations.go:104:9: if block ends with a return statement, so drop this else and outdent its block
api/paging.go:9:6: exported type PagingOption should have comment or be unexported
api/query.go:52:1: exported functionNewQueryAPI should have comment or be unexported
api/tasks.go:144:1: exported functionNewTasksAPI should have comment or be unexported
api/users.go:60:1: exported functionNewUsersAPI should have comment or be unexported
api/write.go:57:1: exported functionNewWriteAPI should have comment or be unexported
api/write.go:78:1: exported method WriteAPIImpl.Errors should have comment or be unexported
api/write.go:85:1: exported method WriteAPIImpl.Flush should have comment or be unexported
api/write.go:170:1: exported method WriteAPIImpl.Close should have comment or be unexported
api/write.go:199:1: exported method WriteAPIImpl.WriteRecord should have comment or be unexported
api/write.go:205:1: exported method WriteAPIImpl.WritePoint should have comment or be unexported
api/writeAPIBlocking.go:66:105: exported func NewWriteAPIBlocking returns unexported type*api.writeAPIBlocking, which can be annoying to use
domain/utils.go:11:1: exported functionDomainErrorToError should have comment or be unexported
domain/utils.go:11:6: func name will be used as domain.DomainErrorToError by other packages, and that stutters; consider calling this ErrorToError
internal/examples/fakeclient.go:19:1: exported method Options.SetBatchSize should have comment or be unexported
internal/examples/fakeclient.go:26:1: exported functionNewClient should have comment or be unexported
internal/examples/fakeclient.go:26:36: exported func NewClient returns unexported type*examples.fakeClient, which can be annoying to use
internal/examples/fakeclient.go:31:1: exported functionNewClientWithOptions should have comment or be unexported
internal/examples/fakeclient.go:31:59: exported func NewClientWithOptions returns unexported type*examples.fakeClient, which can be annoying to use
internal/gzip/gzip.go:14:6: exported type ReadWaitCloser should have comment or be unexported
internal/gzip/gzip.go:19:1: exported method ReadWaitCloser.Close should have comment or be unexported
internal/log/logger.go:12:1: exported functionDebugf should have comment or be unexported
internal/log/logger.go:17:1: exported functionDebug should have comment or be unexported
internal/log/logger.go:23:1: exported functionInfof should have comment or be unexported
internal/log/logger.go:28:1: exported functionInfo should have comment or be unexported
internal/log/logger.go:34:1: exported functionWarnf should have comment or be unexported
internal/log/logger.go:39:1: exported functionWarn should have comment or be unexported
internal/log/logger.go:45:1: exported functionErrorf should have comment or be unexported
internal/log/logger.go:51:1: exported functionError should have comment or be unexported
internal/test/generators.go:11:1: exported functionGenPoints should have comment or be unexported
internal/test/generators.go:39:1: exported functionGenRecords should have comment or be unexported
internal/test/http_service.go:23:6: exported type HTTPService should have comment or be unexported
internal/test/http_service.go:34:1: exported method HTTPService.WasGzip should have comment or be unexported
internal/test/http_service.go:38:1: exported method HTTPService.SetWasGzip should have comment or be unexported
internal/test/http_service.go:42:1: exported method HTTPService.ServerURL should have comment or be unexported
internal/test/http_service.go:46:1: exported method HTTPService.ServerAPIURL should have comment or be unexported
internal/test/http_service.go:50:1: exported method HTTPService.Authorization should have comment or be unexported
internal/test/http_service.go:54:1: exported method HTTPService.HTTPClient should have comment or be unexported
internal/test/http_service.go:58:1: exported method HTTPService.Close should have comment or be unexported
internal/test/http_service.go:69:1: exported method HTTPService.SetReplyError should have comment or be unexported
internal/test/http_service.go:75:1: exported method HTTPService.ReplyError should have comment or be unexported
internal/test/http_service.go:81:1: exported method HTTPService.SetAuthorization should have comment or be unexported
internal/test/http_service.go:84:1: exported method HTTPService.GetRequest should have comment or be unexported
internal/test/http_service.go:87:1: exported method HTTPService.DoHTTPRequest should have comment or be unexported
internal/test/http_service.go:91:1: exported method HTTPService.DoHTTPRequestWithResponse should have comment or be unexported
internal/test/http_service.go:95:1: exported method HTTPService.DoPostRequest should have comment or be unexported
internal/test/http_service.go:120:9: if block ends with a return statement, so drop this else and outdent its block
internal/test/http_service.go:138:1: exported method HTTPService.Lines should have comment or be unexported
internal/test/http_service.go:144:1: exported functionNewTestService should have comment or be unexported
internal/write/service.go:26:6: exported type Batch should have comment or be unexported
internal/write/service.go:33:1: exported functionNewBatch should have comment or be unexported
internal/write/service.go:40:6: exported type Service should have comment or be unexported
internal/write/service.go:52:1: exported functionNewService should have comment or be unexported
internal/write/service.go:69:1: exported method Service.HandleWrite should have comment or be unexported
internal/write/service.go:135:11: if block ends with a return statement, so drop this else and outdent its block
internal/write/service.go:148:1: exported method Service.WriteBatch should have comment or be unexported
internal/write/service.go:219:1: exported method Service.EncodePoints should have comment or be unexported
internal/write/service.go:247:1: exported method Service.WriteURL should have comment or be unexported
x@x:~/code/influxdb-client-go$
The text was updated successfully, but these errors were encountered:
We use go vet and stylecheck. Those cover the "main pains". golint seem to be very meticulous.
For example, why to comment implementation method, when it is commented on the interface?
Or the internal stuff, which is mostly simple and self-explanatory.
But, let's fix it to get rid of such style issues.
Best practice. Also any struct can implement any interface in Go if method matches signature. Those interfaces does not need to be even in same package (or even library). But this does not mean that what method does is the same as interface.
vlastahajek
added a commit
to bonitoo-io/influxdb-client-go
that referenced
this issue
Apr 30, 2021
Library code does not pass Go linter checks (https://github.com/golang/lint)
it seems that
golint
is commented out in CI flowinfluxdb-client-go/.circleci/config.yml
Line 25 in fa15edd
Reproduce with:
Example:
The text was updated successfully, but these errors were encountered: