feat: added base64 encoding.
This commit is contained in:
parent
f930152424
commit
606232cfd3
1 changed files with 12 additions and 2 deletions
|
@ -3,15 +3,25 @@ package main
|
||||||
import "surdeus.su/core/cli/mtool"
|
import "surdeus.su/core/cli/mtool"
|
||||||
import "surdeus.su/util/gore/enc"
|
import "surdeus.su/util/gore/enc"
|
||||||
import "encoding/hex"
|
import "encoding/hex"
|
||||||
|
import "encoding/base64"
|
||||||
import "os"
|
import "os"
|
||||||
|
import "io"
|
||||||
|
|
||||||
var root = mtool.T("gore").Subs(
|
var root = mtool.T("gore").Subs(
|
||||||
mtool.T("encode").Subs(
|
mtool.T("encode-to").Subs(
|
||||||
enc.NewEncodeTool(
|
enc.NewEncodeTool(
|
||||||
"hex",
|
"hex",
|
||||||
hex.NewEncoder,
|
hex.NewEncoder,
|
||||||
),
|
),
|
||||||
|
enc.NewEncodeTool(
|
||||||
|
"base64",
|
||||||
|
func(w io.Writer) io.Writer {
|
||||||
|
return base64.NewEncoder(
|
||||||
|
base64.StdEncoding,
|
||||||
|
w,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue