mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Updated
This commit is contained in:
parent
7922544b18
commit
01b8faa71b
9
utils.go
9
utils.go
@ -1,8 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
"sort"
|
||||
"strings"
|
||||
@ -146,7 +144,7 @@ func getImportantVersions(p WikiData) []versionsInfo {
|
||||
for _, k := range a {
|
||||
for _, s := range n[k] {
|
||||
if s != 0 && s != len(n) {
|
||||
fmt.Printf("%d, %d\n", s, k)
|
||||
// fmt.Printf("%d, %d\n", s, k)
|
||||
importantVersions = append(importantVersions, s)
|
||||
if len(importantVersions) > 10 {
|
||||
sort.Ints(importantVersions)
|
||||
@ -165,11 +163,6 @@ func getImportantVersions(p WikiData) []versionsInfo {
|
||||
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 {
|
||||
dmp := diffmatchpatch.New()
|
||||
lastText := ""
|
||||
|
Loading…
Reference in New Issue
Block a user