From ab2fb8f1c6a3586934fbdb958cd3cd04ec89a91a Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Thu, 9 Apr 2015 20:26:24 -0700 Subject: [PATCH] Killing an unused function --- cmd-config.go | 25 ------------------------- cmd-cp.go | 3 +-- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/cmd-config.go b/cmd-config.go index bb05ab91..cc6817a3 100644 --- a/cmd-config.go +++ b/cmd-config.go @@ -194,31 +194,6 @@ func saveConfig(ctx *cli.Context) error { return nil } -// getBashCompletion - -func getBashCompletion() { - var b bytes.Buffer - if os.Getenv("SHELL") != "/bin/bash" { - fatal("Unsupported shell for bash completion detected.. exiting") - } - b.WriteString(mcBashCompletion) - f := getMcBashCompletionFilename() - fl, err := os.OpenFile(f, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) - defer fl.Close() - if err != nil { - log.Debug.Println(iodine.New(err, nil)) - fatal("Unable to create bash completion file") - } - _, err = fl.Write(b.Bytes()) - if err != nil { - log.Debug.Println(iodine.New(err, nil)) - fatal("Unable to write bash completion file") - } - msg := "\nConfiguration written to " + f - msg = msg + "\n\n$ source ${HOME}/.mc/mc.bash_completion\n" - msg = msg + "$ echo 'source ${HOME}/.mc/mc.bash_completion' >> ${HOME}/.bashrc\n" - info(msg) -} - func parseConfigInput(c *cli.Context) (config *mcConfig, err error) { accessKeyID := c.String("accesskeyid") secretAccesskey := c.String("secretkey") diff --git a/cmd-cp.go b/cmd-cp.go index 44cbb1ef..a0b48d24 100644 --- a/cmd-cp.go +++ b/cmd-cp.go @@ -17,12 +17,11 @@ package main import ( + "bytes" "fmt" "io" "io/ioutil" - "bytes" - "github.com/cheggaaa/pb" "github.com/minio-io/cli" "github.com/minio-io/minio/pkg/iodine"