server/assets/files_external.go (298B)
1 //go:build !embedassets 2 3 package assets 4 5 import ( 6 "io/fs" 7 "os" 8 "path/filepath" 9 ) 10 11 // Capture the launch directory before test fixtures change the working directory. 12 var Files fs.FS = func() fs.FS { 13 root, err := filepath.Abs("assets") 14 if err != nil { 15 panic(err) 16 } 17 return os.DirFS(root) 18 }()