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

Method Scan

coderd/database/models.go:3346–3356  ·  view source on GitHub ↗
(src interface{})

Source from the content-addressed store, hash-verified

3344)
3345
3346func (e *ResourceType) Scan(src interface{}) error {
3347 switch s := src.(type) {
3348 case []byte:
3349 *e = ResourceType(s)
3350 case string:
3351 *e = ResourceType(s)
3352 default:
3353 return fmt.Errorf("unsupported scan type for ResourceType: %T", src)
3354 }
3355 return nil
3356}
3357
3358type NullResourceType struct {
3359 ResourceType ResourceType `json:"resource_type"`

Callers

nothing calls this directly

Calls 2

ResourceTypeTypeAlias · 0.70
ErrorfMethod · 0.45

Tested by

no test coverage detected