Skip to content

Commit

Permalink
cleanup/formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Quest <[email protected]>
  • Loading branch information
kcq committed Aug 26, 2023
1 parent 89d9651 commit d310b07
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion pkg/app/master/commands/clifvparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,4 +847,3 @@ func IsTrueStr(value string) bool {

return false
}

2 changes: 1 addition & 1 deletion pkg/app/master/commands/cliprompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (ia *InteractiveApp) execute(command string) {

args = append(args, val)
}

if err := ia.app.Run(args); err != nil {
log.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/app/master/commands/debug/handle_docker_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func listDebuggableDockerContainersWithConfig(client *dockerapi.Client) (map[str
func listDockerDebugContainers(
client *dockerapi.Client,
targetContainer string,
onlyActive bool) (map[string]*DebugContainerInfo, error) {
onlyActive bool) (map[string]*DebugContainerInfo, error) {
containers, err := dockerutil.ListContainers(client, "", true)
if err != nil {
return nil, err
Expand Down Expand Up @@ -376,9 +376,9 @@ func listDockerDebugContainers(
}

func listDockerDebugContainersWithConfig(
client *dockerapi.Client,
client *dockerapi.Client,
targetContainer string,
onlyActive bool) (map[string]*DebugContainerInfo, error) {
onlyActive bool) (map[string]*DebugContainerInfo, error) {
//todo: pass the docker client config params instead of the existing client
return listDockerDebugContainers(client, targetContainer, onlyActive)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/master/commands/debug/handle_kubernetes_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ func listK8sDebugContainers(
nsName string,
podName string,
targetContainer string,
onlyActive bool) (map[string]*DebugContainerInfo, error) {
onlyActive bool) (map[string]*DebugContainerInfo, error) {

pod, err := api.CoreV1().Pods(nsName).Get(ctx, podName, metav1.GetOptions{})
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions pkg/app/master/commands/debug/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func completeSession(ia *commands.InteractiveApp, token string, params prompt.Do
var values []prompt.Suggest
ccs := commands.GetCurrentCommandState()
if ccs != nil && ccs.Command == Name {
csessValStr := ccs.GetCFValue(FlagConnectSession)
csessValStr := ccs.GetCFValue(FlagConnectSession)

runtimeFlag := commands.FullFlagName(FlagRuntime)
rtFlagVals, found := ccs.CommandFlags[runtimeFlag]
Expand All @@ -210,7 +210,7 @@ func completeSession(ia *commands.InteractiveApp, token string, params prompt.Do
kubeconfig = kcFlagVals[0]
}

namespace := ccs.GetCFValueWithDefault(FlagNamespace,NamespaceDefault)
namespace := ccs.GetCFValueWithDefault(FlagNamespace, NamespaceDefault)

var pod string
podFlag := commands.FullFlagName(FlagPod)
Expand Down Expand Up @@ -252,8 +252,8 @@ func completeSession(ia *commands.InteractiveApp, token string, params prompt.Do
target = targetFlagVals[0]
}

result, err := listDockerDebugContainersWithConfig(ccs.Dclient,
target,
result, err := listDockerDebugContainersWithConfig(ccs.Dclient,
target,
commands.IsTrueStr(csessValStr))
if err == nil {
for _, info := range result {
Expand Down

0 comments on commit d310b07

Please sign in to comment.