oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package main
2
3import (
4 "amadan.net/oficina/equipo/internal/toolproxy"
5 "context"
6 "os"
7 "os/signal"
8 "syscall"
9)
10
11func main() {
12 if len(os.Args) != 3 || os.Args[1] != "--socket" {
13 os.Exit(2)
14 }
15 ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
16 defer stop()
17 if toolproxy.Serve(ctx, os.Stdin, os.Stdout, os.Args[2]) != nil {
18 os.Exit(1)
19 }
20}
21