mirror of
https://github.com/harness/drone.git
synced 2025-05-13 23:50:47 +08:00
Fix linter issues in cutLinesFromFullFileDiff (#1021)
This commit is contained in:
parent
f63b493870
commit
eaad15d210
@ -76,6 +76,8 @@ func modifyHeader(hunk types.HunkHeader, startLine, endLine int) []byte {
|
|||||||
// cutLinesFromFullFileDiff reads from r and writes to w headers and between
|
// cutLinesFromFullFileDiff reads from r and writes to w headers and between
|
||||||
// startLine and endLine. if startLine and endLine is equal to 0 then it uses io.Copy
|
// startLine and endLine. if startLine and endLine is equal to 0 then it uses io.Copy
|
||||||
// warning: changes are possible and param endLine may not exist in the future
|
// warning: changes are possible and param endLine may not exist in the future
|
||||||
|
//
|
||||||
|
//nolint:gocognit
|
||||||
func cutLinesFromFullFileDiff(w io.Writer, r io.Reader, startLine, endLine int) error {
|
func cutLinesFromFullFileDiff(w io.Writer, r io.Reader, startLine, endLine int) error {
|
||||||
if startLine < 0 {
|
if startLine < 0 {
|
||||||
startLine = 0
|
startLine = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user