Free as in Freedom: Create your repos!
Some Go helpers to create distribution dir trees for software packages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Marcus ed11fa89e0 zip archive now uses defalte 18 hours ago
versioner Fixed incomplete migration of versioner to qbsllm 2 months ago
.gitignore migrate to codeberg 2 months ago
.travis.yml generate timestamp attribute with time now() 2 months ago
LICENSE generate timestamp attribute with time now() 2 months ago
Makefile migrate to codeberg 2 months ago versioner check for SemVer conventions 2 months ago
VERSION zip archive now uses defalte 18 hours ago
arch.go zip archive now uses defalte 18 hours ago migrate to codeberg 2 months ago
coverage.html migrate to codeberg 2 months ago
doc.go ICI 9 months ago
files.go API change in sllm 2 months ago
logging.go use qbsllm 2 months ago
version.go zip archive now uses defalte 18 hours ago


Test Coverage Go Report Card GoDoc

import ""


For Go packages it is common and good style to have packages installabel with a simple go get... command. This is supported in a great way by having so many good tools being part of the Go distribution. However sometimes applications might require to be distributed as a binary package with a crafted distribution file-tree – especially when users are not expected to compile the application themselves.

To have a portable way to pack such a distribution one would need a portable runtime for the program that does the packing. So why not write the packing program in Go? Most of the batteries are already included in Go but IMHO they could use a little polishing, i.e. lifting the API abstraction, to make the packing code even more simple. And exactly that’s what this package is provided for!

By the way…

There is just a little tool included to create a source file with constants defining the current version of the package. The idea is extraordinary simple: Write down the version parameters in a separate text file, e.g. VERSION, from which not only the Go code can be generated but that also can likely be processed by a lot of other programs too, e.g. shell, makefiles, Python and many others:


With such a simple file and one go generate directive, e.g. in an application’s main.go

package main
//go:generate versioner ./VERSION ./version.go

a simple go generate will create the file version.go from the file VERSION:

package main

const (
	Major = 0
	Minor = 2
	Patch = 3
	Quality = `a`

and with this its trivial to let myfancyprogram show you its version like this

myfancyprogram v0.2.3-a
Usage: [flags] input output

There are also some flags to define a common prefix for the constants, to have automatically increasing build numbers and to generate a timestamp from time.Now(). Since version 0.4.0 versioner checks some convetions for semantic versioning by default:

  • Are major, minor and patch defined as valid version numbers

  • Do other values comply with SemVer character set, i.e. [0-9a-zA-Z-]

For backward compatibility this can be switched off.


To get the library for writing your packing program:

go get -u

To get the versioner binary:

go install -u