From 045a0d04621a5c6198416a265da7bb8e7df91d92 Mon Sep 17 00:00:00 2001 From: Jonathan King Date: Thu, 5 Aug 2021 06:36:46 -0400 Subject: [PATCH] chore: refactored reusable code into util functions --- cmd/install.go | 143 +++++++++++------------------------------------ cmd/root.go | 83 ++++++++++++++++++++------- cmd/uninstall.go | 63 ++------------------- go.mod | 8 +-- go.sum | 28 ---------- 5 files changed, 102 insertions(+), 223 deletions(-) diff --git a/cmd/install.go b/cmd/install.go index 01988365..1c7c68e2 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -78,102 +78,50 @@ func install() { log.Debug("Redis Image: " + redisImage) log.Debug("Postgres Image: " + postgresImage) - // Detect if installation is local - var localInstall bool - if targetHostname == "localhost" && targetUsername == os.Getenv("USER") { - log.Infof("Detected an installation to localhost") - localInstall = true - } - - // Check that executable environment is present - executableDir, err := os.Executable() + // Load execution environment + err = loadExecutionEnvironment() check(err) - executionEnvironmentPath := path.Join(path.Dir(executableDir), "execution-environment.tar") - if !pathExists(executionEnvironmentPath) { - check(errors.New("Could not find execution-environment.tar at " + executionEnvironmentPath)) - } - log.Info("Found execution environment at " + executionEnvironmentPath) // Check that SSH key is present, and generate if not - if sshKey == os.Getenv("HOME")+"/.ssh/quay_installer" && localInstall { - if pathExists(sshKey) { - log.Info("Found SSH key at " + sshKey) - } else { - log.Info("Did not find SSH key in default location. Attempting to set up SSH keys.") - err = setupLocalSSH(targetHostname, targetUsername) - check(err) - log.Info("Successfully set up SSH keys") - } - } else { - if !pathExists(sshKey) { - check(errors.New("Could not find ssh key at " + sshKey)) - } else { - log.Info("Found SSH key at " + sshKey) - } - } - - log.Infof("Attempting to set SELinux rules on SSH key") - cmd := exec.Command("chcon", "-Rt", "svirt_sandbox_file_t", sshKey) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - if err := cmd.Run(); err != nil { - log.Warn("Could not set SELinux rule. If your system does not have SELinux enabled, you may ignore this.") - } + err = loadSSHKeys() + check(err) - // Handle Image Archive Loading/Defaulting + // Handle Image Archive Defaulting var imageArchiveMountFlag string if imageArchivePath == "" { + executableDir, err := os.Executable() + check(err) defaultArchivePath := path.Join(path.Dir(executableDir), "image-archive.tar") if pathExists(defaultArchivePath) { - imageArchiveMountFlag = fmt.Sprintf("-v %s:/runner/image-archive.tar", defaultArchivePath) - log.Info("Found image archive at " + defaultArchivePath) - if localInstall { - log.Printf("Loading image archive from %s", defaultArchivePath) - cmd := exec.Command("sudo", "podman", "load", "-i", defaultArchivePath) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - err = cmd.Run() - check(err) - } - log.Infof("Attempting to set SELinux rules on image archive") - cmd := exec.Command("chcon", "-Rt", "svirt_sandbox_file_t", defaultArchivePath) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - if err := cmd.Run(); err != nil { - log.Warn("Could not set SELinux rule. If your system does not have SELinux enabled, you may ignore this.") - } + imageArchivePath = defaultArchivePath } - } else { // Flag was set - if pathExists(imageArchivePath) { - imageArchiveMountFlag = fmt.Sprintf("-v %s:/runner/image-archive.tar", imageArchivePath) - log.Info("Found image archive at " + imageArchivePath) - if localInstall { - log.Printf("Loading image archive from %s", imageArchivePath) - cmd := exec.Command("sudo", "podman", "load", "-i", imageArchivePath) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - err = cmd.Run() - check(err) - } - log.Infof("Attempting to set SELinux rules on image archive") - cmd := exec.Command("chcon", "-Rt", "svirt_sandbox_file_t", imageArchivePath) + } else { + if !pathExists(imageArchivePath) { + check(errors.New("Could not find image-archive.tar at " + imageArchivePath)) + } + } + + if imageArchivePath != "" { + imageArchiveMountFlag = fmt.Sprintf("-v %s:/runner/image-archive.tar", imageArchivePath) + log.Info("Found image archive at " + imageArchivePath) + if isLocalInstall() { + log.Printf("Loading image archive from %s", imageArchivePath) + cmd := exec.Command("sudo", "podman", "load", "-i", imageArchivePath) if verbose { cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout } - if err := cmd.Run(); err != nil { - log.Warn("Could not set SELinux rule. If your system does not have SELinux enabled, you may ignore this.") - } - } else { - check(errors.New("Could not find image-archive.tar at " + imageArchivePath)) + err = cmd.Run() + check(err) + } + log.Infof("Attempting to set SELinux rules on image archive") + cmd := exec.Command("chcon", "-Rt", "svirt_sandbox_file_t", imageArchivePath) + if verbose { + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + } + if err := cmd.Run(); err != nil { + log.Warn("Could not set SELinux rule. If your system does not have SELinux enabled, you may ignore this.") } } @@ -194,27 +142,6 @@ func install() { askBecomePassFlag = "-K" } - // Load execution environment into podman - log.Printf("Loading execution environment from execution-environment.tar") - cmd = exec.Command("sudo", "podman", "load", "-i", executionEnvironmentPath) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - err = cmd.Run() - check(err) - - // FIXME - find a better way to collect logs - // Create log file to collect logs - // logFile, err := ioutil.TempFile("", "ansible-output") - // if err != nil { - // log.Fatal(err) - // } - // log.Debug("Writing ansible playbook logs to " + logFile.Name()) - // defer os.Remove(logFile.Name()) - - // go watchFileAndRun(logFile.Name()) - // Run playbook log.Printf("Running install playbook. This may take some time. To see playbook output run the installer with -v (verbose) flag.") podmanCmd := fmt.Sprintf(`sudo podman run `+ @@ -223,28 +150,24 @@ func install() { `--net host `+ imageArchiveMountFlag+ // optional image archive flag ` -v %s:/runner/env/ssh_key `+ - // `-v %s:/var/log/ansible/hosts/`+targetUsername+`@`+targetHostname+` `+ `-e RUNNER_OMIT_EVENTS=False `+ `-e RUNNER_ONLY_FAILED_EVENTS=False `+ `-e ANSIBLE_HOST_KEY_CHECKING=False `+ `-e ANSIBLE_CONFIG=/runner/project/ansible.cfg `+ - // `-e ANSIBLE_STDOUT_CALLBACK=log_plays `+ `--quiet `+ `--name ansible_runner_instance `+ `quay.io/quay/openshift-mirror-registry-ee `+ - // FIXME - Put extra variables into a temp file and then mount into /runner/env? `ansible-playbook -i %s@%s, --private-key /runner/env/ssh_key -e "init_password=%s quay_image=%s redis_image=%s postgres_image=%s quay_hostname=%s local_install=%s" install_mirror_appliance.yml %s %s`, - sshKey, targetUsername, targetHostname, initPassword, quayImage, redisImage, postgresImage, quayHostname, strconv.FormatBool(localInstall), askBecomePassFlag, additionalArgs) + sshKey, targetUsername, targetHostname, initPassword, quayImage, redisImage, postgresImage, quayHostname, strconv.FormatBool(isLocalInstall()), askBecomePassFlag, additionalArgs) log.Debug("Running command: " + podmanCmd) - cmd = exec.Command("bash", "-c", podmanCmd) + cmd := exec.Command("bash", "-c", podmanCmd) cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout cmd.Stdin = os.Stdin err = cmd.Run() check(err) - cleanup() log.Printf("Quay installed successfully") log.Printf("Quay is available at %s with credentials (init, %s)", "https://"+quayHostname, initPassword) } diff --git a/cmd/root.go b/cmd/root.go index e29e501a..c43508a2 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,13 +1,13 @@ package cmd import ( + "errors" "fmt" "io/ioutil" "os" "os/exec" - "strings" + "path" - "github.com/hpcloud/tail" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -18,26 +18,74 @@ var log = &logrus.Logger{ Level: logrus.InfoLevel, } -func watchFileAndRun(filePath string) error { - t, err := tail.TailFile(filePath, tail.Config{Follow: true}) - check(err) - for line := range t.Lines { - if strings.TrimSpace(line.Text) != "" { - msg := strings.TrimSpace(strings.Split(line.Text, " - ")[2]) - status := strings.TrimSpace(strings.Split(line.Text, " - ")[4]) - if status == "OK" || status == "SKIPPED" { - log.Info(status + ": " + msg) - } else { - log.Error(msg) - } +func loadExecutionEnvironment() error { + + // Ensure execution environment is present + executableDir, err := os.Executable() + if err != nil { + return err + } + executionEnvironmentPath := path.Join(path.Dir(executableDir), "execution-environment.tar") + if !pathExists(executionEnvironmentPath) { + return errors.New("Could not find execution-environment.tar at " + executionEnvironmentPath) + } + log.Info("Found execution environment at " + executionEnvironmentPath) + + // Load execution environment into podman + log.Printf("Loading execution environment from execution-environment.tar") + cmd := exec.Command("sudo", "podman", "load", "-i", executionEnvironmentPath) + if verbose { + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + } + err = cmd.Run() + if err != nil { + return err + } + return nil +} +func isLocalInstall() bool { + if targetHostname == "localhost" && targetUsername == os.Getenv("USER") { + log.Infof("Detected an installation to localhost") + return true + } + return false +} + +func loadSSHKeys() error { + if sshKey == os.Getenv("HOME")+"/.ssh/quay_installer" && isLocalInstall() { + if pathExists(sshKey) { + log.Info("Found SSH key at " + sshKey) + } else { + log.Info("Did not find SSH key in default location. Attempting to set up SSH keys.") + if err := setupLocalSSH(); err != nil { + return err + } + log.Info("Successfully set up SSH keys") } + } else { + if !pathExists(sshKey) { + return errors.New("Could not find ssh key at " + sshKey) + } else { + log.Info("Found SSH key at " + sshKey) + } + } + log.Infof("Attempting to set SELinux rules on SSH key") + cmd := exec.Command("chcon", "-Rt", "svirt_sandbox_file_t", sshKey) + if verbose { + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + } + if err := cmd.Run(); err != nil { + log.Warn("Could not set SELinux rule. If your system does not have SELinux enabled, you may ignore this.") } + return nil } -func setupLocalSSH(hostname, username string) error { +func setupLocalSSH() error { log.Infof("Generating SSH Key") cmd := exec.Command("bash", "-c", "ssh-keygen -b 2048 -t rsa -N '' -f ~/.ssh/quay_installer") @@ -80,15 +128,10 @@ func pathExists(path string) bool { func check(err error) { if err != nil { log.Errorf("An error occurred: %s", err.Error()) - cleanup() os.Exit(1) } } -func cleanup() { - os.RemoveAll("/tmp/app") -} - // verbose is the optional command that will display INFO logs var verbose bool diff --git a/cmd/uninstall.go b/cmd/uninstall.go index bcf7b145..8e094b6d 100644 --- a/cmd/uninstall.go +++ b/cmd/uninstall.go @@ -1,11 +1,9 @@ package cmd import ( - "errors" "fmt" "os" "os/exec" - "path" "strings" "github.com/spf13/cobra" @@ -38,81 +36,29 @@ func uninstall() { var err error log.Printf("Uninstall has begun") - // Check that executable environment is present - executableDir, err := os.Executable() + // Load execution environment + err = loadExecutionEnvironment() check(err) - executionEnvironmentPath := path.Join(path.Dir(executableDir), "execution-environment.tar") - if !pathExists(executionEnvironmentPath) { - check(errors.New("Could not find execution-environment.tar at " + executionEnvironmentPath)) - } - log.Info("Found execution environment at " + executionEnvironmentPath) - // Load execution environment into podman - log.Printf("Loading execution environment from execution-environment.tar") - cmd := exec.Command("sudo", "podman", "load", "-i", executionEnvironmentPath) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - err = cmd.Run() + err = loadSSHKeys() check(err) - // Check that SSH key is present, and generate if not - if sshKey == os.Getenv("HOME")+"/.ssh/quay_installer" && targetHostname == "localhost" { - if pathExists(sshKey) { - log.Info("Found SSH key at " + sshKey) - } else { - log.Info("Did not find SSH key in default location. Attempting to set up SSH keys.") - err = setupLocalSSH(targetHostname, targetUsername) - check(err) - log.Info("Successfully set up SSH keys") - } - } else { - if !pathExists(sshKey) { - check(errors.New("Could not find ssh key at " + sshKey)) - } else { - log.Info("Found SSH key at " + sshKey) - } - } - - log.Infof("Attempting to set SELinux rule") - cmd = exec.Command("chcon", "-Rt", "svirt_sandbox_file_t", sshKey) - if verbose { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - } - if err := cmd.Run(); err != nil { - log.Warn("Could not set SELinux rule. If your system does not have SELinux enabled, you may ignore this.") - } - // Set askBecomePass flag if true var askBecomePassFlag string if askBecomePass { askBecomePassFlag = "-K" } - // // Create log file to collect logs - // logFile, err := ioutil.TempFile("", "ansible-output") - // if err != nil { - // log.Fatal(err) - // } - // log.Debug("Writing ansible playbook logs to " + logFile.Name()) - // defer os.Remove(logFile.Name()) - - // go watchFileAndRun(logFile.Name()) - log.Printf("Running uninstall playbook. This may take some time. To see playbook output run the installer with -v (verbose) flag.") podmanCmd := fmt.Sprintf(`sudo podman run `+ `--rm --interactive --tty `+ `--workdir /runner/project `+ `--net host `+ ` -v %s:/runner/env/ssh_key `+ - // `-v %s:/var/log/ansible/hosts/`+targetUsername+`@`+targetHostname+` `+ `-e RUNNER_OMIT_EVENTS=False `+ `-e RUNNER_ONLY_FAILED_EVENTS=False `+ `-e ANSIBLE_HOST_KEY_CHECKING=False `+ `-e ANSIBLE_CONFIG=/runner/project/ansible.cfg `+ - // `-e ANSIBLE_STDOUT_CALLBACK=log_plays `+ `--quiet `+ `--name ansible_runner_instance `+ `quay.io/quay/openshift-mirror-registry-ee `+ @@ -120,7 +66,7 @@ func uninstall() { sshKey, targetUsername, strings.Split(targetHostname, ":")[0], askBecomePassFlag, additionalArgs) log.Debug("Running command: " + podmanCmd) - cmd = exec.Command("bash", "-c", podmanCmd) + cmd := exec.Command("bash", "-c", podmanCmd) if verbose { cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout @@ -129,6 +75,5 @@ func uninstall() { err = cmd.Run() check(err) - cleanup() log.Printf("Quay uninstalled successfully") } diff --git a/go.mod b/go.mod index a03438fe..4346f6ad 100644 --- a/go.mod +++ b/go.mod @@ -3,15 +3,11 @@ module github.com/quay/openshift-mirror-registry go 1.16 require ( - github.com/hpcloud/tail v1.0.0 // indirect github.com/lib/pq v1.10.0 - github.com/melbahja/goph v1.2.1 // indirect - github.com/sethvargo/go-password v0.2.0 // indirect + github.com/sethvargo/go-password v0.2.0 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.1.3 github.com/stretchr/testify v1.7.0 // indirect - golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect - gopkg.in/fsnotify.v1 v1.4.7 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) diff --git a/go.sum b/go.sum index 4a2789a6..a8b10e81 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,6 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -101,8 +99,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -113,8 +109,6 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/melbahja/goph v1.2.1 h1:msPxbLxf1PnbxRQGhv9mVqm7T16tPo3wqLWah0hJhKQ= -github.com/melbahja/goph v1.2.1/go.mod h1:y+wS4c0UtZOLSwNz6ktaGiyUeYZBeT1e8PiSz+YK77o= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -132,10 +126,6 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.12.0 h1:/f3b24xrDhkhddlaobPe2JgBqfdt+gC/NYl0QY9IOuI= -github.com/pkg/sftp v1.12.0/go.mod h1:fUqqXB5vEgVCZ131L+9say31RAri6aF6KDViawhxKK8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -176,7 +166,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -193,10 +182,6 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -229,7 +214,6 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -252,19 +236,11 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -310,12 +286,8 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=