mirror of
https://codeberg.org/scip/anydb.git
synced 2026-02-04 09:20:58 +01:00
Replace fiber with net.http.ServeMux (#23)
This commit is contained in:
11
app/attr.go
11
app/attr.go
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright © 2024 Thomas von Dein
|
||||
Copyright © 2024-2025 Thomas von Dein
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -28,6 +28,7 @@ type DbAttr struct {
|
||||
Key string
|
||||
Preview string
|
||||
Val []byte
|
||||
Data string // alias
|
||||
Args []string
|
||||
Tags []string
|
||||
File string
|
||||
@@ -63,6 +64,12 @@ func (attr *DbAttr) ParseKV() error {
|
||||
}
|
||||
}
|
||||
|
||||
attr.SetPreview()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (attr *DbAttr) SetPreview() {
|
||||
switch {
|
||||
case attr.Binary:
|
||||
attr.Preview = "<binary-content>"
|
||||
@@ -82,8 +89,6 @@ func (attr *DbAttr) ParseKV() error {
|
||||
attr.Preview = string(attr.Val)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (attr *DbAttr) GetFileValue() error {
|
||||
|
||||
Reference in New Issue
Block a user