Files
inventory-plus-plus/server/ui/svg/points.go
T
angel fb2f4255f4
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Tests / Go tests (push) Failing after 15s
prototyped svg reports
2026-08-20 00:23:54 -06:00

27 lines
370 B
Go

package svg
import (
"fmt"
"strings"
)
type (
Points []Point
Point struct {
X float64
Y float64
}
)
func (Points) PrintKey() string {
return "points"
}
func (ps Points) PrintValue() (string, bool) {
ss := make([]string, len(ps))
for i, p := range ps {
ss[i] = fmt.Sprintf("%v,%v", p.X, p.Y)
}
return fmt.Sprintf("%q", strings.Join(ss, " ")), true
}