Skip to content

Instantly share code, notes, and snippets.

@arxdsilva
Last active June 5, 2019 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arxdsilva/862f0c61a00ff514854ee4261bb327c4 to your computer and use it in GitHub Desktop.
Save arxdsilva/862f0c61a00ff514854ee4261bb327c4 to your computer and use it in GitHub Desktop.
decode a base 64 string in go
package main
// https://play.golang.org/p/utIG70ublyv
import (
b64 "encoding/base64"
"fmt"
)
func main() {
s := "ZW5jb2RlZCBtZXNzYWdl"
sDec, _ := b64.StdEncoding.DecodeString(s)
fmt.Println(string(sDec))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment