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

embed: embed.file.ModTime() returns zero time #46935

Closed
yffrankwang opened this issue Jun 26, 2021 · 2 comments
Closed

embed: embed.file.ModTime() returns zero time #46935

yffrankwang opened this issue Jun 26, 2021 · 2 comments

Comments

@yffrankwang
Copy link

The current implementation of embed.file just returns zero time.

func (f *file) ModTime() time.Time         { return time.Time{} }

The http file server does not set the http header 'Date', if file's ModTime is zero.

http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(content))))

Is it possible to set the local file's real modification time to the embed file at compile time?

@zikaeroh
Copy link
Contributor

See #44854 (comment).

@seankhliao
Copy link
Member

Duplicate of #44854

@seankhliao seankhliao marked this as a duplicate of #44854 Jun 26, 2021
@golang golang locked and limited conversation to collaborators Jun 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants