hardware-tests/cmd/root.go
Gregory Ballantine 90f679c366
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Added result logging functionality (#2)
All test commands now utilize the "-l" or "--log" flag to specify a file to log results to.

Reviewed-on: #2
2022-02-26 20:48:37 -05:00

31 lines
513 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var (
Log string
)
var rootCmd = &cobra.Command{
Use: "bgbench",
Short: "Bit Goblin hardware benching tool.",
Long: `A PC hardware benchmarking tool written by Bit Goblin.`,
Version: "v0.3.0",
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
func init() {
rootCmd.PersistentFlags().StringVarP(&Log, "log", "l", "false", "File location to write results to.")
}