initial commit

main
William Perron 2 months ago
commit fa2bac276e
No known key found for this signature in database
GPG Key ID: F701727E6034EEC9

1
.gitignore vendored

@ -0,0 +1 @@
bin/

@ -0,0 +1,8 @@
from golang:1.23-bookworm as build
workdir /app
copy . .
run CGO_ENABLED=0 go build -o oombomb ./main.go
from scratch
copy --from=build /app/oombomb /oombomb
cmd ["/oombomb"]

@ -0,0 +1,3 @@
module go.wperron.io/oombomb
go 1.22.1

@ -0,0 +1,26 @@
package main
import (
"context"
"os/signal"
"strings"
"syscall"
"time"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGKILL, syscall.SIGINT)
defer cancel()
init := "Hello, World!"
ticker := time.NewTicker(time.Second)
mainloop:
for {
select {
case <-ctx.Done():
break mainloop
case <-ticker.C:
init = strings.Repeat(init, 10)
}
}
}
Loading…
Cancel
Save