mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 20:55:42 +00:00
20 lines
326 B
Go
20 lines
326 B
Go
package decoders
|
|
|
|
import (
|
|
"tinyauth/internal/config"
|
|
|
|
"github.com/traefik/paerser/parser"
|
|
)
|
|
|
|
func DecodeLabels(labels map[string]string) (config.Labels, error) {
|
|
var appLabels config.Labels
|
|
|
|
err := parser.Decode(labels, &appLabels, "tinyauth")
|
|
|
|
if err != nil {
|
|
return config.Labels{}, err
|
|
}
|
|
|
|
return appLabels, nil
|
|
}
|