mirror of
https://github.com/minio/mc.git
synced 2025-11-13 12:22:45 +03:00
Add play.minio.io as default
This commit is contained in:
@@ -34,6 +34,10 @@ func runConfigCmd(ctx *cli.Context) {
|
||||
}
|
||||
arg := ctx.Args().First()
|
||||
tailArgs := ctx.Args().Tail()
|
||||
if len(tailArgs) > 2 {
|
||||
log.Debug.Println(iodine.New(errInvalidArgument{}, nil))
|
||||
console.Fatalln("Incorrect number of arguments, please use \"mc config help\"")
|
||||
}
|
||||
msg, err := doConfig(arg, tailArgs)
|
||||
if err != nil {
|
||||
log.Debug.Println(iodine.New(err, nil))
|
||||
|
||||
@@ -141,6 +141,10 @@ func newConfig() (config quick.Config) {
|
||||
s3HostConf.AccessKeyID = globalAccessKeyID
|
||||
s3HostConf.SecretAccessKey = globalSecretAccessKey
|
||||
|
||||
playHostConfig := new(hostConfig)
|
||||
playHostConfig.AccessKeyID = ""
|
||||
playHostConfig.SecretAccessKey = ""
|
||||
|
||||
// Your example host config
|
||||
exampleHostConf := new(hostConfig)
|
||||
exampleHostConf.AccessKeyID = globalAccessKeyID
|
||||
@@ -148,9 +152,11 @@ func newConfig() (config quick.Config) {
|
||||
|
||||
conf.Hosts[exampleHostURL] = exampleHostConf
|
||||
conf.Hosts["http*://s3*.amazonaws.com"] = s3HostConf
|
||||
conf.Hosts["http://play.minio.io:9000"] = playHostConfig
|
||||
|
||||
aliases := make(map[string]string)
|
||||
aliases["s3"] = "https://s3.amazonaws.com"
|
||||
aliases["play"] = "http://play.minio.io:9000"
|
||||
aliases["localhost"] = "http://localhost:9000"
|
||||
conf.Aliases = aliases
|
||||
config = quick.New(conf)
|
||||
|
||||
Reference in New Issue
Block a user