An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.8% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org

proxy.golang.org : github.com/kgoins/backscanner

Package backscanner provides a scanner similar to bufio.Scanner, but it reads and returns lines in reverse order, starting at a given position (which may be the end of the input) and going backward. Unlike with bufio.Scanner, max line length may be configured. Advancing and accessing lines of the input is done by calling Scanner.Line(), which returns the next line (previous in the source) as a string. For maximum efficiency there is Scanner.LineBytes(). It returns the next line as a byte slice, which shares its backing array with the internal buffer of Scanner. This is because no copy is made from the line data; but this also means you can only inspect or search in the slice before calling Line() or LineBytes() again, as the content of the internal buffer–and thus slices returned by LineBytes()–may be overwritten. If you need to retain the line data, make a copy of it or use Line(). Example using it: Output: Using it to efficiently scan a file, finding last occurrence of a string ("error"):

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/kgoins/backscanner
License: Apache-2.0
Latest release: over 3 years ago
First release: almost 4 years ago
Namespace: github.com/kgoins
Dependent packages: 1
Dependent repositories: 1
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago

    Loading...
    Readme
    Loading...