alpacahq / alpacahq/alpaca-trade-api-go
Return actual error types instead of generic + string
Open
- Dominant language
- Go
- Stars
- 429
- Forks
- 118
- PR merge metrics
- No merged PRs in 30d
Description
idiomatic go suggests you should pass an specific error type instead of just a string. For example, if i query for a ticker position and dont have one, you should return `ErrPositionNotExist`, not a string.
example, return something like this: `var ErrPositionNotExistForTicker = errors.New("position does not exist")`
then i can check with `error.Is()`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.