pot/main.go
Lunny Xiao 60374a08ca
All checks were successful
continuous-integration/drone/push Build is passing
Support std library, remote library from github and gitea
2020-11-28 14:35:32 +08:00

41 lines
561 B
Go

package main
import (
"fmt"
"os"
"gitea.com/lunny/pot/cmd"
_ "github.com/shurcooL/vfsgen"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var (
version = "0.0.2"
rootCmd = &cobra.Command{
Use: "pot",
}
verCmd = &cobra.Command{
Use: "version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
},
}
)
func main() {
log.SetLevel(log.DebugLevel)
rootCmd.AddCommand(
verCmd,
cmd.CmdRun,
)
if err := rootCmd.Execute(); err != nil {
log.Fatalf("Failed to run app with %s: %v", os.Args, err)
}
}