Adds a POST /mcp endpoint (github.com/modelcontextprotocol/go-sdk) with
three tools mirroring the existing /calendar logic: get_calendar_today,
get_calendar_for_date and get_holidays. Bumps go.mod to Go 1.25 (required
by the SDK) and vendors the new dependencies. Also fixes an unanchored
.gitignore rule ("domogeek") that was silently excluding all untracked
files under cmd/domogeek/.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu8wwahgecuCGfesTKCfEd
19 lines
486 B
Go
19 lines
486 B
Go
package ascii
|
|
|
|
import "github.com/segmentio/asm/internal/unsafebytes"
|
|
|
|
// ValidPrint returns true if b contains only printable ASCII characters.
|
|
func ValidPrint(b []byte) bool {
|
|
return ValidPrintString(unsafebytes.String(b))
|
|
}
|
|
|
|
// ValidPrintBytes returns true if b is an ASCII character.
|
|
func ValidPrintByte(b byte) bool {
|
|
return 0x20 <= b && b <= 0x7e
|
|
}
|
|
|
|
// ValidPrintBytes returns true if b is an ASCII character.
|
|
func ValidPrintRune(r rune) bool {
|
|
return 0x20 <= r && r <= 0x7e
|
|
}
|