소스 검색

修改bug

yjp 1 년 전
부모
커밋
212e352ee8
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      sql/parse_table_row.go

+ 4 - 1
sql/parse_table_row.go

@@ -190,7 +190,10 @@ func formOutputEntity(tableRow map[string]any, outputEntity any) error {
 					return errors.New("slice仅支持[]string")
 				}
 
-				strValue := tableRowValue.(string)
+				strValue, ok := tableRowValue.(string)
+				if !ok {
+					return errors.New("slice仅支持[]string")
+				}
 
 				strParts := strings.Split(strValue, element.SplitWith)
 				if strParts == nil || len(strParts) == 0 {