frameworkDisplayName returns a human-friendly display name for a framework key. It handles cases where the internal key (e.g. "vanilla-python") differs from the name a developer would expect to see (e.g. "Flask").
(framework string)
| 1373 | // It handles cases where the internal key (e.g. "vanilla-python") differs from the |
| 1374 | // name a developer would expect to see (e.g. "Flask"). |
| 1375 | func frameworkDisplayName(framework string) string { |
| 1376 | switch framework { |
| 1377 | case "vanilla-python": |
| 1378 | return "Flask" |
| 1379 | case "vanilla-go": |
| 1380 | return "Go" |
| 1381 | case "vanilla-php": |
| 1382 | return "PHP" |
| 1383 | case "vanilla-javascript": |
| 1384 | return "Vanilla JS" |
| 1385 | case "vanilla-java": |
| 1386 | return "Java" |
| 1387 | default: |
| 1388 | titleCaser := cases.Title(language.English) |
| 1389 | return titleCaser.String(framework) |
| 1390 | } |
| 1391 | } |
| 1392 | |
| 1393 | // defaultPortForFramework returns the conventional port for a given framework name. |
| 1394 | func defaultPortForFramework(framework string) int { |
no outgoing calls
no test coverage detected