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

fsutil.ReadOrErr() 没有关闭流 #133

Closed
yanghx-git opened this issue Oct 13, 2023 · 0 comments · Fixed by #134
Closed

fsutil.ReadOrErr() 没有关闭流 #133

yanghx-git opened this issue Oct 13, 2023 · 0 comments · Fixed by #134
Assignees
Labels
bug Something isn't working

Comments

@yanghx-git
Copy link
Contributor

System (please complete the following information):

  • OS: linux [e.g. linux, macOS]
  • GO Version: 1.21 [e.g. 1.13]
  • Pkg Version: 0.6.12 [e.g. 1.1.1]

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

func ReadOrErr(in any) ([]byte, error) {
        // 传入字符串会读取文件,转换为 []byte 后,file 没有close 
	r, err := NewIOReader(in)
	if err != nil {
		return nil, err
	}
	return io.ReadAll(r)
}

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@inhere inhere added the bug Something isn't working label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants