base83

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(str string) (value int, err error)

Decode will decode the given Base83 string to an integer.

func Encode

func Encode(value, length int) (string, error)

Encode will encode the given integer value to a Base83 string with given length. If length is too short to encode the given value InvalidLengthError will be returned.

Types

type InvalidCharacterError

type InvalidCharacterError rune

An InvalidCharacterError occurs when a characters is found which is not part of the Base83 character set.

func (InvalidCharacterError) Error

func (e InvalidCharacterError) Error() string

type InvalidLengthError

type InvalidLengthError int

An InvalidLengthError occurs when a given value cannot be encoded to a string of given length.

func (InvalidLengthError) Error

func (e InvalidLengthError) Error() string

Jump to

Keyboard shortcuts

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