This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
packagegopostgres
import(
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
)
typeJSONjson.RawMessage
// Scan 实现 sql.Scanner 接口,Scan 将 value 扫描至 Jsonb
func(j*JSON)Scan(valueinterface{})error{
bytes,ok:=value.([]byte)
if!ok{
returnerrors.New(fmt.Sprint("Failed to unmarshal JSONB value:",value))