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