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

Revert "unstruct client functions"

This commit is contained in:
Harshavardhana
2015-04-29 21:28:28 -07:00
parent 3ec4e85f92
commit 1ceed3dc20
10 changed files with 63 additions and 54 deletions

View File

@@ -65,7 +65,7 @@ func runAccessCmd(ctx *cli.Context) {
targetURLConfigMap[targetURL] = targetConfig
}
for targetURL, targetConfig := range targetURLConfigMap {
errorMsg, err := doUpdateAccessCmd(targetURL, acl.String(), targetConfig, globalDebugFlag)
errorMsg, err := doUpdateAccessCmd(mcClientMethods{}, targetURL, acl.String(), targetConfig, globalDebugFlag)
err = iodine.New(err, nil)
if err != nil {
if errorMsg == "" {
@@ -77,10 +77,10 @@ func runAccessCmd(ctx *cli.Context) {
}
}
func doUpdateAccessCmd(targetURL, targetACL string, targetConfig *hostConfig, debug bool) (string, error) {
func doUpdateAccessCmd(methods clientMethods, targetURL, targetACL string, targetConfig *hostConfig, debug bool) (string, error) {
var err error
var clnt client.Client
clnt, err = getNewClient(targetURL, targetConfig, debug)
clnt, err = methods.getNewClient(targetURL, targetConfig, debug)
if err != nil {
err := iodine.New(err, nil)
msg := fmt.Sprintf("Unable to initialize client for [%s]. Reason: [%s].\n",