mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
config: Check for duplicated entries in all scopes (#3872)
Validate Minio config by checking if there is double json key in any scope level. The returned error contains the json path to the duplicated key.
This commit is contained in:
committed by
Harshavardhana
parent
cad0d0eb7a
commit
ae4361cc45
@@ -48,6 +48,16 @@ type natsNotify struct {
|
||||
Streaming natsNotifyStreaming `json:"streaming"`
|
||||
}
|
||||
|
||||
func (n *natsNotify) Validate() error {
|
||||
if !n.Enable {
|
||||
return nil
|
||||
}
|
||||
if _, err := checkNetURL(n.Address); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// natsIOConn abstracts connection to any type of NATS server
|
||||
type natsIOConn struct {
|
||||
params natsNotify
|
||||
|
||||
Reference in New Issue
Block a user