Base64 Encode Golang
sEnc := base64.StdEncoding.EncodeToString([]byte(data))
fmt.Println(sEnc)
Splendid-est Swan
sEnc := base64.StdEncoding.EncodeToString([]byte(data))
fmt.Println(sEnc)
encode := base64.StdEncoding.EncodeToString([]byte("Hello World"))
fmt.Printf("encode data %s \n", encode)
decode, _ := base64.StdEncoding.DecodeString(encode)
fmt.Printf("decode data %s \n", decode)
encode := base64.NewEncoder(base64.StdEncoding, os.Stdout)
encode.Write([]byte("Hello World"))
decode := base64.NewDecoder(base64.StdEncoding, strings.NewReader("SGVsbG8gV29y"))
data, _ := ioutil.ReadAll(decode)
fmt.Println(string(data))