1
0
mirror of https://github.com/minio/mc.git synced 2025-11-13 12:22:45 +03:00

Make sure the AppVersion set is a proper formatted time string

This commit is contained in:
Harshavardhana
2015-06-11 20:39:49 -07:00
parent 08c14df9df
commit 4ddf93baa5

View File

@@ -113,10 +113,20 @@ func getNewClient(urlStr string, auth *hostConfig) (clnt client.Client, err erro
return nil, iodine.New(errInvalidArgument{}, nil) return nil, iodine.New(errInvalidArgument{}, nil)
} }
s3Config := new(s3.Config) s3Config := new(s3.Config)
s3Config.AccessKeyID = auth.AccessKeyID s3Config.AccessKeyID = func() string {
s3Config.SecretAccessKey = auth.SecretAccessKey if auth.AccessKeyID == globalAccessKeyID {
return ""
}
return auth.AccessKeyID
}()
s3Config.SecretAccessKey = func() string {
if auth.SecretAccessKey == globalSecretAccessKey {
return ""
}
return auth.SecretAccessKey
}()
s3Config.AppName = "Minio" s3Config.AppName = "Minio"
s3Config.AppVersion = Version s3Config.AppVersion = getVersion()
s3Config.AppComments = []string{os.Args[0], runtime.GOOS, runtime.GOARCH} s3Config.AppComments = []string{os.Args[0], runtime.GOOS, runtime.GOARCH}
s3Config.HostURL = urlStr s3Config.HostURL = urlStr
s3Config.Debug = globalDebugFlag s3Config.Debug = globalDebugFlag