Files
tinyauth/internal/utils/decoders/label_decoder.go
Stavros 061d28f5e3 refactor: use tinyauthapp/paerser instead of traefik/paerser (#781)
* refactor: use own paerser library instead of traefik

* chore: remove submodules from release images and workflows
2026-04-10 17:36:13 +03:00

18 lines
325 B
Go

package decoders
import (
"github.com/tinyauthapp/paerser/parser"
)
func DecodeLabels[T any](labels map[string]string, root string) (T, error) {
var labelsDecoded T
err := parser.Decode(labels, &labelsDecoded, "tinyauth", "tinyauth."+root)
if err != nil {
return labelsDecoded, err
}
return labelsDecoded, nil
}