Use go embed to load queries from static files (#607)

This commit is contained in:
Dan Sosedoff
2022-12-06 17:41:46 -06:00
committed by GitHub
parent f4b3091666
commit f48cc5f007
15 changed files with 247 additions and 243 deletions

View File

@@ -74,6 +74,8 @@ func (res *Result) PostProcess() {
res.Rows[i][j] = encodeBinaryData([]byte(val), BinaryCodec)
}
case time.Time:
// RFC 3339 is clear that years are 4 digits exactly.
// See golang.org/issue/4556#c15 for more discussion.
if val.Year() < 0 || val.Year() >= 10000 {
res.Rows[i][j] = "ERR: INVALID_DATE"
} else {