add comments to satisfy gofmt

This commit is contained in:
Adrian 2017-10-01 01:40:19 +08:00
parent 09a0c5f1bb
commit 81267b9903

View File

@ -56,17 +56,19 @@ func (h *Hstore) Scan(value interface{}) error {
return nil
}
// for Postgresql's JSONB data type
// Jsonb Postgresql's JSONB data type
type Jsonb struct {
json.RawMessage
}
// Value get value of Jsonb
func (j Jsonb) Value() (driver.Value, error) {
return j.MarshalJSON()
}
// Scan scan value into Jsonb
func (j *Jsonb) Scan(value interface{}) error {
bytes, ok := value.([]byte);
bytes, ok := value.([]byte)
if !ok {
return errors.New(fmt.Sprint("Failed to unmarshal JSONB value:", value))
}