Files
atlantis/main.go
2018-02-18 21:28:18 -08:00

26 lines
644 B
Go

// Package main is the entrypoint for the CLI.
package main
import (
"github.com/runatlantis/atlantis/cmd"
"github.com/spf13/viper"
)
func main() {
v := viper.New()
v.Set("version", "0.2.4")
// We're creating commands manually here rather than using init() functions
// (as recommended by cobra) because it makes testing easier.
server := &cmd.ServerCmd{
ServerCreator: &cmd.DefaultServerCreator{},
Viper: v,
}
version := &cmd.VersionCmd{Viper: v}
bootstrap := &cmd.BootstrapCmd{}
cmd.RootCmd.AddCommand(server.Init())
cmd.RootCmd.AddCommand(version.Init())
cmd.RootCmd.AddCommand(bootstrap.Init())
cmd.Execute()
}