Releases: puellanivis/breton
v0.2.6: Process all short flags in a sequence again.
During a fix to support -m"text"
style flags, processing a series of boolean flags in a -sequence
was broken, and only the first flag was being processed.
This restores expected behavior.
v0.2.5: Empty-struct Context Keys
Former Best Practice was to use an unexported type for context Value
keys, in order to ensure proper encapsulation of the values (so third-party or second-party users cannot interfere with value storage). This allowed one to use a single context key type of concrete-type int
, which would enumerate the context keys, and interface
values would store that int
value directly, with a type attached.
However, in go1.4
, changes were made to how interfaces were implemented, and it was made that all values held by an interface were held by reference (as a pointer). This meant that now context key values would have to be allocated onto the heap, and the constant enum value stored there.
Best practice now, is to use a struct{}
type for each separate key. Since all struct{}
values may point to the same piece of memory (as they are 0-length types), this means that the pointer value stored in the interface does not require an allocation to store. The type information is then used alone to identify the specific usage. This avoids extra allocations just to store constant values in the heap.
Example of two differently typed struct{}
values existing at the same point in memory: https://play.golang.org/p/mvzxtRHKCrQ
v0.2.4: idempotent process.Shutdown
Ideally, we want to call process.Shutdown anywhere we would like to ensure that we enter into Graceful Shutdown. However, as written, if we call process.Shutdown three times, the signal handler assumes that we are not listening to signals, and crashes the process with a full all-goroutines stacktrace.
Now, with this release, you can. Multiple calls to process.Shutdown()
will not inject any more than one signal. This means any number of things that need to trigger Graceful Shutdown if they fail, can trigger that safely.
v0.2.3: This Time For Real!
- Remove internal references to
lib/util
- Change
mash.sh
to always setmain.VersionBuild
andmain.Buildstamp
with the builldstamp
v0.2.2: HOTFIX: do not panic on gnuflag.sliceValue.String for zero value.
The zero value of a sliceValue was causing a panic from called reflect.Value.Elem()
on a zero value.
v0.2.1: lib/gnuflags refactor and lib/os/process
- Most of the functionality from
lib/utils
was moved tolib/os/process
lib/gnuflags
refactor, with much better test coverage
v0.2.0: lib/files/sftp and lib/mapreduce
Two new big features:
- sftp URL support in
lib/files/sftp
, however, not included by default inlib/files/plugins
- a local-machine only mapreduce implementation at
lib/mapreduce
which will split slices, maps, and channels across a given number of goroutines, and handle the orchestration and coördination of that work.
v0.1.0: Initial release
OK, we‘re starting versioning over again. This time at v0.1.0
I intend to only ever bump the minor version or the patch version. If I am doing a merge of a feature branch, this will bump the minor number, if I am doing a bug-fix I will try to bump the patch number.
Any API change should hopefully be introduced through a feature branch.