Resolve the gateway name to a [`GatewayContext`] with the gateway endpoint. Resolution priority: 1. `--gateway-endpoint` flag (direct URL, preserving metadata when available) 2. `--gateway` flag (explicit name) 3. `OPENSHELL_GATEWAY` environment variable 4. Active gateway from `~/.config/openshell/active_gateway` When `--gateway-endpoint` is provided, it is used directly as the endpoint. If stor
(endpoint: &str)
| 56 | /// If stored metadata can still identify the gateway, the stored gateway name |
| 57 | /// is preserved so auth and TLS materials continue to resolve correctly. |
| 58 | fn normalize_gateway_endpoint(endpoint: &str) -> &str { |
| 59 | endpoint.trim_end_matches('/') |
| 60 | } |
| 61 | |
| 62 | fn find_gateway_by_endpoint(endpoint: &str) -> Option<String> { |
| 63 | let endpoint = normalize_gateway_endpoint(endpoint); |
no outgoing calls
no test coverage detected