opier/cmd/root.go

32 lines
519 B
Go

package cmd // import "udico.de/uditaren/opier/cmd"
import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var cRoot = &cobra.Command {
Use: "opier <command>",
Short: "Generate go code from OpenAPI YAML files",
}
func init() {
cRoot.PreRun = preexec
cRoot.PostRun = postexec
}
func Execute() {
if err := cRoot.Execute(); err != nil {
log.WithError(err).Fatal("top level oops")
}
}
func preexec(cmd *cobra.Command, args []string) {
}
func postexec(cmd *cobra.Command, args []string) {
}