Repository navigation
Replace deprecated io/ioutil calls - #18
Closed
valerybugakov wants to merge 1 commit into
Closed
valerybugakov wants to merge 1 commit into
valerybugakov wants to merge 1 commit into
Conversation
Sourcegraph-Batch-Change: https://sourcegraph.test:3443/batch-change-agents/1
There was a problem hiding this comment.
Scan Summary
| Tool | Critical | High | Medium | Low | Status |
|---|---|---|---|---|---|
| Go Static Analysis | 0 | 0 | 1 | 0 | ✅ |
| Go Security Audit | 0 | 18 | 5 | 0 | ❌ |
| Secrets Audit | 0 | 16 | 0 | 0 | ❌ |
| Python Source Analyzer | 0 | 0 | 0 | 0 | ✅ |
Recommendation
Please review the findings from Code scanning alerts before approving this pull request. You can also configure the build rules or add suppressions to customize this bot 👍
|
|
||
| func ReadTextFile(filename string) (string, error) { | ||
| bin, err := ioutil.ReadFile(filename) | ||
| bin, err := os.ReadFile(filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
io/ioutil has been deprecated since Go 1.16. This replaces each call with its os or io equivalent.
ioutil.ReadDir is left as is: os.ReadDir returns fs.DirEntry instead of fs.FileInfo.