go fmt
This commit is contained in:
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// AnalyticsAPIService AnalyticsAPI service
|
||||
type AnalyticsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// AttendanceAPIService AttendanceAPI service
|
||||
type AttendanceAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// AwardsAPIService AwardsAPI service
|
||||
type AwardsAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// BatTrackingAPIService BatTrackingAPI service
|
||||
type BatTrackingAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// BiomechanicsAPIService BiomechanicsAPI service
|
||||
type BiomechanicsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// BroadcastAPIService BroadcastAPI service
|
||||
type BroadcastAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// ConferenceAPIService ConferenceAPI service
|
||||
type ConferenceAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// DivisionAPIService DivisionAPI service
|
||||
type DivisionAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// DraftAPIService DraftAPI service
|
||||
type DraftAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// GameAPIService GameAPI service
|
||||
type GameAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// GamePaceAPIService GamePaceAPI service
|
||||
type GamePaceAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// HighLowAPIService HighLowAPI service
|
||||
type HighLowAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// HomerunDerbyAPIService HomerunDerbyAPI service
|
||||
type HomerunDerbyAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// JobAPIService JobAPI service
|
||||
type JobAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// LeagueAPIService LeagueAPI service
|
||||
type LeagueAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// MilestonesAPIService MilestonesAPI service
|
||||
type MilestonesAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// MiscAPIService MiscAPI service
|
||||
type MiscAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// PersonAPIService PersonAPI service
|
||||
type PersonAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// PredictionsAPIService PredictionsAPI service
|
||||
type PredictionsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// ReviewsAPIService ReviewsAPI service
|
||||
type ReviewsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// ScheduleAPIService ScheduleAPI service
|
||||
type ScheduleAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// SeasonAPIService SeasonAPI service
|
||||
type SeasonAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// SkeletalAPIService SkeletalAPI service
|
||||
type SkeletalAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// SportsAPIService SportsAPI service
|
||||
type SportsAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// StandingsAPIService StandingsAPI service
|
||||
type StandingsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// StatsAPIService StatsAPI service
|
||||
type StatsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// StreaksAPIService StreaksAPI service
|
||||
type StreaksAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// TeamsAPIService TeamsAPI service
|
||||
type TeamsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// TransactionsAPIService TransactionsAPI service
|
||||
type TransactionsAPIService service
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
||||
// UniformsAPIService UniformsAPI service
|
||||
type UniformsAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// VenuesAPIService VenuesAPI service
|
||||
type VenuesAPIService service
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// WeatherAPIService WeatherAPI service
|
||||
type WeatherAPIService service
|
||||
|
||||
|
||||
+9
-10
@@ -31,14 +31,13 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
)
|
||||
|
||||
var (
|
||||
JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
|
||||
XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
|
||||
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
|
||||
queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" )
|
||||
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
|
||||
)
|
||||
|
||||
// APIClient manages communication with the Stats API Documentation API v2.0.0
|
||||
@@ -218,7 +217,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func parameterValueToString( obj interface{}, key string ) string {
|
||||
func parameterValueToString(obj interface{}, key string) string {
|
||||
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
|
||||
if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok {
|
||||
return fmt.Sprintf("%v", actualObj.GetActualInstanceValue())
|
||||
@@ -226,11 +225,11 @@ func parameterValueToString( obj interface{}, key string ) string {
|
||||
|
||||
return fmt.Sprintf("%v", obj)
|
||||
}
|
||||
var param,ok = obj.(MappedNullable)
|
||||
var param, ok = obj.(MappedNullable)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
dataMap,err := param.ToMap()
|
||||
dataMap, err := param.ToMap()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
@@ -250,8 +249,8 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri
|
||||
value = "invalid"
|
||||
|
||||
case reflect.Struct:
|
||||
if t,ok := obj.(MappedNullable); ok {
|
||||
dataMap,err := t.ToMap()
|
||||
if t, ok := obj.(MappedNullable); ok {
|
||||
dataMap, err := t.ToMap()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -269,7 +268,7 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri
|
||||
return
|
||||
}
|
||||
var lenIndValue = indValue.Len()
|
||||
for i:=0;i<lenIndValue;i++ {
|
||||
for i := 0; i < lenIndValue; i++ {
|
||||
var arrayValue = indValue.Index(i)
|
||||
var keyPrefixForCollectionType = keyPrefix
|
||||