使用安全的 comma-ok 模式替代裸类型断言,避免 golangci-lint errcheck 报错。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>