2
golang에서 간단한 base64 인코딩 문자열을 디코딩하려고합니다.Golang이 base64 데이터를 문자열로 디코드합니다
package main
import b64 "encoding/base64"
import fmt
func main() {
data := "YmFzZTY0IGVuY29kZWQgc3RyaW5n"
sDec, err1 := b64.StdEncoding.DecodeString(data)
fmt.Println(sDec)
fmt.Println(err1)
}
내가 얻을 출력은 https://www.base64decode.net/로
[98 97 115 101 54 52 32 101 110 99 111 100 101 100 32 115 116 114 105 110 103] // this is the decoded data.
<nil>
이 같은 출력 디코딩이다 - 나는 golang에서 동일한 결과를 얻을 어떻게
base64 encoded string
를?
은 golang 데모가있는 편리한 사이트처럼 보입니다. https://www.base64decode.net/golang-decodestring –