You've already forked Go-Template
Please no changes this time.
This commit is contained in:
34
main.go
Normal file
34
main.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"gitea.siteworxpro.com/Siteworxpro/Go-Template/cmds"
|
||||
"gitea.siteworxpro.com/Siteworxpro/Go-Template/logger"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"os"
|
||||
)
|
||||
|
||||
const Version = "0.1"
|
||||
|
||||
func main() {
|
||||
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "Go-Template",
|
||||
Short: "Go-Template is a simple template for Go applications",
|
||||
Long: `Go-Template is a simple template for Go applications. It provides a basic structure for building Go applications with a focus on simplicity and ease of use.`,
|
||||
Version: Version,
|
||||
}
|
||||
|
||||
l := logger.NewLogger(log.DebugLevel)
|
||||
rootCmd.SetContext(logger.NewContext(context.Background(), l))
|
||||
|
||||
rootCmd.AddCommand(cmds.ServerCommand())
|
||||
err := rootCmd.Execute()
|
||||
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
Reference in New Issue
Block a user