-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore(config): replace unmaintained envconfig #181
Conversation
Codecov Report
@@ Coverage Diff @@
## main #181 +/- ##
==========================================
+ Coverage 46.01% 46.19% +0.18%
==========================================
Files 16 16
Lines 1230 1223 -7
==========================================
- Hits 566 565 -1
+ Misses 602 596 -6
Partials 62 62
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more 📢 Have feedback on the report? Share it here. |
Kudos, SonarCloud Quality Gate passed! |
@@ -72,7 +73,8 @@ func init() { | |||
mux.HandleFunc("/api/v1/session/userinfo", getUserInfoHandler) | |||
mux.HandleFunc("/api/v1/applications/test", getApplicationHandler) | |||
server = httptest.NewServer(mux) | |||
api = &ArgoApi{baseUrl: server.URL, client: server.Client()} | |||
parsedURL, _ := url.Parse(server.URL) // we assume that the server.URL is valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to not assume, but throw errors here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a URL coming from the default library, If it will return an invalid url
it would be the least of our problems.
Replace unmaintained
kelseyhightower/envconfig
with maintainedcaarlos0/env
, and move some logic toenvConfig.Parse
.