frontend/dev.go (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | //go:build !embed package frontend import ( "io/fs" "os" "path/filepath" "alin.ovh/searchix/internal/file" ) var Files fs.FS func init() { wd, err := os.Getwd() if err != nil { panic(err) } //nolint:forbidigo // own source code root, err := file.OpenRoot(filepath.Join(wd, "frontend")) if err != nil { panic(err) } Files = root.FS() } |