Standard library / mime
mime.BEncoding
Select Base64 encoded-word representation for MIME headers. Expected stdout: '=?UTF-8?b?Y2Fmw6k=?=\n'.
Formal Syntax & Structure
go syntaxgo
const BEncoding = WordEncoder('b')Working Example
Example Snippetgo
package main
import ( "fmt" "mime")
func main() { fmt.Println(mime.BEncoding.Encode("UTF-8", "café")) }
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}