Refactor everything that's used all over into a common/ package and sync files from static/ into public/ so that public's not in the git.
This commit is contained in:
parent
d12817f4cc
commit
ec7298cce0
36 changed files with 112 additions and 902 deletions
12
common/errors.go
Normal file
12
common/errors.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package common
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func Fail(err error, format string, v ...any) error {
|
||||
err_format := fmt.Sprintf("ERROR: %v; %s", err, format)
|
||||
log.Printf(err_format, v...)
|
||||
return err
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue