1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-14 08:33:20 +02:00

Reformatting, make update

This commit is contained in:
Philipp Heckel 2022-09-27 12:37:02 -04:00
parent a9019131cf
commit 419bfecd6f
11 changed files with 289 additions and 263 deletions

View file

@ -11,14 +11,13 @@ import (
// CachingEmbedFS is a wrapper around embed.FS that allows setting a ModTime, so that the
// default static file server can send 304s back. It can be used like this:
//
// var (
// //go:embed docs
// docsStaticFs embed.FS
// docsStaticCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: docsStaticFs}
// )
//
// http.FileServer(http.FS(docsStaticCached)).ServeHTTP(w, r)
// var (
// //go:embed docs
// docsStaticFs embed.FS
// docsStaticCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: docsStaticFs}
// )
//
// http.FileServer(http.FS(docsStaticCached)).ServeHTTP(w, r)
type CachingEmbedFS struct {
ModTime time.Time
FS embed.FS