first commit to git
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func main() {
|
||||
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer stop()
|
||||
|
||||
logger.Info("worker started")
|
||||
<-ctx.Done()
|
||||
logger.Info("worker stopped")
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
module proxui/worker
|
||||
|
||||
go 1.22
|
||||
Reference in New Issue
Block a user