tests/bytes_hex/main.go
Андрей Иванов 46d740d6a6
Some checks failed
continuous-integration/drone/push Build is failing
Добавил BFS, тест к нему и бенчмарк
2024-09-12 10:37:31 +03:00

19 lines
387 B
Go

package main
import (
"encoding/base64"
"encoding/hex"
"fmt"
"log"
)
func main() {
input := "bRMrS29FKvSoH4jexlhIumahHLw="
hx, err := base64.StdEncoding.DecodeString(input)
hxStr := hex.EncodeToString(hx)
if err != nil {
log.Fatal("sdgre")
}
fmt.Printf("From bytestring \"%s\" with length %d\r\nget hexstring \"%s\" with length %d", input, len(input), hxStr, len(hxStr))
}