diff --git a/source/common/formatter/substitution_format_utility.cc b/source/common/formatter/substitution_format_utility.cc index 931474572342..1ec0b15cae98 100644 --- a/source/common/formatter/substitution_format_utility.cc +++ b/source/common/formatter/substitution_format_utility.cc @@ -69,14 +69,6 @@ const absl::optional SubstitutionFormatUtils::getHostname() { return hostname; } -const std::string SubstitutionFormatUtils::getHostnameOrDefault() { - absl::optional hostname = getHostname(); - if (hostname.has_value()) { - return hostname.value(); - } - return DefaultUnspecifiedValueString; -} - const ProtobufWkt::Value& SubstitutionFormatUtils::unspecifiedValue() { return ValueUtil::nullValue(); } diff --git a/source/common/formatter/substitution_format_utility.h b/source/common/formatter/substitution_format_utility.h index 959f326ebab8..b1176f4d0760 100644 --- a/source/common/formatter/substitution_format_utility.h +++ b/source/common/formatter/substitution_format_utility.h @@ -40,7 +40,6 @@ class SubstitutionFormatUtils { static const std::string& protocolToStringOrDefault(const absl::optional& protocol); static const absl::optional getHostname(); - static const std::string getHostnameOrDefault(); /** * Unspecified value for protobuf.