mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
config: Accept more address format + unit test (#3915)
checkURL() is a generic function to check if a passed address is valid. This commit adds support for addresses like `m1` and `172.16.3.1` which is needed in MySQL and NATS. This commit also adds tests.
This commit is contained in:
committed by
Harshavardhana
parent
f3334159a4
commit
8426cf9aec
@@ -37,7 +37,7 @@ func (e *elasticSearchNotify) Validate() error {
|
||||
if !e.Enable {
|
||||
return nil
|
||||
}
|
||||
if _, err := checkNetURL(e.URL); err != nil {
|
||||
if _, err := checkURL(e.URL); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user