spud/main.go

26 lines
495 B
Go
Raw Normal View History

2024-06-02 05:11:56 +00:00
package main
import (
"github.com/spf13/cobra"
)
var cli = &cobra.Command{
Use: "spud",
Short: "A not-entirely-terrible-way to manage self-hosted services.",
}
var start = &cobra.Command{
Use: "start",
Short: "Creates or updates a service based on the provided definition.",
Run: func(cmd *cobra.Command, args []string) {
pathProvided := args[0]
def := GetServiceDefinitionFromFile(pathProvided)
CreateService(def)
},
}
func main() {
cli.AddCommand(start)
cli.Execute()
}