Documentation
¶
Overview ¶
Package binpost provides binary file saving of struct slices. Features: - Fixed size struct for random seeking - Handles large data sets bigger than memory - Fast write/read for ca 25-byte structures - Uses generics for flexibility
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenAppendFile ¶
OpenAppendFile opens a file for appending (creates if not exists) and returns the file, a closer function, and an error.
func ReadRecords ¶
ReadRecords reads a slice of fixed-size structs from a binary file.
func WriteOneRecord ¶
WriteOneRecord writes a single record to the end of the given file.
func WriteRecords ¶
WriteRecords writes a slice of fixed-size structs to a binary file.
Types ¶
type DataRecord ¶
DataRecord is a placeholder for a fixed-size struct. Replace with your own struct.
Click to show internal directories.
Click to hide internal directories.