gore/enc/enc.go

28 lines
410 B
Go
Raw Normal View History

2024-07-09 14:13:20 +03:00
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
}