hashid

command module
v0.0.0-...-286a0fd Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 5 Imported by: 0

README

HashID Tool

A command line tool that encodes & decodes hashids.

Installation

Make sure your Go Version is greater than 1.13. And simply run:

$ GO111MODULE=on go install github.com/gg-tools/hashid

Make sure your PATH includes the $GOPATH/bin directory so commands can be easily used:

export PATH=$PATH:$GOPATH/bin

Usage

Configuration:

$ export HASHID_SALT=!@#!@F234t23g2354rr2tg35
$ export HASHID_MIN_LENGTH=8
$ export HASHID_ALPHABET=qwertyuiopasdfghjklzxcvbnm1234567890

Get hashed string:

$ hashid encode 1988
25yodre1
$ hashid encode 1988 1990
25yodre1
re7og60y

Get ID from hashed string:

$ hashid decode 25yodre1
$ hashid decode 25yodre1 re7og60y

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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