Add main program with 'sqlite_lint' subcommand
Some checks failed
CI / release-test (push) Failing after 16s
Some checks failed
CI / release-test (push) Failing after 16s
This commit is contained in:
30
cmd/main.go
Normal file
30
cmd/main.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const (
|
||||
GREEN = "\033[0;32m"
|
||||
RED = "\033[0;31m"
|
||||
RESET = "\033[0m"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "gas",
|
||||
SilenceErrors: true,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
rootCmd.AddCommand(sqlite_lint)
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Println(RED + err.Error() + RESET)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Subcommand "init"
|
||||
// Subcommand "generate_models"
|
||||
Reference in New Issue
Block a user