Standard library / encoding/base32

encoding/base32.Encoding

Reusable alphabet and padding configuration. Standard and extended hexadecimal alphabets are different encodings, so both sides must agree on one. Expected stdout: 'I5XQ==== 8TNG====\n'.

Formal Syntax & Structure

go syntaxgo
type Encoding struct {  // Has unexported fields.}

Working Example

Example Snippetgo
package main
import (  "encoding/base32"  "fmt")
func must(e error) {  if e != nil {    panic(e)  }}
func main() {  fmt.Println(base32.StdEncoding.EncodeToString([]byte("Go")), base32.HexEncoding.EncodeToString([]byte("Go")))}
Go Reference