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 return nil
} }
// for Postgresql's JSONB data type // Jsonb Postgresql's JSONB data type
type Jsonb struct { type Jsonb struct {
json.RawMessage json.RawMessage
} }
func (j Jsonb) Value() (driver.Value, error){ // Value get value of Jsonb
func (j Jsonb) Value() (driver.Value, error) {
return j.MarshalJSON() return j.MarshalJSON()
} }
func (j *Jsonb) Scan (value interface{}) error { // Scan scan value into Jsonb
bytes, ok := value.([]byte); func (j *Jsonb) Scan(value interface{}) error {
bytes, ok := value.([]byte)
if !ok { if !ok {
return errors.New(fmt.Sprint("Failed to unmarshal JSONB value:", value)) return errors.New(fmt.Sprint("Failed to unmarshal JSONB value:", value))
} }