Fix unmaarshal of double pointer (#47586)

* Fix unmaarshal of double pointer

* update sdk version
This commit is contained in:
ying-jeanne
2022-04-12 09:30:34 +02:00
committed by GitHub
parent 42431e6ad4
commit 0bf889e058
9 changed files with 20 additions and 15 deletions

View File

@@ -56,9 +56,9 @@ func (s Settings) Value() (driver.Value, error) {
func (s *Settings) Scan(value interface{}) error {
switch v := value.(type) {
case string:
return json.Unmarshal([]byte(v), &s)
return json.Unmarshal([]byte(v), s)
case []uint8:
return json.Unmarshal(v, &s)
return json.Unmarshal(v, s)
default:
return fmt.Errorf("type assertion on scan failed: got %T", value)
}