yamlNodeToValue converts a yaml.Node to a native Go value, preserving the original type (int, float, bool, null) instead of returning everything as a string.
(node *yaml.Node)
| 400 | // original type (int, float, bool, null) instead of returning everything as a |
| 401 | // string. |
| 402 | func yamlNodeToValue(node *yaml.Node) any { |
| 403 | var v any |
| 404 | if err := node.Decode(&v); err != nil { |
| 405 | return node.Value |
| 406 | } |
| 407 | return v |
| 408 | } |
| 409 | |
| 410 | // sanitizeToolName converts a string into a valid tool name. |
| 411 | func sanitizeToolName(name string) string { |
no outgoing calls
no test coverage detected