(schema map[string]any)
| 297 | } |
| 298 | |
| 299 | func schemaKeys(schema map[string]any) string { |
| 300 | if schema == nil { |
| 301 | return "(none)" |
| 302 | } |
| 303 | props, ok := schema["properties"].(map[string]any) |
| 304 | if !ok { |
| 305 | return fmt.Sprintf("(%d keys)", len(schema)) |
| 306 | } |
| 307 | names := make([]string, 0, len(props)) |
| 308 | for k := range props { |
| 309 | names = append(names, k) |
| 310 | } |
| 311 | if len(names) > 5 { |
| 312 | return strings.Join(names[:5], ", ") + fmt.Sprintf(" (+%d)", len(names)-5) |
| 313 | } |
| 314 | return strings.Join(names, ", ") |
| 315 | } |
| 316 | |
| 317 | // interactiveReadLine uses a temporary readline instance for a single prompt |
| 318 | // (used inside interactive add/delete flows). |
no outgoing calls
no test coverage detected