Build and publish / Test and build (darwin) (push) Failing after 1m42s
Build and publish / Test and build (linux) (push) Failing after 1m53s
Build and publish / Test and build (windows) (push) Failing after 2m50s
Build and publish / Build and publish Docker image (push) Skipped
Go rewrite of the Python Emby.MCP server with tool parity (20 tools), plus a streamable-HTTP transport with per-request Emby authentication (Basic / Bearer token passthrough), a multi-arch Docker build, and a Gitea CI workflow.
26 lines
728 B
Go
26 lines
728 B
Go
// Package textutil provides Unicode-aware text folding used for lyrics and
|
|
// user-name matching, mirroring Python's unidecode(s).casefold().
|
|
package textutil
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/rainycape/unidecode"
|
|
)
|
|
|
|
// Fold converts s to a lower-cased ASCII approximation, equivalent to
|
|
// Python's unidecode(s.casefold()).
|
|
func Fold(s string) string {
|
|
return unidecode.Unidecode(strings.ToLower(s))
|
|
}
|
|
|
|
// ContainsFold reports whether haystack contains needle after folding both.
|
|
func ContainsFold(haystack, needle string) bool {
|
|
return strings.Contains(Fold(haystack), Fold(needle))
|
|
}
|
|
|
|
// EqualFoldASCII reports whether a and b are equal after folding.
|
|
func EqualFoldASCII(a, b string) bool {
|
|
return Fold(a) == Fold(b)
|
|
}
|