feat: resource list and table output formatter
This commit is contained in:
@ -4,10 +4,12 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/core/interfaces"
|
||||
)
|
||||
|
||||
type GoFormatter struct{}
|
||||
|
||||
func (f *GoFormatter) Format(objects []any) (io.Reader, error) {
|
||||
return strings.NewReader(fmt.Sprintf("%#v", objects)), nil
|
||||
func (f *GoFormatter) Format(list *interfaces.ResourceList) (io.Reader, error) {
|
||||
return strings.NewReader(fmt.Sprintf("%#v", list)), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user