mirror of
https://github.com/Luzifer/sii.git
synced 2024-10-18 05:14:19 +00:00
Support reading SII file from reader
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
57f6d846b5
commit
b26ae0d691
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ import (
|
||||||
|
|
||||||
var blockStartRegex = regexp.MustCompile(`^([^\s:]+)\s?:\s?([^\s]+)(?:\s?\{)?$`)
|
var blockStartRegex = regexp.MustCompile(`^([^\s:]+)\s?:\s?([^\s]+)(?:\s?\{)?$`)
|
||||||
|
|
||||||
func parseSIIPlainFile(r io.Reader) (*Unit, error) {
|
func ParseSIIPlainFile(r io.Reader) (*Unit, error) {
|
||||||
var (
|
var (
|
||||||
blockContent []byte
|
blockContent []byte
|
||||||
blockName string
|
blockName string
|
||||||
|
|
2
sii.go
2
sii.go
|
@ -105,7 +105,7 @@ func ReadUnitFile(filename string) (*Unit, error) {
|
||||||
return nil, errors.New("Invalid / unknown file type header found")
|
return nil, errors.New("Invalid / unknown file type header found")
|
||||||
}
|
}
|
||||||
|
|
||||||
return parseSIIPlainFile(r)
|
return ParseSIIPlainFile(r)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetEncryptionKey sets the 32-byte key to encrypt / decrypt ScsC files.
|
// SetEncryptionKey sets the 32-byte key to encrypt / decrypt ScsC files.
|
||||||
|
|
Loading…
Reference in a new issue