MCPcopy
hub / github.com/filebrowser/filebrowser / Scan

Method Scan

http/preview_enum.go:76–95  ·  view source on GitHub ↗

Scan implements the Scanner interface.

(value interface{})

Source from the content-addressed store, hash-verified

74
75// Scan implements the Scanner interface.
76func (x *PreviewSize) Scan(value interface{}) error {
77 var name string
78
79 switch v := value.(type) {
80 case string:
81 name = v
82 case []byte:
83 name = string(v)
84 case nil:
85 *x = PreviewSize(0)
86 return nil
87 }
88
89 tmp, err := ParsePreviewSize(name)
90 if err != nil {
91 return err
92 }
93 *x = tmp
94 return nil
95}
96
97// Value implements the driver Valuer interface.
98func (x PreviewSize) Value() (driver.Value, error) {

Callers 1

commands.goFile · 0.45

Calls 2

PreviewSizeTypeAlias · 0.85
ParsePreviewSizeFunction · 0.85

Tested by

no test coverage detected