Merge pull request '[CHORE] Remove println' (#3185) from gusted/forgejo-println into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3185
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Gusted 2024-04-12 12:35:38 +00:00
commit 0c42e3c755
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)