gotext icon indicating copy to clipboard operation
gotext copied to clipboard

go embed fs with path

Open llonchj opened this issue 3 months ago • 1 comments

Before creating your Pull Request...

Go embed FS are

  • New Pull Requests should include a good description of what's being merged.
  • Ideally, all Pull Requests are preceded by a discussion initiated in an Issue on this repository.
  • For bug fixes is mandatory to have tests that cover and fail when the bug is present and will pass after this Pull Request.
  • For changes and improvements, new tests have to be provided to cover the new features.

Is this a fix, improvement or something else?

yes,

What does this change implement/fix?

  • allows to use go embed by adding a backwards compatible NewLocaleFSWithPath function,
  • adds tests for a embed.FS, addressing #68
  • bumps go version to 1.16 which is the minimum required to use embed package

Bumping go version can be troublesome for existing users, although embed.FS tests will not be supported. It is possible to keep 1.13 compatibility by removing the additional unit test case.

Either way, in order to use embed.FS path seems to be required.

I have ...

  • [X] answered the 2 questions above,
  • [X] discussed this change in an issue, #97
  • [X] included tests to cover this changes.

llonchj avatar May 09 '24 20:05 llonchj