Skip to content

Commit 7cb8c65

Browse files
committed
Chore: how to run this
1 parent 3321dda commit 7cb8c65

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

cmd/bot/main.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ func init() {
4646

4747
func main() {
4848
bot := cli.App{
49-
Name: "golangoss-bluesky",
49+
Name: "golangoss-bluesky",
50+
Description: "A little bot to post interesting Github projects to Bluesky",
51+
HideVersion: true,
52+
Authors: []*cli.Author{
53+
{
54+
Name: "Till Klampeckel",
55+
},
56+
},
5057
Flags: []cli.Flag{
5158
&cli.StringFlag{
5259
Name: "bluesky-app-key",
@@ -81,6 +88,7 @@ func main() {
8188
},
8289

8390
Action: func(cCtx *cli.Context) error {
91+
// FIXME: run this in a control loop; or we crash the app
8492
client, err := bk.Dial(ctx, bk.ServerBskySocial)
8593
if err != nil {
8694
return fmt.Errorf("failed to open connection: %v", err)
@@ -93,7 +101,7 @@ func main() {
93101
return fmt.Errorf("you're not allowed to use your full-access credentials, please create an appkey")
94102
case errors.Is(err, bk.ErrLoginUnauthorized):
95103
return fmt.Errorf("username of application password seems incorrect, please double check")
96-
case err != nil:
104+
default:
97105
return fmt.Errorf("something else went wrong, please look at the returned error")
98106
}
99107
}

0 commit comments

Comments
 (0)