29 lines
339 B
Go
29 lines
339 B
Go
package main
|
|
|
|
import (
|
|
"rpirelay/cmd/server"
|
|
|
|
"github.com/joho/godotenv"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
rootCmd *cobra.Command
|
|
)
|
|
|
|
func init() {
|
|
godotenv.Load()
|
|
}
|
|
|
|
func main() {
|
|
rootCmd = &cobra.Command{
|
|
Use: "rpi-relay",
|
|
}
|
|
|
|
rootCmd.AddCommand(server.NewCommand())
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|