Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode base36 bytes to source bytes
Example ¶
package main import ( "fmt" "github.com/lzjluzijie/base36" ) func main() { //Decode example data with base36 encoding. encoded := "2678lx5gvmsv1dro9b5" decoded := base36.Decode(encoded) //Check errors. // if decoded == nil { // fmt.Println("Base36 decode error") // return // } //Print decoded data. fmt.Println(string(decoded)) }
Output: Hello World!
func Encode ¶
Encode source bytes to base36 string
Example ¶
package main import ( "fmt" "github.com/lzjluzijie/base36" ) func main() { //Encode example data with base36 encoding. data := []byte("Hello World!") encoded := base36.Encode(data) //Print encoded data. fmt.Println(encoded) }
Output: 2678lx5gvmsv1dro9b5
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.