mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
Handle localhost distributed setups properly (#8577)
Fixes an issue reported by @klauspost and @vadmeste This PR also allows users to expand their clusters from single node XL deployment to distributed mode.
This commit is contained in:
@@ -31,6 +31,12 @@ func (p Port) String() string {
|
||||
|
||||
// ParsePort - parses string into Port
|
||||
func ParsePort(s string) (p Port, err error) {
|
||||
if s == "https" {
|
||||
return Port(443), nil
|
||||
} else if s == "http" {
|
||||
return Port(80), nil
|
||||
}
|
||||
|
||||
var i int
|
||||
if i, err = strconv.Atoi(s); err != nil {
|
||||
return p, errors.New("invalid port number")
|
||||
|
||||
Reference in New Issue
Block a user