alpacahq / alpacahq/alpaca-trade-api-go
Return actual error types instead of generic + string
Ouverte
- Langage dominant
- Go
- Étoiles
- 429
- Forks
- 118
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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()`
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.