*: various minor changes

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-04-10 09:20:44 -04:00
parent 7c271393c3
commit e4bbd71991
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
3 changed files with 14 additions and 2 deletions

3
go.mod
View file

@ -6,6 +6,7 @@ require (
github.com/mattn/go-mastodon v0.0.6
github.com/sirupsen/logrus v1.9.0
github.com/urfave/cli/v2 v2.24.3
golang.org/x/tools v0.7.0
)
require (
@ -14,5 +15,5 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/sys v0.6.0 // indirect
)

4
go.sum
View file

@ -24,6 +24,10 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View file

@ -10,8 +10,14 @@ import (
"github.com/mattn/go-mastodon"
"github.com/sirupsen/logrus"
cli "github.com/urfave/cli/v2" // imports as package "cli"
_ "golang.org/x/tools/blog/atom"
)
func init() {
logrus.SetOutput(os.Stderr)
}
func main() {
app := &cli.App{
Name: "mst",
@ -84,9 +90,10 @@ func main() {
}
fmt.Println(string(buf))
case *mastodon.ErrorEvent:
logrus.Errorf("event was error: %#v", v)
logrus.Errorf("event was error: %#v", v.Error())
default:
logrus.Warnf("not sure what to do with %T: %s", v, v)
// just saw a *mastodon.DeleteEvent
}
}
}