Skip to content

Commit

Permalink
refactor: Removing unused variable
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
  • Loading branch information
ViBiOh committed Apr 28, 2024
1 parent 213ebbd commit adc8e4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (l Logger) logPod(ctx context.Context, kube client.Kube, namespace, name, c
return
}

l.outputLog(kube, bytes.NewReader(content), l.logOutputter(kube, name, container))
l.outputLog(bytes.NewReader(content), l.logOutputter(kube, name, container))
}

func (l Logger) streamPod(ctx context.Context, kube client.Kube, namespace, name, container string) {
Expand All @@ -195,14 +195,14 @@ func (l Logger) streamPod(ctx context.Context, kube client.Kube, namespace, name
}
}()

l.outputLog(kube, stream, l.logOutputter(kube, name, container))
l.outputLog(stream, l.logOutputter(kube, name, container))
}

func (l Logger) logOutputter(kube client.Kube, name, container string) output.Outputter {
return kube.Child(l.rawOutput, output.Green.Sprintf("[%s/%s]", name, container))
}

func (l Logger) outputLog(kube client.Kube, reader io.Reader, outputter output.Outputter) {
func (l Logger) outputLog(reader io.Reader, outputter output.Outputter) {
if !l.rawOutput {
outputter.Info(output.Yellow.Sprint("Log..."))
defer outputter.Info(output.Yellow.Sprint("Log ended."))
Expand Down

0 comments on commit adc8e4b

Please sign in to comment.