testmark-go

accept a simplification suggestion from linters

commit ebe39fc1c67be8cd042ff88e0443bc8a0ba824b7 · parent 00b11e2440 · browse this tree
Eric Myhre, 2023-05-01 10:40:58 UTC

diff --git a/patch.go b/patch.go
index 014dc1b..84f1798 100644
--- a/patch.go
+++ b/patch.go
@@ -103,7 +103,7 @@ func Patch(oldDoc *Document, hunks ...Hunk) (newDoc *Document) {
 }
 
 func appendHunkLines(lines [][]byte, hunkName string, hunkBlockTag string, hunkBodyLines [][]byte) [][]byte {
-	lines = append(lines, bytes.Join([][]byte{sigilTestmark, []byte{'('}, []byte(hunkName), []byte{')'}}, nil))
+	lines = append(lines, bytes.Join([][]byte{sigilTestmark, {'('}, []byte(hunkName), {')'}}, nil))
 	lines = append(lines, bytes.Join([][]byte{sigilCodeBlock, []byte(hunkBlockTag)}, nil))
 	lines = append(lines, hunkBodyLines...)
 	lines = append(lines, sigilCodeBlock)