Skip to content
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

Remove ioutil #18222

Merged
merged 2 commits into from Jan 10, 2022
Merged

Remove ioutil #18222

merged 2 commits into from Jan 10, 2022

Conversation

Gusted
Copy link
Contributor

@Gusted Gusted commented Jan 9, 2022

  • Don't use ioutil package anymore as it doesn't anything special anymore 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.

- Don't use `ioutil` package anymore as it doesn't anything special
anymore 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.
```
@Gusted Gusted added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jan 9, 2022
@techknowlogick
Copy link
Member

LGTM, could you also add a vet rule to block the import of ioutil?

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 9, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 9, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #18222 (128f00a) into main (70d7475) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18222      +/-   ##
==========================================
- Coverage   45.64%   45.64%   -0.01%     
==========================================
  Files         830      830              
  Lines       92020    92024       +4     
==========================================
- Hits        42002    42001       -1     
+ Misses      43283    43280       -3     
- Partials     6735     6743       +8     
Impacted Files Coverage Δ
models/unit/unit.go 50.51% <0.00%> (-2.18%) ⬇️
modules/updatechecker/update_checker.go 0.00% <0.00%> (ø)
modules/git/utils.go 68.05% <0.00%> (-2.78%) ⬇️
modules/git/repo_base_nogogit.go 80.00% <0.00%> (-2.50%) ⬇️
modules/process/manager.go 81.39% <0.00%> (-1.56%) ⬇️
modules/git/blame.go 63.76% <0.00%> (-1.45%) ⬇️
models/repo_list.go 76.62% <0.00%> (-0.60%) ⬇️
models/issue_comment.go 54.23% <0.00%> (-0.57%) ⬇️
routers/api/v1/repo/pull.go 28.35% <0.00%> (-0.51%) ⬇️
services/pull/pull.go 41.70% <0.00%> (-0.41%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60b9455...128f00a. Read the comment docs.

@lunny lunny merged commit 242dddf into go-gitea:main Jan 10, 2022
@Gusted Gusted deleted the remove-iouitl branch January 10, 2022 18:06
@Gusted
Copy link
Contributor Author

Gusted commented Jan 10, 2022

LGTM, could you also add a vet rule to block the import of ioutil?

https://gitea.com/gitea/gitea-vet/pulls/17

zjjhot pushed a commit to zjjhot/gitea that referenced this pull request Jan 11, 2022
* 'main' of https://github.com/go-gitea/gitea:
  [skip ci] Updated translations via Crowdin
  Fix source typos (go-gitea#18227)
  Fix various typos (go-gitea#18219)
  Remove `ioutil` (go-gitea#18222)
  [skip ci] Updated translations via Crowdin
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
- Don't use `ioutil` package anymore as it doesn't anything special
anymore 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.
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@wxiaoguang wxiaoguang added this to the 1.17.0 milestone Mar 29, 2022
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 29, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants