From 6709ac1176871099b5f8cfffda9d1958eb97b5fc Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Fri, 4 Nov 2022 10:39:51 -0300 Subject: [PATCH] fmt --- players/options.go | 26 ++++++++-------- players/query.go | 74 +++++++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/players/options.go b/players/options.go index 6915c26..24e9ab7 100644 --- a/players/options.go +++ b/players/options.go @@ -9,19 +9,19 @@ type Options struct { Version string - Position []string - PositionType string - Accelerate string - NationID int - LeagueID int - ClubID int - Height string - Weight string - WeakFoot Range - Skills Range - Foot Foot - Rating Range - Price Range + Position []string + PositionType string + Accelerate string + NationID int + LeagueID int + ClubID int + Height string + Weight string + WeakFoot Range + Skills Range + Foot Foot + Rating Range + Price Range Pace Range Acceleration Range diff --git a/players/query.go b/players/query.go index cdd1462..fc59412 100644 --- a/players/query.go +++ b/players/query.go @@ -11,25 +11,25 @@ type playerQuery struct { Version string `url:"version,omitempty"` - Position []string `url:"position,comma,omitempty"` - PositionType string `url:"pos_type,comma,omitempty"` - Accelerate string `url:"accelerate,omitempty"` - NationID int `url:"nation,omitempty"` - LeagueID int `url:"league,omitempty"` - ClubID int `url:"club,omitempty"` - WeakFoot int `url:"wf,omitempty"` - MinWeakFoot int `url:"min_wf,omitempty"` - MaxWeakFoot int `url:"max_wf,omitempty"` - Skills int `url:"skills,omitempty"` - MinSkills int `url:"min_skills,omitempty"` - MaxSkills int `url:"max_skills,omitempty"` - Foot Foot `url:"foot,omitempty"` - PsPrice string `url:"ps4price,omitempty"` - XboxPrice string `url:"xb1price,omitempty"` - PcPrice string `url:"pcprice,omitempty"` - Rating string `url:"rating,omitempty"` - Height string `url:"height,omitempty"` - Weight string `url:"weight,omitempty"` + Position []string `url:"position,comma,omitempty"` + PositionType string `url:"pos_type,comma,omitempty"` + Accelerate string `url:"accelerate,omitempty"` + NationID int `url:"nation,omitempty"` + LeagueID int `url:"league,omitempty"` + ClubID int `url:"club,omitempty"` + WeakFoot int `url:"wf,omitempty"` + MinWeakFoot int `url:"min_wf,omitempty"` + MaxWeakFoot int `url:"max_wf,omitempty"` + Skills int `url:"skills,omitempty"` + MinSkills int `url:"min_skills,omitempty"` + MaxSkills int `url:"max_skills,omitempty"` + Foot Foot `url:"foot,omitempty"` + PsPrice string `url:"ps4price,omitempty"` + XboxPrice string `url:"xb1price,omitempty"` + PcPrice string `url:"pcprice,omitempty"` + Rating string `url:"rating,omitempty"` + Height string `url:"height,omitempty"` + Weight string `url:"weight,omitempty"` Pace string `url:"Pace,omitempty"` Acceleration string `url:"Acceleration,omitempty"` @@ -70,25 +70,25 @@ type playerQuery struct { func newPlayerQuery(opt *Options) *playerQuery { price := rangeString(opt.Price, "-", 200, 15000000) pq := &playerQuery{ - Platform: opt.Platform, - Page: opt.Page, - Sort: opt.Sort, - Order: opt.Order, - Version: opt.Version, - Position: opt.Position, + Platform: opt.Platform, + Page: opt.Page, + Sort: opt.Sort, + Order: opt.Order, + Version: opt.Version, + Position: opt.Position, PositionType: opt.PositionType, - Accelerate: opt.Accelerate, - NationID: opt.NationID, - LeagueID: opt.LeagueID, - ClubID: opt.ClubID, - MinWeakFoot: opt.WeakFoot.Min, - MaxWeakFoot: opt.WeakFoot.Max, - MinSkills: opt.Skills.Min, - MaxSkills: opt.Skills.Max, - Foot: opt.Foot, - Rating: rangeString(opt.Rating, "-", 30, 99), - Height: opt.Height, - Weight: opt.Weight, + Accelerate: opt.Accelerate, + NationID: opt.NationID, + LeagueID: opt.LeagueID, + ClubID: opt.ClubID, + MinWeakFoot: opt.WeakFoot.Min, + MaxWeakFoot: opt.WeakFoot.Max, + MinSkills: opt.Skills.Min, + MaxSkills: opt.Skills.Max, + Foot: opt.Foot, + Rating: rangeString(opt.Rating, "-", 30, 99), + Height: opt.Height, + Weight: opt.Weight, Pace: rangeString(opt.Pace, ",", 0, 99), Acceleration: rangeString(opt.Acceleration, ",", 0, 99),