X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/522d226230a2eae0a8a33ae0fbf32f96c6886b26..84fc815feb485b35eec53a8c7863c6770fc65e02:/main.go diff --git a/main.go b/main.go index a561c37..9bc69d1 100644 --- a/main.go +++ b/main.go @@ -33,6 +33,12 @@ func run() error { if err != nil { return err } + // A signal is the normal stop of the daemon and the client, so their + // result does not include ctx.Err(). + case len(args) == 1 && args[0] == "daemon": + return daemon(ctx, os.Stdout) + case len(args) == 1 && args[0] == "chat": + return chat(ctx, os.Stdin, os.Stdout) case len(args) > 0 && args[0] == "probe": err := probe(ctx, args[1:], os.Stdout) if err != nil {