buildname

package module
v0.0.0-...-6b7d76d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2020 License: MIT Imports: 3 Imported by: 2

README

BuildName

Generate human names for your binaries.

For most programs, server and cli, that I create these days, I tend to use linker flags to assign the git sha to a variable. It's convenient to be able to ask a binary what source it was built from. But git shas and most versioning schemes are just so boring. So many years ago, I started generating names for my builds based on hashing the version string and selecting both an adjective and a name. I liked that the names were far more conversational than verison numbers:

What build are you using?

I'm using Quirky Badger

You can see this naming scheme in most of my projects. https://kellegous.com/version.

Use as a library

installation

go get -u github.com/kellegous/buildname

Quick Start
import "github.com/kellegous/buildname"

...

name := buildname.FromVersion("e6a92ec2fe5fba022c31c32c97ea455cee4b2736")
fmt.Printf("name: %s\n", name) // Clever Turn

Use as a command line tool

Installation

go get -u github.com/kellegous/buildname/cmd/buildname

Quit Start
$ buildname f18d9a1e16a1eb3dd79ac02271528c7275fa1119
Blue-Eyed Country

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromVersion

func FromVersion(version string) string

FromVersion generates a build name from a given version string.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL