forked from quic-go/quic-go
log connection IDs without the 0x prefix
This commit is contained in:
@@ -65,5 +65,5 @@ func (c ConnectionID) String() string {
|
||||
if c.Len() == 0 {
|
||||
return "(empty)"
|
||||
}
|
||||
return fmt.Sprintf("%#x", c.Bytes())
|
||||
return fmt.Sprintf("%x", c.Bytes())
|
||||
}
|
||||
|
||||
@@ -93,12 +93,12 @@ var _ = Describe("Connection ID generation", func() {
|
||||
|
||||
It("has a string representation", func() {
|
||||
c := ConnectionID([]byte{0xde, 0xad, 0xbe, 0xef, 0x42})
|
||||
Expect(c.String()).To(Equal("0xdeadbeef42"))
|
||||
Expect(c.String()).To(Equal("deadbeef42"))
|
||||
})
|
||||
|
||||
It("has a long string representation", func() {
|
||||
c := ConnectionID{0x13, 0x37, 0, 0, 0xde, 0xca, 0xfb, 0xad}
|
||||
Expect(c.String()).To(Equal("0x13370000decafbad"))
|
||||
Expect(c.String()).To(Equal("13370000decafbad"))
|
||||
})
|
||||
|
||||
It("has a string representation for the default value", func() {
|
||||
|
||||
Reference in New Issue
Block a user