forked from quic-go/quic-go
protocol: don't capitalize Perspective.String (#4296)
This commit is contained in:
@@ -17,9 +17,9 @@ func (p Perspective) Opposite() Perspective {
|
|||||||
func (p Perspective) String() string {
|
func (p Perspective) String() string {
|
||||||
switch p {
|
switch p {
|
||||||
case PerspectiveServer:
|
case PerspectiveServer:
|
||||||
return "Server"
|
return "server"
|
||||||
case PerspectiveClient:
|
case PerspectiveClient:
|
||||||
return "Client"
|
return "client"
|
||||||
default:
|
default:
|
||||||
return "invalid perspective"
|
return "invalid perspective"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
var _ = Describe("Perspective", func() {
|
var _ = Describe("Perspective", func() {
|
||||||
It("has a string representation", func() {
|
It("has a string representation", func() {
|
||||||
Expect(PerspectiveClient.String()).To(Equal("Client"))
|
Expect(PerspectiveClient.String()).To(Equal("client"))
|
||||||
Expect(PerspectiveServer.String()).To(Equal("Server"))
|
Expect(PerspectiveServer.String()).To(Equal("server"))
|
||||||
Expect(Perspective(0).String()).To(Equal("invalid perspective"))
|
Expect(Perspective(0).String()).To(Equal("invalid perspective"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user