module
0.0.0-20240614095155-da5732d4417d
Repository: https://github.com/kjk/common.git
Documentation: pkg.go.dev
# README
A bunch of Go packages that I use in multiple projects.
An overview of packages:
u
: utility functions that I use all the time. Very short package name is on purposeatomicfile
: write to a file, atomicallyfilerotate
: implements a file you can write to and rotates on a schedule (e.g. daily or hourly). I use it for log filessiser
: Simple Serialization formatserver
: a very specific abstraction over http server that allows me to write http server that is dynamic during dev (e.g. generates .html files from templates) and can be turned into a fully static website easily
# Packages
No description provided by the author
To write to files in a robust way we should:
- handle error returned by `Close()`
- handle error returned by `Write()`
- remove partially written file if `Write()` or `Close()` returned an error
This logic is non-trivial.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author