fix ID
This commit is contained in:
parent
aef736e991
commit
a7e10ddba4
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user