update popeye
parent
c86e8f4bd2
commit
c2a15badd1
2
go.mod
2
go.mod
|
|
@ -2,7 +2,7 @@ module github.com/derailed/k9s
|
|||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.4.11 // indirect
|
||||
github.com/derailed/popeye v0.1.2
|
||||
github.com/derailed/popeye v0.1.5
|
||||
github.com/derailed/tview v0.1.4
|
||||
github.com/fatih/camelcase v1.0.0 // indirect
|
||||
github.com/gdamore/tcell v1.1.1
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -40,6 +40,10 @@ github.com/derailed/popeye v0.1.0 h1:r4WBPb7sON6kpvCuqxTbGCh9GtwAgN27vkPjWSMAa8s
|
|||
github.com/derailed/popeye v0.1.0/go.mod h1:2tTv7ge9s/Z4ZiZU+hHo2no07bbg5+DlBFnuVpR3cqQ=
|
||||
github.com/derailed/popeye v0.1.1 h1:KHEhapc3g/GebHkKXJsvlujWIimPfdU1UJ584Rb2UHk=
|
||||
github.com/derailed/popeye v0.1.1/go.mod h1:/FlF4pGIupvlmwqidGEkIYYIQMekSO+WOJ+2Sr5vH5g=
|
||||
github.com/derailed/popeye v0.1.2 h1:KNK18C047bwevnI5H612tEcv93i8++aqwyXwdyPkJLM=
|
||||
github.com/derailed/popeye v0.1.2/go.mod h1:/FlF4pGIupvlmwqidGEkIYYIQMekSO+WOJ+2Sr5vH5g=
|
||||
github.com/derailed/popeye v0.1.5 h1:3yHRXUeug8oJtbByquJ+d9M3T/uXrm97vItGhH4UHaE=
|
||||
github.com/derailed/popeye v0.1.5/go.mod h1:ZZw8cFk2VWY8+/PObmSbJgUotxMB1/OegGrzQfRvePo=
|
||||
github.com/derailed/tview v0.1.3 h1:2/Rz0Sdfg3tepSKt4yCcY2g8IlRtPTrA4UYIQJZs6DI=
|
||||
github.com/derailed/tview v0.1.3/go.mod h1:WRYVfgb2PBMLZ/muaSpOc/4H4fYsOPnHOaGnBoJ+hGE=
|
||||
github.com/derailed/tview v0.1.4 h1:6ZtMtb5+2bbGNH7SldHGcVB8GnSTXKIQwKxWRNb6DxY=
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package views
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
|
@ -38,9 +39,16 @@ func newPopeyeView(app *appView) *popeyeView {
|
|||
}
|
||||
|
||||
func (v *popeyeView) init(ctx context.Context, ns string) {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
v.app.flash(flashErr, fmt.Sprintf("%v", err))
|
||||
}
|
||||
}()
|
||||
|
||||
c := cfg.New()
|
||||
|
||||
spinach := filepath.Join(config.K9sHome, "spinach.yml")
|
||||
|
||||
if _, err := os.Stat(spinach); err == nil {
|
||||
c.Spinach = spinach
|
||||
}
|
||||
|
|
@ -53,8 +61,8 @@ func (v *popeyeView) init(ctx context.Context, ns string) {
|
|||
log.Error().Err(err).Msg("Unable to load spinach config")
|
||||
}
|
||||
|
||||
p := pkg.NewPopeye(c, v.ansiWriter)
|
||||
p.Sanitize()
|
||||
p := pkg.NewPopeye(c, &log.Logger, v.ansiWriter)
|
||||
p.Sanitize(false)
|
||||
}
|
||||
|
||||
func (v *popeyeView) getTitle() string {
|
||||
|
|
|
|||
Loading…
Reference in New Issue