Skip to content

Commit

Permalink
Apply gofmt using Go 1.11.
Browse files Browse the repository at this point in the history
This fixes gofmt formatting incompatibilities with Go 1.11.

Go files were formatted automatically with:

	gofmt -w .

Apply the gofmt change to example output as well, by hand.
  • Loading branch information
dmitshur committed Oct 7, 2018
1 parent dc16bdc commit 425cdd4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions eX0-go/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ func Example_fullConnection() {
// Team: (packet.Team)(0),
// State: (*packet.State)(&packet.State{
// CommandSequenceNumber: (uint8)(123),
// X: (float32)(1),
// Y: (float32)(2),
// Z: (float32)(3),
// X: (float32)(1),
// Y: (float32)(2),
// Z: (float32)(3),
// }),
// })
// Unnamed Player joined team Red.
Expand Down Expand Up @@ -444,9 +444,9 @@ func disabledExample_connectToEmptyRealServer() {
// Team: (packet.Team)(0),
// State: (*packet.State)(&packet.State{
// CommandSequenceNumber: (uint8)(123),
// X: (float32)(1),
// Y: (float32)(2),
// Z: (float32)(3),
// X: (float32)(1),
// Y: (float32)(2),
// Z: (float32)(3),
// }),
// })
// Unnamed Player joined team Red.
Expand Down
18 changes: 9 additions & 9 deletions eX0-go/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ func (s *server) sendServerUpdates(c *Connection) {
ActivePlayer: 1,
State: &packet.State{
CommandSequenceNumber: ps.LatestAuthed().SequenceNumber,
X: ps.LatestAuthed().X,
Y: ps.LatestAuthed().Y,
Z: ps.LatestAuthed().Z,
X: ps.LatestAuthed().X,
Y: ps.LatestAuthed().Y,
Z: ps.LatestAuthed().Z,
},
}
}
Expand Down Expand Up @@ -655,9 +655,9 @@ func (s *server) handleTCPConnection2(client *Connection) error {
if playerInfo.Team != packet.Spectator {
playerInfo.State = &packet.State{
CommandSequenceNumber: ps.LatestAuthed().SequenceNumber,
X: ps.LatestAuthed().X,
Y: ps.LatestAuthed().Y,
Z: ps.LatestAuthed().Z,
X: ps.LatestAuthed().X,
Y: ps.LatestAuthed().Y,
Z: ps.LatestAuthed().Z,
}
}
}
Expand Down Expand Up @@ -785,9 +785,9 @@ func (s *server) handleTCPConnection2(client *Connection) error {
if p.Team != packet.Spectator {
p.State = &packet.State{
CommandSequenceNumber: ps.LatestAuthed().SequenceNumber,
X: ps.LatestAuthed().X,
Y: ps.LatestAuthed().Y,
Z: ps.LatestAuthed().Z,
X: ps.LatestAuthed().X,
Y: ps.LatestAuthed().Y,
Z: ps.LatestAuthed().Z,
}
}

Expand Down

0 comments on commit 425cdd4

Please sign in to comment.