From f7e82ff588f21f48427e6d49a53266389b68e8d5 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Thu, 24 Apr 2025 19:56:54 -0600 Subject: [PATCH] stub --- main.go | 17 +++++++++++++++++ main_test.go | 18 ++++++++++++++++++ src/cmd/main.go | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 main.go create mode 100644 main_test.go create mode 100644 src/cmd/main.go diff --git a/main.go b/main.go new file mode 100644 index 0000000..20d19b7 --- /dev/null +++ b/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "context" + "os/signal" + "show-rss/src/cmd" + "syscall" +) + +func main() { + ctx, can := signal.NotifyContext(context.Background(), syscall.SIGINT) + defer can() + + if err := cmd.Main(ctx); err != nil { + panic(err) + } +} diff --git a/main_test.go b/main_test.go new file mode 100644 index 0000000..4c5d866 --- /dev/null +++ b/main_test.go @@ -0,0 +1,18 @@ +package main_test + +import ( + "context" + "os/signal" + "show-rss/src/cmd" + "syscall" + "testing" +) + +func TestCmdMain(t *testing.T) { + ctx, can := signal.NotifyContext(context.Background(), syscall.SIGINT) + defer can() + + if err := cmd.Main(ctx); err != nil { + t.Fatal(err) + } +} diff --git a/src/cmd/main.go b/src/cmd/main.go new file mode 100644 index 0000000..c937ece --- /dev/null +++ b/src/cmd/main.go @@ -0,0 +1,10 @@ +package cmd + +import ( + "context" + "io" +) + +func Main(ctx context.Context) error { + return io.EOF +}