Files
hamview-receiver/main.go
maze a705b747b2
Some checks failed
Test and build / test (push) Successful in 58s
Test and build / Build (amd64, , linux) (push) Failing after 57s
Test and build / Build (arm, 6, linux) (push) Failing after 59s
Test and build / Build (arm, 7, linux) (push) Failing after 58s
Move internal/cmd to cmd
2026-02-23 15:53:37 +01:00

50 lines
925 B
Go

package main
import (
"context"
"fmt"
"log"
"os"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v3"
"git.maze.io/ham/hamview/cmd"
)
var logger *logrus.Logger
func main() {
cmd := &cli.Command{
Name: "hamview-receiver",
Usage: "Receiver for HAM radio protocols",
Action: func(context.Context, *cli.Command) error {
fmt.Println("boom! I say!")
return nil
},
Flags: cmd.AllFlags("hamview-receiver.yaml"),
Commands: []*cli.Command{
{
Name: "aprsis",
Usage: "Start an APRS-IS proxy",
Before: cmd.ConfigureLogging(&logger),
Action: runAPRSIS,
},
{
Name: "meshcore",
Usage: "Start a MeshCore receiver",
Before: cmd.ConfigureLogging(&logger),
Action: runMeshCore,
},
},
}
if err := cmd.Run(context.Background(), os.Args); err != nil {
log.Fatal(err)
}
}
func waitForInterrupt() error {
return cmd.WaitForInterrupt(logger, "receiver")
}