add comments to satisfy gofmt
This commit is contained in:
parent
09a0c5f1bb
commit
81267b9903
@ -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))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user