[Groonga-commit] groonga/grnci at 12804f6 [master] Fix a bug that DB.ColumnList returns an unexpected error.

Back to archive index

Susumu Yata null+****@clear*****
Fri Jul 7 11:35:33 JST 2017


Susumu Yata	2017-07-07 11:35:33 +0900 (Fri, 07 Jul 2017)

  New Revision: 12804f6044923503c39677d2683de522a6b54fcf
  https://github.com/groonga/grnci/commit/12804f6044923503c39677d2683de522a6b54fcf

  Message:
    Fix a bug that DB.ColumnList returns an unexpected error.

  Modified files:
    v2/db.go

  Modified: v2/db.go (+3 -0)
===================================================================
--- v2/db.go    2017-07-07 11:35:07 +0900 (d36acb6)
+++ v2/db.go    2017-07-07 11:35:33 +0900 (a1c7fb0)
@@ -183,6 +183,9 @@ func (db *DB) ColumnList(tbl string) ([]DBColumn, Response, error) {
 	if err != nil {
 		return nil, resp, err
 	}
+	if len(jsonData) == 0 {
+		return nil, resp, nil
+	}
 	var result [][]interface{}
 	if err := json.Unmarshal(jsonData, &result); err != nil {
 		return nil, resp, NewError(InvalidResponse, map[string]interface{}{
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index