http3: make error codes public and consistent with http2 package (#3744)

* make http3 error codes public and consistent with http2 package

* typo on ErrNoError

* renaming of ErrCode values
This commit is contained in:
Jean-Francois Giorgi
2023-04-08 06:53:14 +02:00
committed by GitHub
parent c9ae152956
commit af517bdef1
8 changed files with 113 additions and 113 deletions

View File

@@ -29,11 +29,11 @@ var _ = Describe("error codes", func() {
valString := c.(*ast.ValueSpec).Values[0].(*ast.BasicLit).Value
val, err := strconv.ParseInt(valString, 0, 64)
Expect(err).NotTo(HaveOccurred())
Expect(errorCode(val).String()).ToNot(Equal("unknown error code"))
Expect(ErrCode(val).String()).ToNot(Equal("unknown error code"))
}
})
It("has a string representation for unknown error codes", func() {
Expect(errorCode(0x1337).String()).To(Equal("unknown error code: 0x1337"))
Expect(ErrCode(0x1337).String()).To(Equal("unknown error code: 0x1337"))
})
})