Replace fiber with net.http.ServeMux (#23)

This commit is contained in:
T. von Dein
2025-12-23 14:38:45 +01:00
parent 5a705b0af0
commit 3b37a67e02
10 changed files with 306 additions and 183 deletions

View File

@@ -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 {