[Groonga-commit] groonga/grngo at a0de747 [master] Remove gnx.go.

Back to archive index

susumu.yata null+****@clear*****
Fri Jun 19 15:20:25 JST 2015


susumu.yata	2015-06-19 15:20:25 +0900 (Fri, 19 Jun 2015)

  New Revision: a0de747f8fe1af16f7eb565cf0f6456c34e9ed67
  https://github.com/groonga/grngo/commit/a0de747f8fe1af16f7eb565cf0f6456c34e9ed67

  Message:
    Remove gnx.go.
    
    GitHub: #1

  Removed files:
    gnx.go
  Modified files:
    grn.go

  Deleted: gnx.go (+0 -87) 100644
===================================================================
--- gnx.go    2015-06-19 14:46:55 +0900 (bc7b068)
+++ /dev/null
@@ -1,87 +0,0 @@
-package gnx
-
-/*
-#cgo pkg-config: groonga
-*/
-import "C"
-
-import (
-	"fmt"
-	"math"
-)
-
-// -- Data types --
-
-type Bool uint8
-type Int int64
-type Float float64
-type GeoPoint struct{ Latitude, Longitude int32 }
-type Text []byte
-
-//type BoolVector []Bool
-//type IntVector []Int
-//type FloatVector []Float
-//type GeoPointVector []GeoPoint
-//type TextVector []Text
-
-const (
-	True  = Bool(3)
-	False = Bool(0)
-)
-
-func NullBool() Bool         { return Bool(1) }
-func NullInt() Int           { return Int(math.MinInt64) }
-func NullFloat() Float       { return Float(math.NaN()) }
-func NullGeoPoint() GeoPoint { return GeoPoint{math.MinInt32, math.MinInt32} }
-func NullText() Text         { return nil }
-
-//func NullBoolVector() BoolVector         { return nil }
-//func NullIntVector() IntVector           { return nil }
-//func NullFloatVector() FloatVector       { return nil }
-//func NullGeoPointVector() GeoPointVector { return nil }
-//func NullTextVector() TextVector         { return nil }
-
-type TypeID int
-
-const (
-	VoidID = TypeID(iota)
-	BoolID
-	IntID
-	FloatID
-	GeoPointID
-	TextID
-//	BoolVectorID
-//	IntVectorID
-//	FloatVectorID
-//	GeoPointVectorID
-//	TextVectorID
-)
-
-func (id TypeID) String() string {
-	switch id {
-	case VoidID:
-		return "Void"
-	case BoolID:
-		return "Bool"
-	case IntID:
-		return "Int"
-	case FloatID:
-		return "Float"
-	case GeoPointID:
-		return "GeoPoint"
-	case TextID:
-		return "Text"
-//	case BoolVectorID:
-//		return "BoolVector"
-//	case IntVectorID:
-//		return "IntVector"
-//	case FloatVectorID:
-//		return "FloatVector"
-//	case GeoPointVectorID:
-//		return "GeoPointVector"
-//	case TextVectorID:
-//		return "TextVector"
-	default:
-		return fmt.Sprintf("TypeID(%d)", id)
-	}
-}

  Modified: grn.go (+56 -0)
===================================================================
--- grn.go    2015-06-19 14:46:55 +0900 (ffd0170)
+++ grn.go    2015-06-19 15:20:25 +0900 (417aae6)
@@ -8,11 +8,67 @@ import "C"
 
 import (
 	"fmt"
+	"math"
 	"reflect"
 	"strings"
 	"unsafe"
 )
 
+// -- Data types --
+
+type Bool uint8
+type Int int64
+type Float float64
+type GeoPoint struct{ Latitude, Longitude int32 }
+type Text []byte
+
+//type BoolVector []Bool
+//type IntVector []Int
+//type FloatVector []Float
+//type GeoPointVector []GeoPoint
+//type TextVector []Text
+
+const (
+	True  = Bool(3)
+	False = Bool(0)
+)
+
+func NullBool() Bool         { return Bool(1) }
+func NullInt() Int           { return Int(math.MinInt64) }
+func NullFloat() Float       { return Float(math.NaN()) }
+func NullGeoPoint() GeoPoint { return GeoPoint{math.MinInt32, math.MinInt32} }
+func NullText() Text         { return nil }
+
+type TypeID int
+
+const (
+	VoidID = TypeID(iota)
+	BoolID
+	IntID
+	FloatID
+	GeoPointID
+	TextID
+)
+
+func (id TypeID) String() string {
+	switch id {
+	case VoidID:
+		return "Void"
+	case BoolID:
+		return "Bool"
+	case IntID:
+		return "Int"
+	case FloatID:
+		return "Float"
+	case GeoPointID:
+		return "GeoPoint"
+	case TextID:
+		return "Text"
+	default:
+		return fmt.Sprintf("TypeID(%d)", id)
+	}
+}
+
 // -- Groonga --
 
 // grnInitCount is a counter for automatically initializing and finalizing
-------------- next part --------------
HTML����������������������������...
Download 



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