From 49931c6e75ea77a30a1141441e2ce9e9a1d335b6 Mon Sep 17 00:00:00 2001 From: Yonah Date: Thu, 19 Mar 2026 01:08:06 +0900 Subject: [PATCH] cmd/streamdata: format vod metadata for stdout This is useful for a show command. Signed-off-by: Yonah --- cmd/streamdata/format.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cmd/streamdata/format.go diff --git a/cmd/streamdata/format.go b/cmd/streamdata/format.go new file mode 100644 index 0000000..0b4cf8b --- /dev/null +++ b/cmd/streamdata/format.go @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" + + "git.gensokyo.uk/yonah/streamdata" +) + +// printVOD prints a text representation of [streamdata.VOD] to stdout. +func printVOD(v *streamdata.VOD) { + fmt.Println("Title :", v.Title) + fmt.Println("Date :", v.Date.Format("2006-01-02")) + if v.Category != "" { + fmt.Println("Category:", v.Category) + } +}