cleaning up

mine
derailed 2020-07-02 18:57:42 -06:00
parent 4c650ae615
commit 0f05af410f
4 changed files with 6 additions and 3 deletions

View File

@ -22,6 +22,7 @@ type Dir struct {
path string
}
// NewDir returns a new instance.
func NewDir(path string) ResourceViewer {
d := Dir{
ResourceViewer: NewBrowser(client.NewGVR("dir")),

View File

@ -4,7 +4,6 @@ import (
"bytes"
"context"
"fmt"
"github.com/atotto/clipboard"
"io"
"os"
"path/filepath"
@ -12,6 +11,8 @@ import (
"strings"
"time"
"github.com/atotto/clipboard"
"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/color"
"github.com/derailed/k9s/internal/config"
@ -241,6 +242,7 @@ func (l *Log) Logs() *Details {
return l.logs
}
// EOL tracks end of lines.
var EOL = []byte("\n")
// Flush write logs to viewer.

View File

@ -277,7 +277,7 @@ func (f *Factory) ForwarderFor(path string) (Forwarder, bool) {
return fwd, ok
}
// Validate check if pods are still around for portforwards.
// ValidatePortForwards check if pods are still around for portforwards.
func (f *Factory) ValidatePortForwards() {
for k, fwd := range f.forwarders {
tokens := strings.Split(k, ":")

View File

@ -49,7 +49,7 @@ func NewForwarders() Forwarders {
return make(map[string]Forwarder)
}
// IsForwarded checks if pod has a forward
// IsPodForwarded checks if pod has a forward
func (ff Forwarders) IsPodForwarded(path string) bool {
for k := range ff {
fqn := strings.Split(k, ":")