summaryrefslogtreecommitdiff
path: root/vendor/github.com/tdewolff/parse/v2/binary_unix.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-10-28 10:07:58 +0000
committerLibravatar GitHub <noreply@github.com>2024-10-28 10:07:58 +0000
commit8f4a96c7cde4e7c24d11bd8a615d83fe97e8eeb6 (patch)
tree3a169087b5188d803f7222b8bff45184bbd9e464 /vendor/github.com/tdewolff/parse/v2/binary_unix.go
parentupdate go-sqlite3 => v0.20.0 (#3483) (diff)
downloadgotosocial-8f4a96c7cde4e7c24d11bd8a615d83fe97e8eeb6.tar.xz
[chore]: Bump github.com/tdewolff/minify/v2 from 2.21.0 to 2.21.1 (#3489)
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.21.0 to 2.21.1. - [Release notes](https://github.com/tdewolff/minify/releases) - [Commits](https://github.com/tdewolff/minify/compare/v2.21.0...v2.21.1) --- updated-dependencies: - dependency-name: github.com/tdewolff/minify/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/tdewolff/parse/v2/binary_unix.go')
-rw-r--r--vendor/github.com/tdewolff/parse/v2/binary_unix.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/tdewolff/parse/v2/binary_unix.go b/vendor/github.com/tdewolff/parse/v2/binary_unix.go
index d014f398f..4a7218690 100644
--- a/vendor/github.com/tdewolff/parse/v2/binary_unix.go
+++ b/vendor/github.com/tdewolff/parse/v2/binary_unix.go
@@ -81,3 +81,11 @@ func (r *binaryReaderMmap) Bytes(n int, off int64) ([]byte, error) {
}
return r.data[off : off+int64(n) : off+int64(n)], nil
}
+
+func NewBinaryReader2Mmap(filename string) (*BinaryReader2, error) {
+ f, err := newBinaryReaderMmap(filename)
+ if err != nil {
+ return nil, err
+ }
+ return NewBinaryReader2(f), nil
+}