[CHORE] Remove println

- It's not recommended to use it per the documentation: https://pkg.go.dev/builtin#println.
This commit is contained in:
Gusted 2024-04-12 13:36:31 +02:00
parent c3aed7cb69
commit 706846b628
No known key found for this signature in database
GPG key ID: FD821B732837125F
4 changed files with 9 additions and 24 deletions

View file

@ -159,22 +159,6 @@ func BenchmarkCutDiffAroundLine(b *testing.B) {
}
}
func ExampleCutDiffAroundLine() {
const diff = `diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
# gitea-github-migrator
+
+ Build Status
- Latest Release
Docker Pulls
+ cut off
+ cut off`
result, _ := CutDiffAroundLine(strings.NewReader(diff), 4, false, 3)
println(result)
}
func TestParseDiffHunkString(t *testing.T) {
leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString("@@ -19,3 +19,5 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER")
assert.EqualValues(t, 19, leftLine)