protocol: don't capitalize Perspective.String (#4296)

This commit is contained in:
Marten Seemann 2024-02-02 06:16:36 +07:00 committed by GitHub
parent 0582e931a5
commit 2fbe713bb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -17,9 +17,9 @@ func (p Perspective) Opposite() Perspective {
func (p Perspective) String() string {
switch p {
case PerspectiveServer:
return "Server"
return "server"
case PerspectiveClient:
return "Client"
return "client"
default:
return "invalid perspective"
}

View file

@ -7,8 +7,8 @@ import (
var _ = Describe("Perspective", func() {
It("has a string representation", func() {
Expect(PerspectiveClient.String()).To(Equal("Client"))
Expect(PerspectiveServer.String()).To(Equal("Server"))
Expect(PerspectiveClient.String()).To(Equal("client"))
Expect(PerspectiveServer.String()).To(Equal("server"))
Expect(Perspective(0).String()).To(Equal("invalid perspective"))
})