cmd/streamdata: format vod metadata for stdout
This is useful for a show command. Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
16
cmd/streamdata/format.go
Normal file
16
cmd/streamdata/format.go
Normal file
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user