Better convention for safe template types

This commit is contained in:
Svilen Markov
2024-12-16 13:58:58 +00:00
parent 80a957bc5b
commit ae1fb05607
4 changed files with 10 additions and 9 deletions

View File

@@ -2,7 +2,6 @@ package glance
import (
"fmt"
"html/template"
"os"
"regexp"
"strconv"
@@ -30,10 +29,6 @@ func (c *hslColorField) String() string {
return fmt.Sprintf("hsl(%d, %d%%, %d%%)", c.Hue, c.Saturation, c.Lightness)
}
func (c *hslColorField) AsCSSValue() template.CSS {
return template.CSS(c.String())
}
func (c *hslColorField) UnmarshalYAML(node *yaml.Node) error {
var value string