Skip to content
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

golint warnings #17

Closed
jnovack opened this issue Oct 5, 2018 · 1 comment
Closed

golint warnings #17

jnovack opened this issue Oct 5, 2018 · 1 comment

Comments

@jnovack
Copy link

jnovack commented Oct 5, 2018

dht.go:19: exported type SensorType should have comment or be unexported
dht.go:22: receiver name should be a reflection of its identity; don't use generic
           names such as "this" or "self"
dht.go:35: comment on exported const DHT11 should be of the form "DHT11 ..."
dht.go:37: comment on exported const DHT22 should be of the form "DHT22 ..."
dht.go:39: comment on exported const AM2302 should be of the form "AM2302 ..."
dht.go:43: comment on exported type Pulse should be of the form "Pulse ..."
           (with optional leading article)
dht.go:55: should drop = 0 from declaration of var boost; it is the zero value
dht.go:83: should drop = 0 from declaration of var value; it is the zero value
dht.go:99: should drop = 0 from declaration of var b; it is the zero value
dht.go:109: don't use ALL_CAPS in Go names; use CamelCase
dht.go:112: don't use ALL_CAPS in Go names; use CamelCase
dht.go:175: if block ends with a return statement, so drop this else and outdent
            its block
dht.go:212: comment on exported function ReadDHTxx should be of the form
            "ReadDHTxx ..."
dht.go:243: comment on exported function ReadDHTxxWithRetry should be of the form 
            "ReadDHTxxWithRetry ..."
dht.go:280: error strings should not be capitalized or end with punctuation or a newline

These seem to be easy fixes, mind if I just do them?

@d2r2
Copy link
Owner

d2r2 commented Oct 6, 2018

Hi @jnovack, I do not mind if you do this job!

The only thing - do not change constants ALL_CAPS case to CamelCase, since these literals are public and I don't want to break public API because it exist for a while.

P.S. Hour ago I just made new pull request where added new API call and made some improvements in call responsiveness. So take latest changes, please, and go on. I don't have any more plans to change anything.

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

No branches or pull requests

2 participants