From 5017f785a27f039b3b62b85f326ca898ee95d722 Mon Sep 17 00:00:00 2001 From: Andreas Wagner Date: Fri, 20 May 2022 01:25:59 +0200 Subject: [PATCH] fix struct json tag fields --- connegmatcher.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/connegmatcher.go b/connegmatcher.go index 504f489..87e6efa 100644 --- a/connegmatcher.go +++ b/connegmatcher.go @@ -81,20 +81,20 @@ type MatchConneg struct { // Query string parameter key to override encoding negotiation. Default: "" ForceEncodingQueryString string `json:"force_encoding_query_string,omitempty"` // Variable name (will be prefixed with `conneg_`) to hold result of content negotiation. Default: "" - VarType string `json:"var_type, omitempty"` + VarType string `json:"var_type,omitempty"` // Variable name (will be prefixed with `conneg_`) to hold result of language negotiation. Default: "" - VarLanguage string `json:"var_language, omitempty"` + VarLanguage string `json:"var_language,omitempty"` // Variable name (will be prefixed with `conneg_`) to hold result of charset negotiation. Default: "" - VarCharset string `json:"var_charset, omitempty"` + VarCharset string `json:"var_charset,omitempty"` // Variable name (will be prefixed with `conneg_`) to hold result of encoding negotiation. Default: "" - VarEncoding string `json:"var_encoding, omitempty"` + VarEncoding string `json:"var_encoding,omitempty"` // the following fields are populated internally/computationally - MatchTTypes []contenttype.MediaType - MatchTLanguages []language.Tag - MatchTCharsets []CharsetOrEncoding - MatchTEncodings []CharsetOrEncoding - LanguageMatcher language.Matcher + MatchTTypes []contenttype.MediaType `json:"omitempty"` + MatchTLanguages []language.Tag `json:"omitempty"` + MatchTCharsets []CharsetOrEncoding `json:"omitempty"` + MatchTEncodings []CharsetOrEncoding `json:"omitempty"` + LanguageMatcher language.Matcher `json:"omitempty"` logger *zap.Logger }