Usage of both value and pointer receivers GO-W1029
Anti-pattern
Major
3 occurrences in this check
Type "RedactInfoLogType" has both value and pointer receivers
147}
148
149// UnmarshalTOML implements the `toml.Unmarshaler` interface to ensure the compatibility.
150func (t *RedactInfoLogType) UnmarshalTOML(data any) error {151	switch v := data.(type) {
152	case bool:
153		if v {
Type "RedactInfoLogType" has both value and pointer receivers
121const invalidRedactInfoLogTypeErrMsg = `the "redact-info-log" value is invalid; it should be either false, true, or "MARK"`
122
123// UnmarshalJSON implements the `json.Marshaler` interface	to ensure the compatibility.
124func (t *RedactInfoLogType) UnmarshalJSON(data []byte) error {125	var s string
126	if err := json.Unmarshal(data, &s); err == nil {
127		switch strings.ToUpper(s) {
Type "RedactInfoLogType" has both value and pointer receivers
107)
108
109// MarshalJSON implements the `json.Marshaler` interface to ensure the compatibility.
110func (t RedactInfoLogType) MarshalJSON() ([]byte, error) {111	switch t {
112	case RedactInfoLogON:
113		return json.Marshal(true)