Permalink
Browse files

Apply gofmt using Go 1.11.

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 425cdd4bace184bef3b63efa0867add4e469e291
Showing with 15 additions and 15 deletions.
  1. +6 −6 eX0-go/main_test.go
  2. +9 −9 eX0-go/server.go
View
@@ -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.
@@ -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.
View
@@ -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,
},
}
}
@@ -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,
}
}
}
@@ -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,
}
}

0 comments on commit 425cdd4

Please sign in to comment.