hashidsx

package
v0.0.0-...-fa6ae4b Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHashID = errors.New("invalid hash string, more than one id is encoded")

Functions

func Decode

func Decode(hash string) (int, error)

Decode decodes a hash string to a single integer id. If the decoded hash is not a single id, it returns an error indicating this.

func Encode

func Encode(id int) (string, error)

Encode encodes a single integer id to string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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