1.Scan error on column index 4: converting string "" to a int: strconv.ParseInt: parsing "": invalid syntax。这是由于使用MySQL go 驱动时,对应表字段int 为空时(未填值),Scan(&intVal)时(intVal 为int类型)时会报此错。另go转换index 从0开始。2. range 使用时,注意使用的是值拷贝。 pictures := make([]Picture, 8) for index,picture := rang Read More
posted @ 2014-03-11 21:59 lingjip Views(649) Comments(0) Diggs(0) Edit