MCPcopy Index your code
hub / github.com/coder/coder / Scan

Method Scan

coderd/database/types.go:180–194  ·  view source on GitHub ↗
(src interface{})

Source from the content-addressed store, hash-verified

178type StringMap map[string]string
179
180func (m *StringMap) Scan(src interface{}) error {
181 if src == nil {
182 return nil
183 }
184 switch src := src.(type) {
185 case []byte:
186 err := json.Unmarshal(src, m)
187 if err != nil {
188 return err
189 }
190 default:
191 return xerrors.Errorf("unsupported Scan, storing driver.Value type %T into type %T", src, m)
192 }
193 return nil
194}
195
196func (m StringMap) Value() (driver.Value, error) {
197 return json.Marshal(m)

Callers 1

chatFromAutoArchiveRowFunction · 0.95

Calls 2

UnmarshalMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected