1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2026-06-11 22:04:13 +02:00
Files
2026-05-13 18:48:55 +03:00

19 lines
440 B
Go

package format
import (
"fmt"
"strings"
"github.com/imgproxy/imgproxy/v4/errctx"
)
// FormatSegmentName formats segment name string
func FormatSegmentName(name string) string {
return strings.ReplaceAll(strings.ToLower(name), " ", "_")
}
// FormatErrType formats error type string with error concrete type
func FormatErrType(errType string, err error) string {
return fmt.Sprintf("%s_error (%s)", errType, errctx.ErrorType(err))
}