cleaning up
parent
4c650ae615
commit
0f05af410f
|
|
@ -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")),
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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, ":")
|
||||
|
|
|
|||
|
|
@ -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, ":")
|
||||
|
|
|
|||
Loading…
Reference in New Issue