Clean code

This commit is contained in:
Zack Scholl 2017-03-24 07:24:36 -06:00
parent b489e299fe
commit 446c9cf2b4
1 changed files with 0 additions and 29 deletions

View File

@ -15,7 +15,6 @@ import (
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday"
"github.com/schollz/cryptopasta"
"github.com/sergi/go-diff/diffmatchpatch"
"github.com/shurcooL/github_flavored_markdown"
"golang.org/x/crypto/bcrypt"
)
@ -49,21 +48,6 @@ func randomAdjective() string {
func randomAlliterateCombo() (combo string) {
combo = ""
// // first determine which names are taken from program data
// takenNames := []string{}
// err := db.View(func(tx *bolt.Tx) error {
// // Assume bucket exists and has keys
// b := tx.Bucket([]byte("programdata"))
// c := b.Cursor()
// for k, v := c.First(); k != nil; k, v = c.Next() {
// takenNames = append(takenNames, strings.ToLower(string(v)))
// }
// return nil
// })
// if err != nil {
// panic(err)
// }
// fmt.Println(takenNames)
// generate random alliteration thats not been used
for {
animal := randomAnimal()
@ -107,19 +91,6 @@ func contentType(filename string) string {
return "text/html"
}
func diffRebuildtexts(diffs []diffmatchpatch.Diff) []string {
text := []string{"", ""}
for _, myDiff := range diffs {
if myDiff.Type != diffmatchpatch.DiffInsert {
text[0] += myDiff.Text
}
if myDiff.Type != diffmatchpatch.DiffDelete {
text[1] += myDiff.Text
}
}
return text
}
func timeTrack(start time.Time, name string) {
elapsed := time.Since(start)
log.Debug("%s took %s", name, elapsed)