fix(gitea): address review feedback on diff size limiting
- Add concurrency safety note to MaxDiffSize field documentation, mirroring the existing note on RetryBackoff - Consolidate six individual test functions into a single table-driven test (TestGetPullRequestDiff_SizeLimits) reducing repetition - Add //nolint:errcheck annotation to test handler w.Write calls
This commit is contained in:
@@ -71,6 +71,9 @@ type Client struct {
|
||||
|
||||
// MaxDiffSize is the maximum number of bytes allowed when fetching a PR diff.
|
||||
// If zero, defaults to DefaultMaxDiffSize (10 MB). Set to any negative value to disable the limit.
|
||||
//
|
||||
// This field must be configured before the first request is made.
|
||||
// Modifying it while requests are in flight is not safe.
|
||||
MaxDiffSize int64
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user