Browse Source

update error messages

pull/639/head
aler9 4 years ago committed by Alessandro Ros
parent
commit
b748e6d0ff
  1. 2
      internal/conf/authmethod.go
  2. 2
      internal/conf/encryption.go
  3. 2
      internal/conf/logdestination.go
  4. 2
      internal/conf/loglevel.go
  5. 2
      internal/conf/protocol.go
  6. 2
      internal/conf/sourceprotocol.go

2
internal/conf/authmethod.go

@ -43,7 +43,7 @@ func (d *AuthMethods) UnmarshalJSON(b []byte) error { @@ -43,7 +43,7 @@ func (d *AuthMethods) UnmarshalJSON(b []byte) error {
*d = append(*d, headers.AuthDigest)
default:
return fmt.Errorf("unsupported authentication method: %s", in)
return fmt.Errorf("invalid authentication method: %s", in)
}
}

2
internal/conf/encryption.go

@ -51,7 +51,7 @@ func (d *Encryption) UnmarshalJSON(b []byte) error { @@ -51,7 +51,7 @@ func (d *Encryption) UnmarshalJSON(b []byte) error {
*d = EncryptionStrict
default:
return fmt.Errorf("unsupported encryption value: '%s'", in)
return fmt.Errorf("invalid encryption value: '%s'", in)
}
return nil

2
internal/conf/logdestination.go

@ -57,7 +57,7 @@ func (d *LogDestinations) UnmarshalJSON(b []byte) error { @@ -57,7 +57,7 @@ func (d *LogDestinations) UnmarshalJSON(b []byte) error {
(*d)[logger.DestinationSyslog] = struct{}{}
default:
return fmt.Errorf("unsupported log destination: %s", proto)
return fmt.Errorf("invalid log destination: %s", proto)
}
}

2
internal/conf/loglevel.go

@ -46,7 +46,7 @@ func (d *LogLevel) UnmarshalJSON(b []byte) error { @@ -46,7 +46,7 @@ func (d *LogLevel) UnmarshalJSON(b []byte) error {
*d = LogLevel(logger.Debug)
default:
return fmt.Errorf("unsupported log level: %s", in)
return fmt.Errorf("invalid log level: %s", in)
}
return nil

2
internal/conf/protocol.go

@ -63,7 +63,7 @@ func (d *Protocols) UnmarshalJSON(b []byte) error { @@ -63,7 +63,7 @@ func (d *Protocols) UnmarshalJSON(b []byte) error {
(*d)[ProtocolTCP] = struct{}{}
default:
return fmt.Errorf("unsupported protocol: %s", proto)
return fmt.Errorf("invalid protocol: %s", proto)
}
}

2
internal/conf/sourceprotocol.go

@ -57,7 +57,7 @@ func (d *SourceProtocol) UnmarshalJSON(b []byte) error { @@ -57,7 +57,7 @@ func (d *SourceProtocol) UnmarshalJSON(b []byte) error {
case "automatic":
default:
return fmt.Errorf("unsupported protocol '%s'", in)
return fmt.Errorf("invalid protocol '%s'", in)
}
return nil

Loading…
Cancel
Save