coding

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2018 License: Unlicense, Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Codings = []string{"string", "golang", "octal", "decimal", "hex", "base32", "base58check", "base64"}

Codings are the types of encoding schemes available

Functions

func Decode

func Decode(s string, code string) (b []byte)

Decode takes a byte slice and encodes it to a string with the prescribed format or if empty or not in the list, defaults to string

func Encode

func Encode(b []byte, code string, extra ...int) string

Encode takes a byte slice and encodes it to a string with the prescribed format or if empty or not in the list, defaults to string

Types

type Coding

type Coding interface {
	GetCoding() string
	SetCoding(string) Coding
	ListCodings() []string
}

Coding is an interface for encoding raw bytes in various base number formats

Jump to

Keyboard shortcuts

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