1
0
Fork 0

feat: initial release

This commit is contained in:
Arthur K. 2026-01-17 18:14:50 +03:00
parent a3cf21f5bd
commit 761174d035
Signed by: wzray
GPG key ID: B97F30FDC4636357
41 changed files with 2008 additions and 217 deletions

View file

@ -0,0 +1,23 @@
package server
import (
"encoding/json"
"fmt"
"git.wzray.com/homelab/mastermind/internal/types"
)
func fail(format string, a ...any) []byte {
r, _ := json.Marshal(types.Response[string]{
Ok: false,
Err: fmt.Sprintf(format, a...),
})
return r
}
func ok[T any](data T) ([]byte, error) {
return json.Marshal(types.Response[T]{
Ok: true,
Data: data,
})
}