nicksnyder / go-i18n

Translate your Go program into multiple languages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade to go1.16 (for the embed)

CarsonSlovoka opened this issue · comments

Hi, @nicksnyder

This is a great project with comprehensive considerations, especially the function ParseMessageFileBytes so that it can be combined with embed very quickly.

question

I want this project to support the embed package by default, and this must be a package allowed by go1.16.

But the current project is stuck on go1.9. I think many versions have fallen behind the mainstream. Can you upgrade to go 1.16?

I am currently planning to write some embed examples for issue #240 (I will announce later). I changed it to go1.16, everything is fine, and there seems to be no compatibility problem.

What error message are you seeing when you try to use this package with go1.16?

Btw, you can now use LoadMessageFileFS

Thanks. LoadMessageFileFS makes the code much shorter.


I found that this may not be necessary😅. The initial motivation was just that I wanted to add examples directly to the project, but for users, they can still use go1.16 and import the package without any impact.


here is the error message

.\embed.go:50:3: go:embed requires go1.16 or later (-lang was set to go1.9; check go.mod)

it try to run code