From 606232cfd3084f226238c3436b8a1e5d91431dfe Mon Sep 17 00:00:00 2001 From: surdeus Date: Tue, 9 Jul 2024 16:22:17 +0500 Subject: [PATCH] feat: added base64 encoding. --- cmd/gore/main.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cmd/gore/main.go b/cmd/gore/main.go index 9f9507a..b219768 100644 --- a/cmd/gore/main.go +++ b/cmd/gore/main.go @@ -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, + ) + }, + ), ), )