From e4bbd719916ed18053d84439dec10dc583a8f381 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 10 Apr 2023 09:20:44 -0400 Subject: [PATCH] *: various minor changes Signed-off-by: Vincent Batts --- go.mod | 3 ++- go.sum | 4 ++++ main.go | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 62e58d6..cb5cc59 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index 1582aa4..2cfda6c 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/main.go b/main.go index a666000..e88ee6a 100644 --- a/main.go +++ b/main.go @@ -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 } } }