1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
This commit is contained in:
Zack Scholl 2016-02-10 15:16:29 -05:00
parent 7922544b18
commit 01b8faa71b

View File

@ -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 := ""