Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
txtarfs
✓ github.com/josharian/txtarfs
Creates an fs.FS from a txtar archive
package main
import (
"fmt"
"os"
"github.com/josharian/txtarfs"
"golang.org/x/tools/txtar"
)
func main() {
archive := txtar.Parse([]byte("-- file.txt --\nhello"))
fsys := txtarfs.AsFS(archive)
data, _ := fsys.Open("file.txt")
buf := make([]byte, 10)
data.Read(buf)
fmt.Println(string(buf))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20210615231727-b36c7445259blatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.