Skip to content

Commit ab2c22e

Browse files
committed
formatting: gofumports
1 parent 4be757c commit ab2c22e

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ linters:
1717
- gomnd
1818
- exhaustivestruct
1919
- godot
20+
- gofumpt
2021
issues:
2122
exclude-rules:
2223
# Exclude some linters from running on tests files.

pkg/demoinfocs/common/player.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (p *Player) ViewDirectionY() float32 {
281281
}
282282

283283
// Position returns the in-game coordinates.
284-
//Like the ones you get from cl_showpos 1.
284+
// Like the ones you get from cl_showpos 1.
285285
func (p *Player) Position() r3.Vector {
286286
if p.Entity == nil {
287287
return r3.Vector{}

pkg/demoinfocs/datatables_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func TestParser_BindNewPlayer_Issue98_Reconnect(t *testing.T) {
7272
func TestParser_BindNewPlayer_PlayerSpotted_Under32(t *testing.T) {
7373
testPlayerSpotted(t, "m_bSpottedByMask.000")
7474
}
75+
7576
func TestParser_BindNewPlayer_PlayerSpotted_Over32(t *testing.T) {
7677
testPlayerSpotted(t, "m_bSpottedByMask.001")
7778
}

pkg/demoinfocs/debug_on.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ const (
1818

1919
// Can be overridden via -ldflags '-X github.com/markus-wa/demoinfocs-golang.debugServerClasses=YES'
2020
// Oh and btw we cant use bools for this, Go says 'cannot use -X with non-string symbol'
21-
var debugGameEvents = yes
22-
var debugUnhandledMessages = no
23-
var debugIngameTicks = yes
24-
var debugDemoCommands = no
25-
var debugServerClasses = no
21+
var (
22+
debugGameEvents = yes
23+
debugUnhandledMessages = no
24+
debugIngameTicks = yes
25+
debugDemoCommands = no
26+
debugServerClasses = no
27+
)
2628

2729
func debugGameEvent(d *msg.CSVCMsg_GameEventListDescriptorT, ge *msg.CSVCMsg_GameEvent) {
2830
const (

pkg/demoinfocs/events/events_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func (p demoInfoProviderMock) TickRate() float64 {
6969
func (p demoInfoProviderMock) FindPlayerByHandle(int) *common.Player {
7070
return nil
7171
}
72+
7273
func (p demoInfoProviderMock) PlayerResourceEntity() st.Entity {
7374
return nil
7475
}

0 commit comments

Comments
 (0)