package web import "io/fs" // mustSub returns an FS rooted at dir within root, panicking on error (dir // is always a compile-time-known embedded path, so this can only fail if the // embed itself is misconfigured). func mustSub(root fs.FS, dir string) fs.FS { sub, err := fs.Sub(root, dir) if err != nil { panic(err) } return sub }