all repos — honk @ 04c12c4c221ca70ed9e197966cb0b3f3ef9b9403

my fork of honk

sort the zonkzone
Ted Unangst tedu@tedunangst.com
Sun, 16 Jun 2019 14:41:47 -0400
commit

04c12c4c221ca70ed9e197966cb0b3f3ef9b9403

parent

f1504e795c65fdaa724445e9ec793962975c224b

1 files changed, 15 insertions(+), 0 deletions(-)

jump to
M honk.gohonk.go

@@ -1112,6 +1112,21 @@ var z Zonker

rows.Scan(&z.ID, &z.Name, &z.Wherefore) zonkers = append(zonkers, z) } + sort.Slice(zonkers, func (i, j int) bool { + w1 := zonkers[i].Wherefore + w2 := zonkers[j].Wherefore + if w1 == w2 { + return zonkers[i].Name < zonkers[j].Name + } + if w1 == "zonvoy" { + w1 = "zzzzzzz" + } + if w2 == "zonvoy" { + w2 = "zzzzzzz" + } + return w1 < w2 + }) + templinfo := getInfo(r) templinfo["Zonkers"] = zonkers templinfo["ZonkCSRF"] = login.GetCSRF("zonkzonk", r)