mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Updated
Former-commit-id: 4ed39377abc09b46081e0abe0ebf12b44599bf8d [formerly 1b1eea480288850f56e644fa6eb426516d8df6ca] [formerly 8ece3e976a0e4f7c7cb06891de2cd53df430996c [formerly 01b8faa71b
]]
Former-commit-id: bd29761bf5ea90bb5eaaf183600b5ef545588db4 [formerly 2cf32e2ef1ee89c3cb8fb0add85e2e2ed480c9c0]
Former-commit-id: f4b08e349584affb7c41cd00fa7427f2d2919982
This commit is contained in:
parent
07f0143143
commit
ec20eef484
9
utils.go
9
utils.go
@ -1,8 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
@ -146,7 +144,7 @@ func getImportantVersions(p WikiData) []versionsInfo {
|
|||||||
for _, k := range a {
|
for _, k := range a {
|
||||||
for _, s := range n[k] {
|
for _, s := range n[k] {
|
||||||
if s != 0 && s != len(n) {
|
if s != 0 && s != len(n) {
|
||||||
fmt.Printf("%d, %d\n", s, k)
|
// fmt.Printf("%d, %d\n", s, k)
|
||||||
importantVersions = append(importantVersions, s)
|
importantVersions = append(importantVersions, s)
|
||||||
if len(importantVersions) > 10 {
|
if len(importantVersions) > 10 {
|
||||||
sort.Ints(importantVersions)
|
sort.Ints(importantVersions)
|
||||||
@ -165,11 +163,6 @@ func getImportantVersions(p WikiData) []versionsInfo {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
func timeTrack(start time.Time, name string) {
|
|
||||||
elapsed := time.Since(start)
|
|
||||||
log.Printf("%s took %s", name, elapsed)
|
|
||||||
}
|
|
||||||
|
|
||||||
func rebuildTextsToDiffN(p WikiData, n int) string {
|
func rebuildTextsToDiffN(p WikiData, n int) string {
|
||||||
dmp := diffmatchpatch.New()
|
dmp := diffmatchpatch.New()
|
||||||
lastText := ""
|
lastText := ""
|
||||||
|
Loading…
Reference in New Issue
Block a user