From 0a9bd64bf614cb82659c0dfb3e5822c137eedcb9 Mon Sep 17 00:00:00 2001 From: Yen-Cheng Chou <3055688+StevenYCChou@users.noreply.github.com> Date: Fri, 14 Oct 2022 14:33:44 -0400 Subject: [PATCH] Fix bug for TLSVersion.MarshalYAML Signed-off-by: Yen-Cheng Chou <3055688+StevenYCChou@users.noreply.github.com> --- config/http_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/http_config.go b/config/http_config.go index c771b2ef..419fc1a5 100644 --- a/config/http_config.go +++ b/config/http_config.go @@ -106,7 +106,7 @@ func (tv *TLSVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaler interface for TLSVersion. func (tv *TLSVersion) MarshalJSON() ([]byte, error) { - if tv != nil || *tv == 0 { + if tv == nil || *tv == 0 { return []byte("null"), nil } for s, v := range TLSVersions {