From 63145c95bd87e0e4903347726ac397bc35255657 Mon Sep 17 00:00:00 2001 From: Yonah Date: Thu, 19 Mar 2026 01:46:10 +0900 Subject: [PATCH] cmd/streamdata: list sub-command This lists all known identifiers. Signed-off-by: Yonah --- cmd/streamdata/main.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cmd/streamdata/main.go b/cmd/streamdata/main.go index b180af5..c81b736 100644 --- a/cmd/streamdata/main.go +++ b/cmd/streamdata/main.go @@ -4,6 +4,7 @@ import ( "bufio" "context" "errors" + "fmt" "io" "log" "net/http" @@ -205,6 +206,21 @@ func main() { }, ) + c.NewCommand( + "list", + "List identifiers of all known VODs", + func([]string) (err error) { + if channel == nil { + return errors.New("list requires a channel selected") + } + + for ident := range channel.All(&err) { + fmt.Println(ident) + } + return + }, + ) + c.MustParse(os.Args[1:], func(err error) { if channel != nil { if closeErr := channel.Close(); closeErr != nil {