prototyped svg reports
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
2026-08-19 23:19:41 -06:00
parent 00eed86bb2
commit 82efe19ae0
106 changed files with 5450 additions and 46 deletions
+29
View File
@@ -0,0 +1,29 @@
package svg
import (
"fmt"
"html"
"maps"
"slices"
"strings"
)
type (
Style map[string]string
)
func (m Style) PrintKey() string {
return "style"
}
func (m Style) PrintValue() (string, bool) {
keys := slices.Collect(maps.Keys(m))
slices.Sort(keys)
parts := make([]string, len(m))
for i, k := range keys {
parts[i] = fmt.Sprintf(`%s: %s`, k, html.EscapeString(m[k]))
}
return fmt.Sprintf("%q", strings.Join(parts, "; ")), true
}