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

ParseEmbedFontFrom accepts *embed.FS #3

Closed
sedyh opened this issue Sep 2, 2022 · 1 comment
Closed

ParseEmbedFontFrom accepts *embed.FS #3

sedyh opened this issue Sep 2, 2022 · 1 comment

Comments

@sedyh
Copy link

sedyh commented Sep 2, 2022

Hello. This is a trifle, but is there a specific reason for accepting *embed.FS and not embed.FS in ParseEmbedFontFrom func?
It still keeps a pointer inside. By default it is usually passed by value.

https://pkg.go.dev/embed

import "embed"

//go:embed hello.txt
var f embed.FS
data, _ := f.ReadFile("hello.txt")
print(string(data))
@sedyh sedyh changed the title ParseEmbedFontFrom accepts *embed.FS ParseEmbedFontFrom and ParseEmbedFontFrom accepts *embed.FS Sep 2, 2022
@sedyh sedyh changed the title ParseEmbedFontFrom and ParseEmbedFontFrom accepts *embed.FS ParseEmbedFontFrom accepts *embed.FS Sep 2, 2022
@tinne26
Copy link
Owner

tinne26 commented Sep 2, 2022

Thanks for the report. Yeah, there's no particular reason, it looks like it should indeed be passed by value. I have other changes to make with the release of Ebitengine v2.4.0, so I'll fix it and tag a new version in a few days.

@tinne26 tinne26 closed this as completed in abca229 Sep 2, 2022
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

No branches or pull requests

2 participants