Standard library / encoding/base64

encoding/base64.Encoding

Represents the alphabet, padding and strictness used in encoding and decoding. Use matching configuration at both ends. Expected stdout: '_w\n'.

Formal Syntax & Structure

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

Working Example

Example Snippetgo
package main
import (  "encoding/base64"  "fmt")
func must(e error) {  if e != nil {    panic(e)  }}
func main() {  var e *base64.Encoding = base64.RawURLEncoding  fmt.Println(e.EncodeToString([]byte{255}))}
Go Reference