(_ context.Context, mcpServerName string, config any)
| 91 | } |
| 92 | |
| 93 | func writeConfigToFile(_ context.Context, mcpServerName string, config any) (string, error) { |
| 94 | buf, err := yaml.Marshal(map[string]any{ |
| 95 | mcpServerName: config, |
| 96 | }) |
| 97 | if err != nil { |
| 98 | return "", err |
| 99 | } |
| 100 | |
| 101 | return writeTempFile("mcp-config-*", buf) |
| 102 | } |
| 103 | |
| 104 | func writeTempFile(nameTemplate string, content []byte) (string, error) { |
| 105 | f, err := os.CreateTemp("", nameTemplate) |
no test coverage detected