This commit is contained in:
Yasuhiro Matsumoto 2017-10-25 15:23:53 +09:00
parent aef736e991
commit a7e10ddba4

View File

@ -3,7 +3,6 @@ package main
import ( import (
"context" "context"
"errors" "errors"
"strconv"
"github.com/mattn/go-mastodon" "github.com/mattn/go-mastodon"
"github.com/urfave/cli" "github.com/urfave/cli"
@ -15,11 +14,7 @@ func cmdDelete(c *cli.Context) error {
return errors.New("arguments required") return errors.New("arguments required")
} }
for i := 0; i < c.NArg(); i++ { for i := 0; i < c.NArg(); i++ {
id, err := strconv.ParseInt(c.Args().Get(i), 10, 64) err := client.DeleteStatus(context.Background(), mastodon.ID(c.Args().Get(i)))
if err != nil {
return err
}
err = client.DeleteStatus(context.Background(), id)
if err != nil { if err != nil {
return err return err
} }