gore/enc/enc.go
2024-07-09 16:13:20 +05:00

27 lines
410 B
Go

package enc
import "surdeus.su/core/cli/mtool"
import "io"
import "os"
type EncodeOptions struct {
}
func NewEncodeTool(
name string,
encFn func (io.Writer) io.Writer,
) *mtool.Tool {
ret := mtool.T(name).Func(func(flags *mtool.Flags){
//var opts EncodeOptions
_ = flags.Parse()
input := os.Stdin
output := os.Stdout
encOutput := encFn(output)
io.Copy(encOutput, input)
})
return ret
}