You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
We should re-organize our code, which handles CLI to not use global options.
Ideally CLI code should only take care of reading arguments and flags from the user and pass them to Go structures, which can be then tested for specific behavior.
The text was updated successfully, but these errors were encountered:
Currently, we use methods like
viper.AutomaticEnv()
, which are global and may cause side-effects like #595.Also globals should generally be avoided in Go: https://peter.bourgon.org/blog/2017/06/09/theory-of-modern-go.html, as they are difficult to test.
We should re-organize our code, which handles CLI to not use global options.
Ideally CLI code should only take care of reading arguments and flags from the user and pass them to Go structures, which can be then tested for specific behavior.
The text was updated successfully, but these errors were encountered: