blog_backend_api/test/git_test.go

24 lines
360 B
Go

package test
import (
"log"
"testing"
"github.com/sergi/go-diff/diffmatchpatch"
)
const (
text1 = "Lorem ipsum dolor."
text2 = "Lorem dolor sit amet. sdfsdfsd"
)
func TestDiff(t *testing.T) {
dmp := diffmatchpatch.New()
diffs := dmp.DiffMain(text1, text2, false)
log.Print(diffs)
prettydiff := dmp.DiffPrettyText(diffs)
log.Print(prettydiff)
}