]> git.giacomolli.uk - onechat/blob - main.go
Name the fields of the config test cases
[onechat] / main.go
1 package main
2
3 import (
4         "context"
5         "fmt"
6         "os"
7         "os/signal"
8         "syscall"
9 )
10
11 func main() {
12         err := run()
13         if err != nil {
14                 fmt.Fprintln(os.Stderr, "onechat:", err)
15                 os.Exit(1)
16         }
17 }
18
19 func run() error {
20         ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
21         defer cancel()
22
23         _, err := fmt.Println("onechat")
24         if err != nil {
25                 return err
26         }
27
28         return ctx.Err()
29 }