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

feat(i18n/gi18n): support fs.FS #3942

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ynwcel
Copy link
Contributor

@ynwcel ynwcel commented Nov 20, 2024

  • 支持添加 fs.FS 路径
    • SetPathFS
  • go test

gf-gi18n-add-std-fs

if opts.PathFs != nil {
pathType = pathTypeFS
} else {
pathType = opts.checkPathType(opts.Path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

能否不定义SetPathFS方法,直接在checkPathType中判断opts.Path路径是否存在于fs.Fs中,如果是得话则用fs.Fs,否则走原来默认逻辑。这样可以降低使用复杂度。

@gqcn gqcn changed the title gi18n-support-std-fs 【gi18n 支持添加 fs.FS 】 feat(os/gi18n): support fs.FS Nov 23, 2024
@gqcn gqcn changed the title feat(os/gi18n): support fs.FS feat(i18n/gi18n): support fs.FS Nov 23, 2024
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

Successfully merging this pull request may close these issues.

3 participants