Features: - CLI structure with verbs and resources - Application config and parameters - Output formatters - Initial resource: dishes Reviewed-on: #1 Co-authored-by: bdoerfchen <git@bissendorf.co> Co-committed-by: bdoerfchen <git@bissendorf.co>
16 lines
281 B
Go
16 lines
281 B
Go
package output
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"strings"
|
|
|
|
"git.bissendorf.co/bissendorf/unifood/m/v2/core/interfaces"
|
|
)
|
|
|
|
type GoFormatter struct{}
|
|
|
|
func (f *GoFormatter) Format(list *interfaces.ResourceList) (io.Reader, error) {
|
|
return strings.NewReader(fmt.Sprintf("%#v", list)), nil
|
|
}
|