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

Just windows has the \\ file path flag set #3576

Closed
wants to merge 2 commits into from

Conversation

tekintian
Copy link

Please ensure you adhere to every item in this list.

  • The PR title is formatted as follows: os/gtime: fixed time zone issues
    • The package name goes before the colon
    • The part after the colon uses the verb tense + phrase that completes the blank in
    • Lowercase verb after the colon
    • No trailing period
    • Keep the title as short as possible. ideally under 76 characters or shorter
    • Title not Markdown
  • If there is a corresponding issue, add either Fixes #1234 or Updates #1234
    (the latter if this is not a complete fix) to this comment
  • Delete these instructions once you have read and applied them

提交前请遵守每个事项,感谢!

  • PR 标题格式如下:os/gtime: fixed time zone issues
    • 冒号前是包名
    • 冒号后使用动词时态 + 短语
    • 冒号后的动词小写
    • 不要有结尾句号
    • 标题尽量保持简短,最好在 76 个字符或更短
    • 标题不要使用 Markdown
  • 如果有对应的 issue,请在此评论中添加 Fixes #1234,如果不是完全修复则添加 Updates #1234
  • 应用这些规则后删除所有的说明

Signed-off-by: Tekin Tian <tekintian@gmail.com>
Signed-off-by: Tekin Tian <tekintian@gmail.com>
@gqcn
Copy link
Member

gqcn commented May 21, 2024

@tekintian Hello, it does the replacement no matter what the GOOS is, as it takes no effect if the system separator is not \.

@gqcn gqcn closed this May 21, 2024
@gqcn gqcn added the rejected The proposal or PR is not accepted, which might be conflicted with our design or plan. label May 21, 2024
@tekintian
Copy link
Author

@tekintian Hello, it does the replacement no matter what the GOOS is, as it takes no effect if the system separator is not \.

是的,非windows 不会生效! 但是非windows会白白浪费CPU的计算资源来执行一个毫无用处的查找替换 strings.ReplaceAll(goRootForFilter, "\", "/") , 而且你这个代码每次请求应该都会被执行好多次, 小网站一般没有感觉,如果是大网站,那......

写代码还是要严谨一点好,哈哈!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected The proposal or PR is not accepted, which might be conflicted with our design or plan.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants