More func
This commit is contained in:
9
main.go
9
main.go
@@ -14,12 +14,21 @@ func checkErr(err error) {
|
||||
func main() {
|
||||
var (
|
||||
excel_file string
|
||||
get_top bool
|
||||
month int
|
||||
)
|
||||
|
||||
flag.StringVar(&excel_file, "file", "", "The path to the excel file for processing")
|
||||
flag.BoolVar(&get_top, "get_top", false, "A command to get the top performers for the current month")
|
||||
flag.IntVar(&month, "month", 0, "Sets the month for the data to process")
|
||||
flag.Parse()
|
||||
|
||||
run := NewRunner()
|
||||
if excel_file != "" {
|
||||
ProcessExcel(excel_file)
|
||||
} else if get_top {
|
||||
run.GetTop()
|
||||
} else {
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user