chore: use json logger

This commit is contained in:
2026-03-09 09:23:31 +01:00
parent bc900e1450
commit a27b4a66e6
6 changed files with 31 additions and 11 deletions
+12 -7
View File
@@ -57,12 +57,17 @@ func PathFromUID(uid string) (string, error) {
func SourceSet(src string) string {
sb := strings.Builder{}
for i := range 19 {
sb.WriteString(fmt.Sprintf("%s?w=%d %dw, ", src, 100*(i+1), 100*(i+1)))
const steps = 300
const max = 1500
i := 1
for {
width := i * steps
sb.WriteString(fmt.Sprintf("%s?w=%d %dw, ", src, width, width))
if width >= max {
return sb.String()
}
sb.WriteRune(',')
i++
}
i := 20
sb.WriteString(fmt.Sprintf("%s?w=%d %dw", src, 100*(i+1), 100*(i+1)))
return sb.String()
}