Skip to content

Address issues from staticcheck #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
russorat opened this issue Jul 8, 2020 · 6 comments · Fixed by #156
Closed

Address issues from staticcheck #147

russorat opened this issue Jul 8, 2020 · 6 comments · Fixed by #156
Assignees

Comments

@russorat
Copy link

russorat commented Jul 8, 2020

staticcheck -show-ignored -checks="all" ./...

  • api/authorizations.go:13:6: type AuthorizationsApi should be AuthorizationsAPI (ST1003)
  • api/authorizations.go:19:50: interface method parameter userId should be userID (ST1003)
  • api/authorizations.go:23:49: interface method parameter orgId should be orgID (ST1003)
  • api/authorizations.go:27:52: interface method parameter orgId should be orgID (ST1003)
  • api/authorizations.go:29:49: interface method parameter authId should be authID (ST1003)
  • api/authorizations.go:31:43: interface method parameter authId should be authID (ST1003)
  • api/authorizations.go:34:6: type authorizationsApiImpl should be authorizationsAPIImpl (ST1003)
  • api/authorizations.go:38:6: func NewAuthorizationApi should be NewAuthorizationAPI (ST1003)
  • api/authorizations.go:62:33: method FindAuthorizationsByUserId should be FindAuthorizationsByUserID (ST1003)
  • api/authorizations.go:62:81: method parameter userId should be userID (ST1003)
  • api/authorizations.go:80:33: method FindAuthorizationsByOrgId should be FindAuthorizationsByOrgID (ST1003)
  • api/authorizations.go:80:80: method parameter orgId should be orgID (ST1003)
  • api/authorizations.go:118:33: method CreateAuthorizationWithOrgId should be CreateAuthorizationWithOrgID (ST1003)
  • api/authorizations.go:118:83: method parameter orgId should be orgID (ST1003)
  • api/authorizations.go:128:80: method parameter authId should be authID (ST1003)
  • api/authorizations.go:141:74: method parameter authId should be authID (ST1003)
  • api/buckets.go:13:6: type BucketsApi should be BucketsAPI (ST1003)
  • api/buckets.go:19:38: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:21:42: interface method parameter orgId should be orgID (ST1003)
  • api/buckets.go:29:50: interface method parameter orgId should be orgID (ST1003)
  • api/buckets.go:35:42: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:39:40: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:43:39: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:43:49: interface method parameter memberId should be memberID (ST1003)
  • api/buckets.go:47:42: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:47:52: interface method parameter memberId should be memberID (ST1003)
  • api/buckets.go:51:39: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:55:38: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:55:48: interface method parameter memberId should be memberID (ST1003)
  • api/buckets.go:59:41: interface method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:59:51: interface method parameter memberId should be memberID (ST1003)
  • api/buckets.go:62:6: type bucketsApiImpl should be bucketsAPIImpl (ST1003)
  • api/buckets.go:66:6: func NewBucketsApi should be NewBucketsAPI (ST1003)
  • api/buckets.go:109:26: method FindBucketById should be FindBucketByID (ST1003)
  • api/buckets.go:109:62: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:121:26: method FindBucketsByOrgId should be FindBucketsByOrgID (ST1003)
  • api/buckets.go:121:66: method parameter orgId should be orgID (ST1003)
  • api/buckets.go:150:26: method CreateBucketWithNameWithId should be CreateBucketWithNameWithID (ST1003)
  • api/buckets.go:150:74: method parameter orgId should be orgID (ST1003)
  • api/buckets.go:173:26: method DeleteBucketWithId should be DeleteBucketWithID (ST1003)
  • api/buckets.go:173:66: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:204:26: method GetMembersWithId should be GetMembersWithID (ST1003)
  • api/buckets.go:204:64: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:220:26: method AddMemberWithId should be AddMemberWithID (ST1003)
  • api/buckets.go:220:63: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:220:73: method parameter memberId should be memberID (ST1003)
  • api/buckets.go:237:26: method RemoveMemberWithId should be RemoveMemberWithID (ST1003)
  • api/buckets.go:237:66: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:237:76: method parameter memberId should be memberID (ST1003)
  • api/buckets.go:253:26: method GetOwnersWithId should be GetOwnersWithID (ST1003)
  • api/buckets.go:253:63: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:269:26: method AddOwnerWithId should be AddOwnerWithID (ST1003)
  • api/buckets.go:269:62: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:269:72: method parameter ownerId should be ownerID (ST1003)
  • api/buckets.go:286:26: method RemoveOwnerWithId should be RemoveOwnerWithID (ST1003)
  • api/buckets.go:286:65: method parameter bucketId should be bucketID (ST1003)
  • api/buckets.go:286:75: method parameter memberId should be memberID (ST1003)
  • api/delete.go:17:6: type DeleteApi should be DeleteAPI (ST1003)
  • api/delete.go:21:36: interface method parameter orgId should be orgID (ST1003)
  • api/delete.go:21:43: interface method parameter bucketId should be bucketID (ST1003)
  • api/delete.go:26:6: type deleteApiImpl should be deleteAPIImpl (ST1003)
  • api/delete.go:30:6: func NewDeleteApi should be NewDeleteAPI (ST1003)
  • api/delete.go:69:25: method DeleteWithId should be DeleteWithID (ST1003)
  • api/delete.go:69:59: method parameter orgId should be orgID (ST1003)
  • api/delete.go:69:66: method parameter bucketId should be bucketID (ST1003)
  • api/examples_test.go:20:2: var bucketsApi should be bucketsAPI (ST1003)
  • api/examples_test.go:49:2: var writeApi should be writeAPI (ST1003)
  • api/examples_test.go:82:2: var writeApi should be writeAPI (ST1003)
  • api/examples_test.go:114:2: var writeApi should be writeAPI (ST1003)
  • api/examples_test.go:149:2: var queryApi should be queryAPI (ST1003)
  • api/examples_test.go:177:2: var queryApi should be queryAPI (ST1003)
  • api/examples_test.go:196:2: var orgApi should be orgAPI (ST1003)
  • api/examples_test.go:304:2: var usersApi should be usersAPI (ST1003)
  • api/examples_test.go:333:2: var labelsApi should be labelsAPI (ST1003)
  • api/examples_test.go:335:2: var orgsApi should be orgsAPI (ST1003)
  • api/http/options.go:5:1: at least one file in a package should have a package comment (ST1000)
  • api/http/options.go:20:19: method TlsConfig should be TLSConfig (ST1003)
  • api/http/options.go:25:19: method SetTlsConfig should be SetTLSConfig (ST1003)
  • api/http/options.go:31:19: method HttpRequestTimeout should be HTTPRequestTimeout (ST1003)
  • api/http/options.go:36:19: method SetHttpRequestTimeout should be SetHTTPRequestTimeout (ST1003)
  • api/labels.go:14:6: type LabelsApi should be LabelsAPI (ST1003)
  • api/labels.go:24:39: interface method parameter orgId should be orgID (ST1003)
  • api/labels.go:32:49: interface method parameter orgId should be orgID (ST1003)
  • api/labels.go:42:6: type labelsApiImpl should be labelsAPIImpl (ST1003)
  • api/labels.go:46:6: func NewLabelsApi should be NewLabelsAPI (ST1003)
  • api/labels.go:72:25: method FindLabelsByOrgId should be FindLabelsByOrgID (ST1003)
  • api/labels.go:77:25: method FindLabelById should be FindLabelByID (ST1003)
  • api/labels.go:89:62: method parameter orgId should be orgID (ST1003)
  • api/labels.go:111:25: method CreateLabelWithNameWithId should be CreateLabelWithNameWithID (ST1003)
  • api/labels.go:111:72: method parameter orgId should be orgID (ST1003)
  • api/labels.go:155:25: method DeleteLabelWithId should be DeleteLabelWithID (ST1003)
  • api/organizations.go:13:6: type OrganizationsApi should be OrganizationsAPI (ST1003)
  • api/organizations.go:19:44: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:21:49: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:31:48: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:35:40: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:39:39: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:39:46: interface method parameter memberId should be memberID (ST1003)
  • api/organizations.go:43:42: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:43:49: interface method parameter memberId should be memberID (ST1003)
  • api/organizations.go:47:39: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:51:38: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:51:45: interface method parameter memberId should be memberID (ST1003)
  • api/organizations.go:55:41: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:55:48: interface method parameter memberId should be memberID (ST1003)
  • api/organizations.go:59:39: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:63:38: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:63:45: interface method parameter labelId should be labelID (ST1003)
  • api/organizations.go:67:41: interface method parameter orgId should be orgID (ST1003)
  • api/organizations.go:67:48: interface method parameter labelId should be labelID (ST1003)
  • api/organizations.go:70:6: type organizationsApiImpl should be organizationsAPIImpl (ST1003)
  • api/organizations.go:74:6: func NewOrganizationsApi should be NewOrganizationsAPI (ST1003)
  • api/organizations.go:104:32: method FindOrganizationById should be FindOrganizationByID (ST1003)
  • api/organizations.go:104:74: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:116:32: method FindOrganizationsByUserId should be FindOrganizationsByUserID (ST1003)
  • api/organizations.go:158:32: method DeleteOrganizationWithId should be DeleteOrganizationWithID (ST1003)
  • api/organizations.go:158:78: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:189:32: method GetMembersWithId should be GetMembersWithID (ST1003)
  • api/organizations.go:189:70: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:208:32: method AddMemberWithId should be AddMemberWithID (ST1003)
  • api/organizations.go:208:69: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:208:76: method parameter memberId should be memberID (ST1003)
  • api/organizations.go:225:32: method RemoveMemberWithId should be RemoveMemberWithID (ST1003)
  • api/organizations.go:225:72: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:225:79: method parameter memberId should be memberID (ST1003)
  • api/organizations.go:241:32: method GetOwnersWithId should be GetOwnersWithID (ST1003)
  • api/organizations.go:241:69: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:260:32: method AddOwnerWithId should be AddOwnerWithID (ST1003)
  • api/organizations.go:260:68: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:260:75: method parameter ownerId should be ownerID (ST1003)
  • api/organizations.go:277:32: method RemoveOwnerWithId should be RemoveOwnerWithID (ST1003)
  • api/organizations.go:277:71: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:277:78: method parameter memberId should be memberID (ST1003)
  • api/organizations.go:293:32: method GetLabelsWithId should be GetLabelsWithID (ST1003)
  • api/organizations.go:293:69: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:309:32: method AddLabelWithId should be AddLabelWithID (ST1003)
  • api/organizations.go:309:68: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:309:75: method parameter labelId should be labelID (ST1003)
  • api/organizations.go:326:32: method RemoveLabelWithId should be RemoveLabelWithID (ST1003)
  • api/organizations.go:326:71: method parameter orgId should be orgID (ST1003)
  • api/organizations.go:326:78: method parameter memberId should be memberID (ST1003)
  • api/query.go:44:6: type QueryApi should be QueryAPI (ST1003)
  • api/query.go:51:6: func NewQueryApi should be NewQueryAPI (ST1003)
  • api/query.go:59:6: type queryApiImpl should be queryAPIImpl (ST1003)
  • api/query.go:67:2: var queryUrl should be queryURL (ST1003)
  • api/query.go:73:2: var qrJson should be qrJSON (ST1003)
  • api/query.go:116:2: var queryUrl should be queryURL (ST1003)
  • api/query.go:122:2: var qrJson should be qrJSON (ST1003)
  • api/query.go:148:24: method queryUrl should be queryURL (ST1003)
  • api/query/table.go:5:1: at least one file in a package should have a package comment (ST1000)
  • api/query_test.go:511:2: var queryApi should be queryAPI (ST1003)
  • api/query_test.go:906:2: var queryApi should be queryAPI (ST1003)
  • api/users.go:14:6: type UsersApi should be UsersAPI (ST1003)
  • api/users.go:41:6: type usersApiImpl should be usersAPIImpl (ST1003)
  • api/users.go:45:6: func NewUsersApi should be NewUsersAPI (ST1003)
  • api/users.go:63:24: method FindUserById should be FindUserByID (ST1003)
  • api/users.go:126:24: method UpdateUserPasswordWithId should be UpdateUserPasswordWithID (ST1003)
  • api/users.go:143:24: method DeleteUserWithId should be DeleteUserWithID (ST1003)
  • api/write.go:18:6: type WriteApi should be WriteAPI (ST1003)
  • api/write.go:37:6: type writeApiImpl should be writeAPIImpl (ST1003)
  • api/write.go:57:6: func NewWriteApiImpl should be NewWriteAPIImpl (ST1003)
  • api/write/ext.go:5:1: at least one file in a package should have a package comment (ST1000)
  • api/write/options.go:5:1: at least one file in a package should have a package comment (ST1000)
  • api/write/point.go:5:1: at least one file in a package should have a package comment (ST1000)
  • api/writeApiBlocking.go:16:6: type WriteApiBlocking should be WriteAPIBlocking (ST1003)
  • api/writeApiBlocking.go:28:6: type writeApiBlockingImpl should be writeAPIBlockingImpl (ST1003)
  • api/writeApiBlocking.go:34:6: func NewWriteApiBlockingImpl should be NewWriteAPIBlockingImpl (ST1003)
  • api/writeApiBlocking_test.go:22:2: var writeApi should be writeAPI (ST1003)
  • api/writeApiBlocking_test.go:37:2: var writeApi should be writeAPI (ST1003)
  • api/writeApiBlocking_test.go:59:2: var writeApi should be writeAPI (ST1003)
  • api/write_test.go:27:6: type testHttpService should be testHTTPService (ST1003)
  • api/write_test.go:28:2: struct field serverUrl should be serverURL (ST1003)
  • api/write_test.go:38:27: method ServerUrl should be ServerURL (ST1003)
  • api/write_test.go:42:27: method ServerApiUrl should be ServerAPIURL (ST1003)
  • api/write_test.go:50:27: method HttpClient should be HTTPClient (ST1003)
  • api/write_test.go:77:27: method DoHttpRequest should be DoHTTPRequest (ST1003)
  • api/write_test.go:81:27: method DoHttpRequestWithResponse should be DoHTTPRequestWithResponse (ST1003)
  • api/write_test.go:134:35: func parameter serverUrl should be serverURL (ST1003)
  • api/write_test.go:189:2: var writeApi should be writeAPI (ST1003)
  • api/write_test.go:205:2: var writeApi should be writeAPI (ST1003)
  • api/write_test.go:223:2: var writeApi should be writeAPI (ST1003)
  • api/write_test.go:248:2: var writeApi should be writeAPI (ST1003)
  • api/write_test.go:273:2: var writeApi should be writeAPI (ST1003)
  • api/write_test.go:315:2: var writeApi should be writeAPI (ST1003)
  • client.go:62:2: struct field serverUrl should be serverURL (ST1003)
  • client.go:68:2: struct field authApi should be authAPI (ST1003)
  • client.go:69:2: struct field orgApi should be orgAPI (ST1003)
  • client.go:70:2: struct field usersApi should be usersAPI (ST1003)
  • client.go:71:2: struct field deleteApi should be deleteAPI (ST1003)
  • client.go:72:2: struct field bucketsApi should be bucketsAPI (ST1003)
  • client.go:73:2: struct field labelsApi should be labelsAPI (ST1003)
  • client.go:79:16: func parameter serverUrl should be serverURL (ST1003)
  • client.go:87:27: func parameter serverUrl should be serverURL (ST1003)
  • client.go:103:22: method ServerUrl should be ServerURL (ST1003)
  • client.go:161:22: method WriteApi should be WriteAPI (ST1003)
  • client.go:167:22: method WriteApiBlocking should be WriteAPIBlocking (ST1003)
  • client.go:178:22: method QueryApi should be QueryAPI (ST1003)
  • client.go:182:22: method AuthorizationsApi should be AuthorizationsAPI (ST1003)
  • client.go:191:22: method OrganizationsApi should be OrganizationsAPI (ST1003)
  • client.go:200:22: method UsersApi should be UsersAPI (ST1003)
  • client.go:209:22: method DeleteApi should be DeleteAPI (ST1003)
  • client.go:218:22: method BucketsApi should be BucketsAPI (ST1003)
  • client.go:227:22: method LabelsApi should be LabelsAPI (ST1003)
  • internal/examples/fakeclient.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/examples/fakeclient.go:45:22: method ServerUrl should be ServerURL (ST1003)
  • internal/examples/fakeclient.go:61:22: method WriteApi should be WriteAPI (ST1003)
  • internal/examples/fakeclient.go:65:22: method WriteApiBlocking should be WriteAPIBlocking (ST1003)
  • internal/examples/fakeclient.go:72:22: method QueryApi should be QueryAPI (ST1003)
  • internal/examples/fakeclient.go:76:22: method AuthorizationsApi should be AuthorizationsAPI (ST1003)
  • internal/examples/fakeclient.go:80:22: method OrganizationsApi should be OrganizationsAPI (ST1003)
  • internal/examples/fakeclient.go:84:22: method UsersApi should be UsersAPI (ST1003)
  • internal/examples/fakeclient.go:88:22: method DeleteApi should be DeleteAPI (ST1003)
  • internal/examples/fakeclient.go:92:22: method BucketsApi should be BucketsAPI (ST1003)
  • internal/examples/fakeclient.go:96:22: method LabelsApi should be LabelsAPI (ST1003)
  • internal/gzip/gzip.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/http/error.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/http/service.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/http/service.go:41:2: struct field serverApiUrl should be serverAPIURL (ST1003)
  • internal/http/service.go:42:2: struct field serverUrl should be serverURL (ST1003)
  • internal/http/service.go:48:17: func parameter serverUrl should be serverURL (ST1003)
  • internal/http/service.go:49:2: var apiUrl should be apiURL (ST1003)
  • internal/http/service.go:50:2: var serverApiUrl should be serverAPIURL (ST1003)
  • internal/http/service.go:74:23: method ServerApiUrl should be ServerAPIURL (ST1003)
  • internal/http/service.go:78:23: method ServerUrl should be ServerURL (ST1003)
  • internal/http/service.go:90:23: method HttpClient should be HTTPClient (ST1003)
  • internal/http/service.go:98:23: method doHttpRequestWithUrl should be doHTTPRequestWithURL (ST1003)
  • internal/http/service.go:106:23: method DoHttpRequest should be DoHTTPRequest (ST1003)
  • internal/http/service.go:124:23: method DoHttpRequestWithResponse should be DoHTTPRequestWithResponse (ST1003)
  • internal/http/service.go:137:23: method handleHttpError should be handleHTTPError (ST1003)
  • internal/http/userAgent.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/log/logger.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/test/point.go:1:1: at least one file in a package should have a package comment (ST1000)
  • internal/write/queue.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/write/service.go:5:1: at least one file in a package should have a package comment (ST1000)
  • internal/write/service.go:107:2: var wUrl should be wURL (ST1003)
  • internal/write/service.go:112:2: should merge variable declaration with assignment on next line (S1021)
  • internal/write/service.go:226:19: method WriteUrl should be WriteURL (ST1003)
  • options.go:114:19: method TlsConfig should be TLSConfig (ST1003)
  • options.go:119:19: method SetTlsConfig should be SetTLSConfig (ST1003)
  • options.go:125:19: method HttpRequestTimeout should be HTTPRequestTimeout (ST1003)
  • options.go:130:19: method SetHttpRequestTimeout should be SetHTTPRequestTimeout (ST1003)
  • options.go:144:19: method HttpOptions should be HTTPOptions (ST1003)
  • options_test.go:81:2: var queryApi should be queryAPI (ST1003)
