cmd/streamdata: retry metadata entry
This enables fixing metadata when a mistake is made. Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
@@ -130,11 +130,12 @@ func main() {
|
||||
defer toErr(&err)
|
||||
isattyStd()
|
||||
br := bufio.NewReader(os.Stdin)
|
||||
now := time.Now()
|
||||
|
||||
retry:
|
||||
v.Title = require(promptTrimNoEmpty(br, "Title: "))
|
||||
v.Category = require(prompt(br, "Category: "))
|
||||
|
||||
now := time.Now()
|
||||
year := require(promptUintFallbackBounds(
|
||||
br, "Year: ",
|
||||
1970, uint64(now.Year()),
|
||||
@@ -161,6 +162,11 @@ func main() {
|
||||
time.UTC,
|
||||
)
|
||||
|
||||
printVOD(v)
|
||||
if !require(promptBool(br, "Proceed? ", true)) {
|
||||
goto retry
|
||||
}
|
||||
|
||||
var resp *http.Response
|
||||
if resp, err = http.DefaultClient.Do(req); err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user