blob: 270da4b7109c6065f9a34dfb364cc9d49d1ba23a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package utils
import (
"github.com/jroimartin/gocui"
"github.com/sirupsen/logrus"
)
// isNewView determines if a view has already been created based on the set of errors given (a bit hokie)
func IsNewView(errs ...error) bool {
for _, err := range errs {
if err == nil {
return false
}
if err != gocui.ErrUnknownView {
logrus.Errorf("IsNewView() unexpected error: %+v", err)
return true
}
}
return true
}
|