Skip to content

Client isn't really very Go like #1

@crzyuk

Description

@crzyuk

Hi,

Having tried the client I have to say this isn't really written that well and it's not that nice to use.

Firstly you rely on env vars for tokens which is generally unsafe.

Secondly, the client init is automatically searching for an env var so you get an error even if you attempt to use the NewClient function with a token fetch from a secure source.

Thirdly the client is some strange global variable which isn't that nice to be honest. If you're creating a client with a token as above you end up with a strange floating variable that you have to do something with to avoid linting errors and trying to test things with a hidden global variably is virtually impossible..

Not sure what the aim was here?

Don't get me wrong, the API is great but this client isn't that great from a Go point of view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions