Compare commits
2 Commits
b832cd7743
...
bff2bd6d2e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bff2bd6d2e | ||
|
|
5a74290409 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
**/*.sw*
|
||||
/show-ingestion
|
||||
20
main.go
Normal file
20
main.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctx, can := signal.NotifyContext(context.Background(), syscall.SIGINT)
|
||||
defer can()
|
||||
|
||||
if err := Run(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func Run(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
14
main_test.go
Normal file
14
main_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
main "gitea/show-ingestion"
|
||||
)
|
||||
|
||||
func TestRun(t *testing.T) {
|
||||
if err := main.Run(context.Background()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user