digineo req superuser

This commit is contained in:
bel
2026-06-27 17:35:15 -06:00
parent faae75d5f4
commit 1be18b80d2
5 changed files with 42 additions and 19 deletions
-19
View File
@@ -1,19 +0,0 @@
package main
import (
"context"
"log"
"gitea.bel.blue/bel/with"
)
func main() {
if err := with.Context(run); err != nil {
panic(err)
}
}
func run(ctx context.Context) error {
log.Fatal("RUN")
return ctx.Err()
}
Binary file not shown.
+33
View File
@@ -0,0 +1,33 @@
package main
import (
"context"
"flag"
"log"
"os"
"gitea.bel.blue/bel/with"
"github.com/digineo/go-ping"
)
func main() {
if err := with.Context(run); err != nil {
panic(err)
}
}
func run(ctx context.Context) error {
fs := flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
if err := fs.Parse(os.Args[1:]); err != nil {
return err
}
pinger, err := ping.New("", "::")
if err != nil {
return err
}
defer pinger.Close()
log.Fatal("RUN")
return ctx.Err()
}