net.File regular-file html-file

master
Charles Iliya Krempeaux 2022-12-14 06:23:15 -08:00
parent 784b3d0ea2
commit 61ef62e23d
2 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,11 @@ func Bool() bool {
return Default.Bool()
}
// HTMLFile returns an arbitrary fs.File regular-file whose content is an HTML file.
func HTMLFile() fs.File {
return Default.HTMLFile()
}
// NetAddr returns an arbitrary net.Addr.
func NetAddr() net.Addr {
return Default.NetAddr()

View File

@ -51,6 +51,7 @@ var (
}
)
// HTMLFile returns an arbitrary fs.File regular-file whose content is an HTML file.
func (arb T) HTMLFile() fs.File {
var filecontent strfs.Content