improve alignment of some structs

This commit is contained in:
Lucas Clemente
2016-09-07 15:36:09 +02:00
parent 809ea02511
commit aa645301c6
4 changed files with 7 additions and 7 deletions

View File

@@ -34,12 +34,12 @@ var _ = Describe("Frame logging", func() {
It("logs sent frames", func() {
LogFrame(&RstStreamFrame{}, true)
Expect(string(buf.Bytes())).To(Equal("\t-> &frames.RstStreamFrame{StreamID:0x0, ByteOffset:0x0, ErrorCode:0x0}\n"))
Expect(string(buf.Bytes())).To(Equal("\t-> &frames.RstStreamFrame{StreamID:0x0, ErrorCode:0x0, ByteOffset:0x0}\n"))
})
It("logs received frames", func() {
LogFrame(&RstStreamFrame{}, false)
Expect(string(buf.Bytes())).To(Equal("\t<- &frames.RstStreamFrame{StreamID:0x0, ByteOffset:0x0, ErrorCode:0x0}\n"))
Expect(string(buf.Bytes())).To(Equal("\t<- &frames.RstStreamFrame{StreamID:0x0, ErrorCode:0x0, ByteOffset:0x0}\n"))
})
It("logs stream frames", func() {

View File

@@ -10,8 +10,8 @@ import (
// A RstStreamFrame in QUIC
type RstStreamFrame struct {
StreamID protocol.StreamID
ByteOffset protocol.ByteCount
ErrorCode uint32
ByteOffset protocol.ByteCount
}
//Write writes a RST_STREAM frame

View File

@@ -11,11 +11,11 @@ import (
// A StreamFrame of QUIC
type StreamFrame struct {
FinBit bool
StreamID protocol.StreamID
FinBit bool
DataLenPresent bool
Offset protocol.ByteCount
Data []byte
DataLenPresent bool
}
var (