feat: resource list and table output formatter

This commit is contained in:
2025-07-20 19:22:36 +02:00
parent 45712dacf6
commit 4a15a4db66
16 changed files with 209 additions and 40 deletions

View File

@ -4,13 +4,14 @@ import (
"bytes"
"io"
"git.bissendorf.co/bissendorf/unifood/m/v2/core/interfaces"
"github.com/goccy/go-yaml"
)
type YamlFormatter struct{}
func (f *YamlFormatter) Format(objects []any) (io.Reader, error) {
buffer, err := yaml.Marshal(objects)
func (f *YamlFormatter) Format(list *interfaces.ResourceList) (io.Reader, error) {
buffer, err := yaml.Marshal(list)
if err != nil {
return nil, err
}