initial commit. Cloned timetracker repository
This commit is contained in:
30
assets/prod.go
Normal file
30
assets/prod.go
Normal file
@@ -0,0 +1,30 @@
|
||||
//go:build embed
|
||||
|
||||
package assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed all:public
|
||||
var Embedded embed.FS
|
||||
|
||||
//go:embed all:public/dist
|
||||
var EmbeddedDist embed.FS
|
||||
|
||||
func FS() fs.FS {
|
||||
sub, err := fs.Sub(Embedded, "public")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return sub
|
||||
}
|
||||
|
||||
func FSDist() fs.FS {
|
||||
sub, err := fs.Sub(EmbeddedDist, "public/dist")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return sub
|
||||
}
|
||||
Reference in New Issue
Block a user