Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Base64-decode-data/Go/base64-decode-data.go
Normal file
19
Task/Base64-decode-data/Go/base64-decode-data.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
msg := "Rosetta Code Base64 decode data task"
|
||||
fmt.Println("Original :", msg)
|
||||
encoded := base64.StdEncoding.EncodeToString([]byte(msg))
|
||||
fmt.Println("\nEncoded :", encoded)
|
||||
decoded, err := base64.StdEncoding.DecodeString(encoded)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println("\nDecoded :", string(decoded))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue