cleaning up
parent
13d52f120f
commit
7e2dab2a66
|
|
@ -35,7 +35,7 @@ func NewLogItems() *LogItems {
|
|||
}
|
||||
}
|
||||
|
||||
// Len returns the items length.
|
||||
// Items returns the log items.
|
||||
func (l *LogItems) Items() []*LogItem {
|
||||
l.mx.RLock()
|
||||
defer l.mx.RUnlock()
|
||||
|
|
|
|||
|
|
@ -501,6 +501,7 @@ func (p *Pod) isControlled(path string) (string, bool, error) {
|
|||
return "", false, nil
|
||||
}
|
||||
|
||||
// GetDefaultLogContainer returns a container name if specified in an annotation.
|
||||
func GetDefaultLogContainer(m metav1.ObjectMeta, spec v1.PodSpec) (string, bool) {
|
||||
defaultContainer, ok := m.Annotations[defaultLogContainerAnnotation]
|
||||
if ok {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ type Primitive interface {
|
|||
Name() string
|
||||
}
|
||||
|
||||
// Commander tracks prompt status.
|
||||
type Commander interface {
|
||||
// InCmdMode checks if prompt is active.
|
||||
InCmdMode() bool
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ func (b *Browser) Init(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InCmdMode checks if prompt is active.
|
||||
func (b *Browser) InCmdMode() bool {
|
||||
return b.CmdBuff().InCmdMode()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ func (d *Details) Init(_ context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InCmdMode checks if prompt is active.
|
||||
func (d *Details) InCmdMode() bool {
|
||||
return d.cmdBuff.InCmdMode()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ func (v *LiveView) Init(_ context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InCmdMode checks if prompt is active.
|
||||
func (v *LiveView) InCmdMode() bool {
|
||||
return v.cmdBuff.InCmdMode()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ func (p *Pulse) Init(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InCmdMode checks if prompt is active.
|
||||
func (*Pulse) InCmdMode() bool {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ func (s *Sanitizer) Init(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InCmdMode checks if prompt is active.
|
||||
func (*Sanitizer) InCmdMode() bool {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ func (x *Xray) Init(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InCmdMode checks if prompt is active.
|
||||
func (*Xray) InCmdMode() bool {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue