-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathconvos.go
More file actions
39 lines (34 loc) · 847 Bytes
/
convos.go
File metadata and controls
39 lines (34 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"context"
"log/slog"
"os"
"github.com/convos-chat/convos/cmd/daemon"
"github.com/convos-chat/convos/cmd/get"
recoveraccount "github.com/convos-chat/convos/cmd/recover"
"github.com/convos-chat/convos/cmd/version"
convosVersion "github.com/convos-chat/convos/pkg/version"
"github.com/urfave/cli/v3"
)
func main() {
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, nil)))
run(os.Args)
}
func run(args []string) {
convos := &cli.Command{
Name: "convos",
Version: convosVersion.Version,
EnableShellCompletion: true,
Commands: []*cli.Command{
daemon.Command(),
get.Command(),
recoveraccount.Command(),
version.Command(),
},
}
err := convos.Run(context.Background(), args)
if err != nil {
slog.Error("Command failed", "error", err)
os.Exit(1)
}
}