mirror of https://github.com/miguelmota/cointop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
511 B
Go
34 lines
511 B
Go
4 years ago
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"github.com/miguelmota/cointop/cointop"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
// TestCmd ...
|
||
|
func TestCmd() *cobra.Command {
|
||
|
testCmd := &cobra.Command{
|
||
|
Use: "test",
|
||
4 years ago
|
Short: "Runs tests for Homebrew",
|
||
4 years ago
|
Long: `The test command runs tests for Homebrew`,
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
doTest()
|
||
|
},
|
||
|
}
|
||
|
|
||
|
return testCmd
|
||
|
}
|
||
|
|
||
|
// DoTest ...
|
||
|
func doTest() {
|
||
|
ct, err := cointop.NewCointop(&cointop.Config{
|
||
|
NoPrompts: true,
|
||
|
})
|
||
|
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
ct.Exit()
|
||
|
}
|