Skip to content

Instantly share code, notes, and snippets.

@fcojperez
Last active December 14, 2023 08:30
Show Gist options
  • Save fcojperez/9cb5a112166ff154342a499438aeff13 to your computer and use it in GitHub Desktop.
Save fcojperez/9cb5a112166ff154342a499438aeff13 to your computer and use it in GitHub Desktop.
cluster/gce/gci/append_or_replace_prefixed_line_test.go: cmd := exec.Command("bash", "-c", args)
cluster/gce/gci/configure_helper_test.go: cmd := exec.Command("bash", "-c", args)
cmd/importverifier/importverifier.go: cmd := "go"
cmd/kubeadm/app/cmd/completion_test.go: cmd := newCmdCompletion(&out, "")
cmd/kubeadm/app/preflight/checks.go: _, err := ipc.exec.LookPath(ipc.executable)
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "conntrack", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "crictl", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ebtables", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ethtool", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ip", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "iptables", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "mount", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "nsenter", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "socat", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "tc", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "touch", mandatory: false, exec: execer})
cmd/kubeadm/app/preflight/checks_test.go: {[]Checker{InPathCheck{executable: "foobarbaz", exec: exec.New()}}, true, "\t[WARNING FileExisting-foobarbaz]: foobarbaz not found in system path\n"},
cmd/kubeadm/app/preflight/checks_test.go: {[]Checker{InPathCheck{executable: "foobarbaz", mandatory: true, exec: exec.New()}}, false, ""},
cmd/kubeadm/app/preflight/checks_test.go: {[]Checker{InPathCheck{executable: "foobar", mandatory: false, exec: exec.New(), suggestion: "install foobar"}}, true, "\t[WARNING FileExisting-foobar]: foobar not found in system path\nSuggestion: install foobar\n"},
cmd/kubeadm/app/util/initsystem/initsystem_unix.go: err := exec.Command("systemctl", args...).Run()
cmd/kubeadm/app/util/initsystem/initsystem_unix.go: _, err := exec.LookPath("systemctl")
cmd/kubeadm/app/util/initsystem/initsystem_unix.go: if err := exec.Command("systemctl", "daemon-reload").Run(); err != nil {
cmd/kubeadm/app/util/runtime/runtime.go: cmd := runtime.exec.Command(runtime.crictlPath, append([]string{"-r", runtime.Socket(), "-i", runtime.Socket()}, args...)...)
cmd/kubeadm/app/util/runtime/runtime.go: crictlPath, err := execer.LookPath(toolName)
pkg/credentialprovider/gcp/metadata.go: data, err := exec.Command("wmic", "computersystem", "get", "model").Output()
pkg/kubelet/kubelet_pods_test.go: cmd := []string{"ls"}
pkg/kubelet/kubelet_server_journal_linux.go: cmd := exec.CommandContext(ctx, "journalctl", []string{"--field", "_SYSTEMD_UNIT"}...)
pkg/kubelet/prober/prober_test.go: cmd := []string{"/foo", "bar"}
pkg/kubelet/winstats/perfcounter_nodestats.go: result, err := exec.Command("wmic", "csproduct", "get", "UUID").Output()
pkg/proxy/conntrack/conntrack.go: conntrackPath, err := execer.LookPath("conntrack")
pkg/proxy/ipvs/ipset/ipset.go: cmd := exec.Command(IPSetCmd, "--version")
pkg/util/iptables/iptables.go: cmd := exec.Command(iptablesRestoreCmd, "--version")
pkg/volume/cephfs/cephfs.go: if _, err := execute.Command("/usr/bin/test", "-x", "/sbin/mount.fuse.ceph").CombinedOutput(); err == nil {
pkg/volume/fc/fc_util.go: out, err := exec.Command("blockdev", "--flushbufs", deviceName).CombinedOutput()
pkg/volume/fc/fc_util.go: out, err := exec.Command("multipath", "-f", dmDevice).CombinedOutput()
pkg/volume/git_repo/git_repo.go: if output, err := b.execCommand("git", args, dir); err != nil {
pkg/volume/git_repo/git_repo.go: if output, err := b.execCommand("git", []string{"checkout", b.revision}, subdir); err != nil {
pkg/volume/git_repo/git_repo.go: if output, err := b.execCommand("git", []string{"reset", "--hard"}, subdir); err != nil {
pkg/volume/iscsi/iscsi_util.go: out, err := b.exec.Command("iscsiadm", "-m", "discoverydb", "-t", "sendtargets", "-p", tp, "-I", b.Iface, "-o", "update", "-n", k, "-v", v).CombinedOutput()
pkg/volume/iscsi/iscsi_util.go: out, err := b.exec.Command("iscsiadm", "-m", "node", "-p", tp, "-T", b.Iqn, "-I", b.Iface, "-o", "update", "-n", k, "-v", v).CombinedOutput()
pkg/volume/iscsi/iscsi_util.go: out, err := exec.Command("iscsiadm", deleteArgs...).CombinedOutput()
pkg/volume/iscsi/iscsi_util.go: out, err := exec.Command("iscsiadm", logoutArgs...).CombinedOutput()
pkg/volume/rbd/rbd_util.go: _, err := b.exec.Command("modprobe", "rbd").CombinedOutput()
pkg/volume/rbd/rbd_util.go: _, err := e.Command("modprobe", "nbd").CombinedOutput()
pkg/volume/rbd/rbd_util.go: if _, err := e.Command("rbd-nbd", "--version").CombinedOutput(); err != nil {
pkg/volume/testing/testing.go: out, err := exec.New().Command("nice", "-n", "19", "du", "-x", "-s", "-B", "1", tmpDir).CombinedOutput()
pkg/volume/util/fsquota/common/quota_common_linux_impl.go: cmd := exec.Command(lsattrCmd, "-pd", path)
pkg/volume/util/fsquota/common/quota_common_linux_impl.go: cmd := exec.Command(quotaCmd, "-t", mountsFile, "-P/dev/null", "-D/dev/null", "-x", "-f", mountpoint, "-c", command)
pkg/volume/util/hostutil/hostutil_test.go: outputBytes, err := exec.New().Command("mknod", tempBlockFile, "b", "89", "1").CombinedOutput()
pkg/volume/util/hostutil/hostutil_test.go: outputBytes, err := exec.New().Command("mknod", tempCharFile, "c", "89", "1").CombinedOutput()
pkg/volume/util/subpath/subpath_windows.go: cmd := exec.Command("powershell", "/c", "$ErrorActionPreference = 'Stop'; (Get-Item -Force -LiteralPath $env:linkpath).LinkType")
pkg/volume/util/subpath/subpath_windows.go: cmd := exec.Command("powershell", "/c", "$ErrorActionPreference = 'Stop'; (Get-Item -Force -LiteralPath $env:linkpath).Target")
pkg/volume/util/subpath/subpath_windows_test.go: if output, err := exec.Command("cmd", "/c", "mklink", "/D", link, target).CombinedOutput(); err != nil {
pkg/volume/util/util.go: cmd := exec.Command("powershell", "/c", cmdString)
pkg/volume/vsphere_volume/vsphere_volume_util_windows.go: cmd := exec.Command("powershell", "/c", "Get-Disk | Select Number, SerialNumber | ConvertTo-JSON")
staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go: cmd := exec.Command(protoc, "--decode_raw")
staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go: protoc, err := exec.LookPath("protoc")
staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go: cmd := exec.Command("protoc", append(args, path)...)
staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go: if _, err := exec.LookPath("protoc"); err != nil {
staging/src/k8s.io/kubectl/pkg/cmd/annotate/annotate_test.go: cmd := NewCmdAnnotate("kubectl", tf, iostreams)
staging/src/k8s.io/kubectl/pkg/cmd/annotate/annotate_test.go: cmd := NewCmdAnnotate("kubectl", tf, iostreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/cmd.go: lp, err := exec.LookPath(name)
staging/src/k8s.io/kubectl/pkg/cmd/cmd.go: path, err := exec.LookPath(fmt.Sprintf("%s-%s", prefix, filename))
staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go: cmd := NewCmdDescribe("kubectl", tf, genericiooptions.NewTestIOStreamsDiscard())
staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go: cmd := NewCmdDescribe("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go: cmd := NewCmdDescribe("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/explain/explain_test.go: cmd := explain.NewCmdExplain("kubectl", tf, genericiooptions.NewTestIOStreamsDiscard())
staging/src/k8s.io/kubectl/pkg/cmd/explain/explain_test.go: cmd := explain.NewCmdExplain("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/get/get_test.go: cmd := NewCmdGet("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/get/get_test.go: cmd := NewCmdGet("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/plugin/plugin_completion.go: path, err := exec.LookPath(pluginCompExec)
staging/src/k8s.io/kubectl/pkg/util/completion/completion_test.go: cmd := get.NewCmdGet("kubectl", tf, streams)
staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go: result, err := exec.Command("wmic", "bios", "get", "serialnumber").Output()
staging/src/k8s.io/mount-utils/mount_linux.go: cmd := exec.Command("systemd-run", "--description=Kubernetes systemd probe", "--scope", "true")
staging/src/k8s.io/mount-utils/mount_linux.go: cmd := exec.Command("umount", path)
staging/src/k8s.io/mount-utils/mount_linux.go: dataOut, err := exec.Command("blkid", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/mount_linux.go: if _, err := exec.LookPath("systemd-run"); err != nil {
staging/src/k8s.io/mount-utils/mount_linux.go: out, err := mounter.Exec.Command("fsck", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", cmdLine)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", "(Get-Disk -DeviceId $env:diskID | Get-Partition | Get-Volume | Sort-Object -Property UniqueId).UniqueId")
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", `Get-SmbGlobalMapping -RemotePath $Env:smbremotepath`)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", `Remove-SmbGlobalMapping -RemotePath $Env:smbremotepath -Force`)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", `Test-Path $Env:remoteapth`)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := mounter.Exec.Command("powershell", "/c", cmdString)
staging/src/k8s.io/mount-utils/mount_windows_test.go: if output, err := exec.Command("cmd", "/c", "mklink", "/D", link, target).CombinedOutput(); err != nil {
staging/src/k8s.io/mount-utils/mount_windows_test.go: if output, err := exec.Command("cmd", "/c", "rmdir", link).CombinedOutput(); err != nil {
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("btrfs", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("btrfs", "inspect-internal", "dump-super", "-f", devicePath).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("dumpe2fs", "-h", devicePath).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("resize2fs", devicePath).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("xfs_growfs", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("xfs_io", "-c", "statfs", devicePath).CombinedOutput()
vendor/github.com/cyphar/filepath-securejoin/README.md: cmd := exec.Command("chroot", root,
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "-f", "-")
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "--json", "list", "chain", string(nft.family), nft.table, chain)
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "--json", "list", objectType, string(nft.family), nft.table, name)
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "--json", "list", typePlural, string(nft.family))
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.Command(nft.path, "--check", "add", "table", string(nft.family), nft.table)
vendor/github.com/godbus/dbus/v5/conn_darwin.go: cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET")
vendor/github.com/godbus/dbus/v5/conn_other.go: cmd := execCommand("dbus-launch")
vendor/github.com/google/cadvisor/fs/fs.go: out, err := exec.Command("dmsetup", "status", poolName).Output()
vendor/github.com/google/cadvisor/machine/operatingsystem_unix.go: cmd := exec.Command("uname", "-s")
vendor/github.com/moby/ipvs/netlink_linux.go: if out, err := exec.Command("modprobe", "-va", "ip_vs").CombinedOutput(); err != nil {
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go: cmd := exec.Command("go", args...)
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go: cmd := exec.Command("go", "tool", "cover", "-func", profile)
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go: out, err := exec.Command("go", "fmt", path).CombinedOutput()
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go: cmd := exec.Command("go", "list", "-m", "github.com/onsi/ginkgo/v2")
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go: b, err := exec.Command("busctl", "--user", "--no-pager", "status").CombinedOutput()
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go: b, err := exec.Command("systemctl", "--user", "--no-pager", "show-environment").CombinedOutput()
vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go: name, err := exec.LookPath(l.config.Args[0])
vendor/github.com/opencontainers/runc/libcontainer/system/linux.go: name, err := exec.LookPath(cmd)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", args...)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", args[i]...)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "exec", id, "tar", "Ccf", path.Dir(file), "-", path.Base(file))
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "exec", "-i", id, "tar", "Cxf", path.Dir(file), "-")
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "inspect", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "pause", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "restart", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "run", "--rm", "-i", "-v", name+":"+"/"+name, image, "tar", "-C", "/"+name, "-xf", "-")
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", start, c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "stop", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command(shell, "-c", strings.Join(args, " "))
vendor/github.com/vmware/govmomi/simulator/container.go: if sh, err := exec.LookPath("bash"); err != nil {
vendor/github.com/vmware/govmomi/toolbox/process/process.go: if sh, err := exec.LookPath("bash"); err != nil {
vendor/github.com/vmware/govmomi/toolbox/process/process.go: name, err := exec.LookPath(r.ProgramPath)
vendor/golang.org/x/sys/execabs/execabs.go: path, err := exec.LookPath(file)
vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go: cmd := exec.Command("go", "list", "-json", "-export", "--", importPath)
vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go: cmd := exec.Command("go", "list", "-export", "-f", "{{.Export}}", pkgDir)
vendor/golang.org/x/tools/internal/gocommand/invoke.go: cmd := exec.Command("go", goArgs...)
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go: if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go: result, err := r.execCommand("ioreg", "-rd1", "-c", "IOPlatformExpertDevice")
vendor/k8s.io/gengo/parser/parse.go: if p, err := exec.Command("which", "go").CombinedOutput(); err == nil {
vendor/k8s.io/system-validators/validators/docker_validator.go: cmd := exec.Command("docker", "info", "--format", "{{json .}}")
vendor/k8s.io/system-validators/validators/os_validator.go: os, err := exec.Command("uname").CombinedOutput()
vendor/k8s.io/system-validators/validators/package_validator_linux.go: _, err := exec.LookPath("dpkg-query")
vendor/k8s.io/system-validators/validators/package_validator_linux.go: output, err := exec.Command("dpkg-query", "--show", "--showformat='${Version}'", packageName).Output()
vendor/k8s.io/system-validators/validators/package_validator_linux.go: output, err := exec.Command("uname", "-r").Output()
vendor/k8s.io/system-validators/validators/types_unix.go: releaseVersion, err := exec.Command("uname", "-r").CombinedOutput()
vendor/k8s.io/system-validators/validators/types_windows.go: releaseVersion, err := exec.Command("powershell", args...).Output()
vendor/k8s.io/utils/exec/exec.go: path, err := osexec.LookPath(file)
vendor/sigs.k8s.io/kustomize/api/internal/git/gitrunner.go: gitProgram, err := exec.LookPath("git")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment