remove unneeded checks
This commit is contained in:
11
cmd/root.go
11
cmd/root.go
@@ -17,7 +17,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
@@ -63,15 +62,7 @@ var teamIDs = map[string]statsapi.TeamID{
|
||||
}
|
||||
|
||||
func getGamePk() (string, error) {
|
||||
if Team == "" {
|
||||
return "", errors.New("need team ID")
|
||||
}
|
||||
|
||||
id, ok := teamIDs[string(Team)]
|
||||
if !ok {
|
||||
return "", errors.New("invalid team ID")
|
||||
}
|
||||
|
||||
id := teamIDs[string(Team)]
|
||||
sched, err := statsapi.RequestSchedule("1", strconv.Itoa(int(id)))
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user