all repos — honk @ f75b4a2427a12311d530a24c3e705f09ae607eea

my fork of honk

don't embed emus that don't exist
Ted Unangst tedu@tedunangst.com
Sun, 07 Jul 2019 20:07:16 -0400
commit

f75b4a2427a12311d530a24c3e705f09ae607eea

parent

fab4b482f1bb058bee6f092b094287b2551d0809

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

jump to
M fun.gofun.go

@@ -193,6 +193,10 @@ m = oneofakind(m)

var emus []Emu for _, e := range m { fname := e[1 : len(e)-1] + _, err := os.Stat("emus/" + fname + ".png") + if err != nil { + continue + } url := fmt.Sprintf("https://%s/emu/%s.png", serverName, fname) emus = append(emus, Emu{ID: url, Name: e}) }