Registry / utility / josharian-txtarfs

josharian-txtarfs

JSON →
library0.0.0-20210615231727-b36c7445259bgogounverified

Package txtarfs converts a txtar archive into an fs.FS filesystem.

go get github.com/josharian/txtarfs
INSTALL
IMPORT
SIG · JOSHARIAN-TXTARFS
J
josharian-txtarfs
utilitygov0.0.0-20210615231727-b36c7445259b
harness data pending
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.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
josharian-txtarfs — go get josharian-txtarfs · libregistry