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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user