package main import ( "context" "fmt" "io" "os" "os/signal" "git.dubyatp.xyz/orphanage/http" ) func run(ctx context.Context, w io.Writer, args []string) error { ctx, cancel := signal.NotifyContext(ctx, os.Interrupt) defer cancel() config := struct { Host string Port string }{ Host: "0.0.0.0", Port: "8080", } return http.StartServer(ctx, config) } func main() { ctx := context.Background() if err := run(ctx, os.Stdout, os.Args); err != nil { fmt.Fprintf(os.Stderr, "%s\n", err) os.Exit(1) } }