Skip to content

Fix #35 to follow up the API's response changes #36

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

Merged
merged 4 commits into from
Sep 10, 2022

Conversation

KEINOS
Copy link
Contributor

@KEINOS KEINOS commented Aug 25, 2022

Even though it is a "cat-and-mouse" game with the GitHub API but here's the quick fix of the issue #35.

@KEINOS
Copy link
Contributor Author

KEINOS commented Aug 28, 2022

@ekalinin

Should I replace io/ioutil to io ?

Even though make test passes on Go v1.17 and v1.18, on Go v1.19 I get the following error.
golangci-lint(v1.49.0) wants us to use io and os package instead of io/ioutil.

$ make test
cmd/gh-md-toc/main.go:5:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
	"io/ioutil"
	^
ghdoc.go:6:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
	"io/ioutil"
	^
internals.go:7:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
	"io/ioutil"
	^
make: *** [Makefile:14: lint] Error 1

@ekalinin
Copy link
Owner

Should I replace io/ioutil to io ?

Yes, let's replace. Thanks!

@KEINOS
Copy link
Contributor Author

KEINOS commented Aug 29, 2022

@ekalinin

Done! Please run the CI when you have time. Hope it passes 🤞

Should increase coverage 71% --> 88%
@KEINOS
Copy link
Contributor Author

KEINOS commented Sep 9, 2022

@ekalinin

Additional tests have been added to cover the changes. Please re-run the CIs.
It should bring back the coverage to 88% 🤞

@codecov-commenter
Copy link

Codecov Report

Merging #36 (c87d1d5) into master (552ceb6) will increase coverage by 1.91%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   80.72%   82.63%   +1.91%     
==========================================
  Files           2        2              
  Lines         166      167       +1     
==========================================
+ Hits          134      138       +4     
+ Misses         20       17       -3     
  Partials       12       12              
Impacted Files Coverage Δ
ghdoc.go 85.47% <50.00%> (+2.71%) ⬆️
internals.go 76.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ekalinin ekalinin merged commit 2a57631 into ekalinin:master Sep 10, 2022
@ekalinin
Copy link
Owner

Thanks a lot!

@KEINOS KEINOS deleted the fix-35-follow-up-api-change branch September 10, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants