Apply linter autofixes: internal/storage, types, ui (refs #61)

This commit is contained in:
2026-08-07 16:53:23 +00:00
parent 1e05fa0dd7
commit 0296e26210
8 changed files with 106 additions and 15 deletions

View File

@@ -24,6 +24,7 @@ func ParseFileID(s string) (FileID, error) {
if err != nil {
return FileID{}, err
}
return FileID(id), nil
}
@@ -38,13 +39,15 @@ func (id FileID) Value() (driver.Value, error) {
}
// Scan implements sql.Scanner for database deserialization.
func (id *FileID) Scan(src interface{}) error {
func (id *FileID) Scan(src any) error {
if src == nil {
*id = FileID{}
return nil
}
var s string
switch v := src.(type) {
case string:
s = v
@@ -58,7 +61,9 @@ func (id *FileID) Scan(src interface{}) error {
if err != nil {
return fmt.Errorf("invalid FileID: %w", err)
}
*id = FileID(parsed)
return nil
}
@@ -77,6 +82,7 @@ func ParseBlobID(s string) (BlobID, error) {
if err != nil {
return BlobID{}, err
}
return BlobID(id), nil
}
@@ -91,13 +97,15 @@ func (id BlobID) Value() (driver.Value, error) {
}
// Scan implements sql.Scanner for database deserialization.
func (id *BlobID) Scan(src interface{}) error {
func (id *BlobID) Scan(src any) error {
if src == nil {
*id = BlobID{}
return nil
}
var s string
switch v := src.(type) {
case string:
s = v
@@ -111,7 +119,9 @@ func (id *BlobID) Scan(src interface{}) error {
if err != nil {
return fmt.Errorf("invalid BlobID: %w", err)
}
*id = BlobID(parsed)
return nil
}