feat: added base64 encoding.

This commit is contained in:
Andrey Parhomenko 2024-07-09 16:22:17 +05:00
parent f930152424
commit 606232cfd3

View file

@ -3,15 +3,25 @@ package main
import "surdeus.su/core/cli/mtool"
import "surdeus.su/util/gore/enc"
import "encoding/hex"
import "encoding/base64"
import "os"
import "io"
var root = mtool.T("gore").Subs(
mtool.T("encode").Subs(
mtool.T("encode-to").Subs(
enc.NewEncodeTool(
"hex",
hex.NewEncoder,
),
enc.NewEncodeTool(
"base64",
func(w io.Writer) io.Writer {
return base64.NewEncoder(
base64.StdEncoding,
w,
)
},
),
),
)