deal with fact split gives us empty strings
Ted Unangst tedu@tedunangst.com
Fri, 30 Aug 2019 01:08:15 -0400
1 files changed,
9 insertions(+),
3 deletions(-)
jump to
M
honk.go
→
honk.go
@@ -847,7 +847,9 @@ }
h.Date, _ = time.Parse(dbtimeformat, dt) h.Audience = strings.Split(aud, " ") h.Public = !keepitquiet(h.Audience) - h.Onts = strings.Split(onts, " ") + if len(onts) > 0 { + h.Onts = strings.Split(onts, " ") + } return h }@@ -866,7 +868,9 @@ }
h.Date, _ = time.Parse(dbtimeformat, dt) h.Audience = strings.Split(aud, " ") h.Public = !keepitquiet(h.Audience) - h.Onts = strings.Split(onts, " ") + if len(onts) > 0 { + h.Onts = strings.Split(onts, " ") + } return h }@@ -940,7 +944,9 @@ }
h.Date, _ = time.Parse(dbtimeformat, dt) h.Audience = strings.Split(aud, " ") h.Public = !keepitquiet(h.Audience) - h.Onts = strings.Split(onts, " ") + if len(onts) > 0 { + h.Onts = strings.Split(onts, " ") + } honks = append(honks, &h) } rows.Close()