Merge branch 'master' of https://gitee.com/290198252/background into master
This commit is contained in:
commit
32bc2f6c5e
23
test/git_test.go
Normal file
23
test/git_test.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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)
|
||||||
|
}
|
@ -8,6 +8,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitConfig() {
|
func InitConfig() {
|
||||||
e := config.Init("user.yaml")
|
e := config.Init("user.yaml")
|
||||||
if nil != e {
|
if nil != e {
|
||||||
|
Loading…
Reference in New Issue
Block a user