Skip to content

Commit 1fdd170

Browse files
jeremy.sprietjackc
jeremy.spriet
authored andcommitted
feat(pgproto3): expose MaxExpectedBodyLen and ActualBodyLen in ExceededMaxBodyLenErr struct
1 parent f654d61 commit 1fdd170

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pgproto3/pgproto3.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ func (e *writeError) Unwrap() error {
7171
}
7272

7373
type ExceededMaxBodyLenErr struct {
74-
maxExpectedBodyLen int
75-
actualBodyLen int
74+
MaxExpectedBodyLen int
75+
ActualBodyLen int
7676
}
7777

7878
func (e *ExceededMaxBodyLenErr) Error() string {
79-
return fmt.Sprintf("invalid body length: expected at most %d, but got %d", e.maxExpectedBodyLen, e.actualBodyLen)
79+
return fmt.Sprintf("invalid body length: expected at most %d, but got %d", e.MaxExpectedBodyLen, e.ActualBodyLen)
8080
}
8181

8282
// getValueFromJSON gets the value from a protocol message representation in JSON.

0 commit comments

Comments
 (0)