hirokisan / bybit

Bybit client library for Go
https://pkg.go.dev/github.com/hirokisan/bybit/v2
MIT License
90 stars 58 forks source link

fix linter issues #136

Closed Sagleft closed 11 months ago

Sagleft commented 11 months ago

The error text should not start in upper case. Formality, but so as not to be annoyed by the illumination of the linter.

https://github.com/uber-go/guide/blob/master/style.md#errors

hirokisan commented 11 months ago

This is a similar story.

https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context. That is, use fmt.Errorf("something bad") not fmt.Errorf("Something bad"), so that log.Printf("Reading %s: %v", filename, err) formats without a spurious capital letter mid-message. This does not apply to logging, which is implicitly line-oriented and not combined inside other messages.