@russorat
Copy link
Author

russorat commented Jul 8, 2020

fyi @GeorgeMac @e-dard

@vlastahajek
Copy link
Contributor

@russorat, fixing most of those issues will change public API and make a compilation failing for users.
Proceed anyway?

@vlastahajek vlastahajek self-assigned this Jul 9, 2020
@e-dard
Copy link

e-dard commented Jul 9, 2020

@vlastahajek @russorat 👋 for me I would love to see all of these checks (including ST1003 met). Usually ST1003 wouldn't be such a big deal in an internal codebase, but for a public facing Go client I think it's nice to use idiomatic naming conventions.

However, I think pragmatically we might be better off holding off on these ST1003 checks in case we end up having to break the API for another reason. Concretely, it would be better to bundle this breaking change into a more meaningful breaking change (if that is necessary).

For now I would ignore the ST1003 check and satisfy the other checks. Of course, some of the ST1003 checks could be fixed now without breaking the API, for example options_test.go:81:2: var queryApi should be queryAPI (ST1003)

Hope that helps!

@ivankudibal
Copy link
Contributor

ivankudibal commented Jul 9, 2020

On ST1003, we can follow these recs:

  1. what we find in the Swagger (eg. bucketID) is most relevant,
  2. naming convention should comply to programming language conventions, Google Style Guide will be used (and for Go this one https://github.com/golang/go/wiki/CodeReviewComments#initialisms)
  3. naming rules will be generated and checked by the swagger clients generator (being prepared in a specific repo). Go uses different generator than Java

Breaking changes might be introduced with a major version number..

@vlastahajek
Copy link
Contributor

@e-dard, fixing issues in the nonpublic parts is without objections 😉

@vlastahajek
Copy link
Contributor

Two things to consider:

Timeline
What about fixing this in two phases:

1st release, eg, 1.4.0

  • deprecate API with wrong naming conventions
  • add API with fixed naming conventions

2nd release, eg. 1.5.0

  • remove API with wrong naming conventions

Package rename
As public interface types are also affected by wrong naming conventions, I'm thinking also about improving a bit the API interfaces package name.
Now: api.WriteApi
New: apis.WriteAPI

Even without changing the package name, each user will have to change usage methods of the Client interface, which returns all supported API interfaces, and some methods of those interfaces. I suppose most users are using the short variable declaration or chaining the call to an interface method directly from the getter:

    client := influxdb2.NewClient("http://localhost:9999", "my-token")
    orgApi := client.OrganizationsApi()
    org, err := orgApi.FindOrganizationById(ctx, "000000000000001")
     ....
    org, err := client.OrganizationsApi().FindOrganizationById(ctx, "000000000000001") 

With an intelligent IDE (e.g. GoLand) such change in package name will be automatically detected and the required change in imports will be made automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants