route/vendor/layeh.com/asar
Cadey Ratio 1dfde5c636 dep: update deps 2018-01-21 21:31:33 -08:00
..
.gitignore dep: update deps 2018-01-21 21:31:33 -08:00
LICENSE dep: update deps 2018-01-21 21:31:33 -08:00
README.md dep: update deps 2018-01-21 21:31:33 -08:00
builder.go dep: update deps 2018-01-21 21:31:33 -08:00
decoder.go dep: update deps 2018-01-21 21:31:33 -08:00
decoder_test.go dep: update deps 2018-01-21 21:31:33 -08:00
doc.go dep: update deps 2018-01-21 21:31:33 -08:00
encoder.go dep: update deps 2018-01-21 21:31:33 -08:00
encoder_test.go dep: update deps 2018-01-21 21:31:33 -08:00
entry.go dep: update deps 2018-01-21 21:31:33 -08:00
header.go dep: update deps 2018-01-21 21:31:33 -08:00

README.md

asar GoDoc

Package asar reads and writes ASAR (Atom-Shell Archive) archives

import (
    "os"

    "layeh.com/asar"
)


f, err := os.Open("sample.asar")
if err != nil {
    panic(err)
}
defer f.Close()

archive, err := asar.Decode(f)
if err != nil {
    panic(err)
}

test := archive.Find("test", "file.txt")
if test == nil {
    panic("file not found")
}
// print contents of test/file.txt in sample.asar
fmt.Println(test.String())

License

MPL 2.0

Author

Tim Cooper (tim.cooper@layeh.com)