pub fn extract_domain(host: &str) -> &strExpand description
Extract domain name (without port) from a host string
ยงExamples
use nginx_lint_plugin::helpers::extract_domain;
assert_eq!(extract_domain("example.com"), "example.com");
assert_eq!(extract_domain("example.com:8080"), "example.com");
assert_eq!(extract_domain("localhost:3000"), "localhost");