use writer
This commit is contained in:
parent
86066b9561
commit
e1b7bac4e6
5 changed files with 21 additions and 21 deletions
|
@ -29,12 +29,12 @@ func cmdStream(c *cli.Context) error {
|
|||
switch t := e.(type) {
|
||||
case *mastodon.UpdateEvent:
|
||||
color.Set(color.FgHiRed)
|
||||
fmt.Println(t.Status.Account.Username)
|
||||
fmt.Fprintln(c.App.Writer, t.Status.Account.Username)
|
||||
color.Set(color.Reset)
|
||||
fmt.Println(textContent(t.Status.Content))
|
||||
fmt.Fprintln(c.App.Writer, textContent(t.Status.Content))
|
||||
case *mastodon.ErrorEvent:
|
||||
color.Set(color.FgYellow)
|
||||
fmt.Println(t.Error())
|
||||
fmt.Fprintln(c.App.Writer, t.Error())
|
||||
color.Set(color.Reset)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue