main
Bel LaPointe 2025-04-24 19:56:54 -06:00
parent cd159aba1b
commit f7e82ff588
3 changed files with 45 additions and 0 deletions

17
main.go Normal file
View File

@ -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)
}
}

18
main_test.go Normal file
View File

@ -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)
}
}

10
src/cmd/main.go Normal file
View File

@ -0,0 +1,10 @@
package cmd
import (
"context"
"io"
)
func Main(ctx context.Context) error {
return io.EOF
}