From 9c9887ff652452aa93fa417ada7d9dfc4c65fa7f Mon Sep 17 00:00:00 2001 From: Alain Gilbert Date: Fri, 3 Aug 2018 03:04:10 -0700 Subject: [PATCH] lint --- Makefile | 2 +- allianceDepot.go | 2 +- crystalMine.go | 2 +- defence.go | 2 +- deuteriumSynthesizer.go | 2 +- metalMine.go | 2 +- metalStorage.go | 2 +- ogame.go | 12 +++++++++++- ships.go | 2 +- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 04fce4cd..535c6ef6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PKGS = $(shell go list ./... | grep -v /vendor/ | grep -v /bindata) +PKGS = $(shell go list ./... | grep -v /vendor/ | grep -v /bindata | grep -v /cmd/c) VERSION = $(shell git describe) lint: diff --git a/allianceDepot.go b/allianceDepot.go index e3a51390..b7bcf893 100644 --- a/allianceDepot.go +++ b/allianceDepot.go @@ -5,7 +5,7 @@ type allianceDepot struct { BaseBuilding } -// New ... +// NewAllianceDepot ... func NewAllianceDepot() *allianceDepot { b := new(allianceDepot) b.ID = AllianceDepotID diff --git a/crystalMine.go b/crystalMine.go index 376f628b..b387940d 100644 --- a/crystalMine.go +++ b/crystalMine.go @@ -7,7 +7,7 @@ type crystalMine struct { BaseBuilding } -// New ... +// NewCrystalMine ... func NewCrystalMine() *crystalMine { b := new(crystalMine) b.ID = CrystalMineID diff --git a/defence.go b/defence.go index 892670ae..526c3903 100644 --- a/defence.go +++ b/defence.go @@ -2,7 +2,7 @@ package ogame import "strconv" -// Defense ... +// Defenses ... type Defenses struct { RocketLauncher int LightLaser int diff --git a/deuteriumSynthesizer.go b/deuteriumSynthesizer.go index e0d51d3d..572925e1 100644 --- a/deuteriumSynthesizer.go +++ b/deuteriumSynthesizer.go @@ -7,7 +7,7 @@ type deuteriumSynthesizer struct { BaseBuilding } -// New ... +// NewDeuteriumSynthesizer ... func NewDeuteriumSynthesizer() *deuteriumSynthesizer { b := new(deuteriumSynthesizer) b.ID = DeuteriumSynthesizerID diff --git a/metalMine.go b/metalMine.go index 3f5d2c7a..e16d18b3 100644 --- a/metalMine.go +++ b/metalMine.go @@ -7,7 +7,7 @@ type metalMine struct { BaseBuilding } -// NeNewMetalMinew ... +// NewMetalMine ... func NewMetalMine() *metalMine { b := new(metalMine) b.ID = MetalMineID diff --git a/metalStorage.go b/metalStorage.go index b11f99be..36d4e1f7 100644 --- a/metalStorage.go +++ b/metalStorage.go @@ -5,7 +5,7 @@ type metalStorage struct { StorageBuilding } -// New ... +// NewMetalStorage ... func NewMetalStorage() *metalStorage { b := new(metalStorage) b.ID = MetalStorageID diff --git a/ogame.go b/ogame.go index d3404226..2fffaf7e 100644 --- a/ogame.go +++ b/ogame.go @@ -93,6 +93,7 @@ var ErrBadCredentials = errors.New("bad credentials") // ErrInvalidPlanetID ... var ErrInvalidPlanetID = errors.New("invalid planet id") +// All ogame objects var ( AllianceDepot = NewAllianceDepot() // Buildings CrystalMine = NewCrystalMine() @@ -208,6 +209,7 @@ type Defense interface { GetRapidfireFrom() map[ID]int } +// Ships ... var Ships = []Ship{ Battlecruiser, Battleship, @@ -225,6 +227,7 @@ var Ships = []Ship{ SolarSatellite, } +// Buildings ... var Buildings = []Building{ AllianceDepot, CrystalMine, @@ -248,6 +251,7 @@ var Buildings = []Building{ SolarSatellite, } +// Technologies ... var Technologies = []Technology{ ArmourTechnology, Astrophysics, @@ -1942,11 +1946,16 @@ func (b *OGame) sendFleet(planetID PlanetID, ships []Quantifiable, speed Speed, return 0, errors.New("could not find new fleet ID") } +// EspionageReportType ... type EspionageReportType int +// Action ... const Action EspionageReportType = 0 + +// Report ... const Report EspionageReportType = 1 +// EspionageReportSummary ... type EspionageReportSummary struct { ID int Type EspionageReportType @@ -2011,6 +2020,7 @@ func (b *OGame) getEspionageReportMessages() ([]EspionageReportSummary, error) { return msgs, nil } +// EspionageReport ... type EspionageReport struct { Resources ResourcesBuildings @@ -2582,7 +2592,7 @@ func (b *OGame) SendFleet(planetID PlanetID, ships []Quantifiable, speed Speed, return b.sendFleet(planetID, ships, speed, where, mission, resources) } -// GetEspionageReportMessageIDs ... +// GetEspionageReportMessages ... func (b *OGame) GetEspionageReportMessages() ([]EspionageReportSummary, error) { b.Lock() defer b.Unlock() diff --git a/ships.go b/ships.go index d0067a9e..67de5653 100644 --- a/ships.go +++ b/ships.go @@ -2,7 +2,7 @@ package ogame import "strconv" -// Ships ... +// ShipsInfos ... type ShipsInfos struct { LightFighter int HeavyFighter int