Documentation ¶
Index ¶
- Variables
- func Falsey(input js.Value) bool
- func FromJsError(v js.Value) (err error)
- func IsNullish(input js.Value) bool
- func IsString(input js.Value) bool
- func ResolvePromise(promise js.Value) (result *js.Value, err *js.Value, goErr error)
- func ToJsError(v error) js.Value
- func ToJsTypeError(v error) js.Value
- type IConsole
- type JSConsole
- func (c *JSConsole) Debug(args ...interface{})
- func (c *JSConsole) Dir(v interface{})
- func (c *JSConsole) DirXML(v interface{})
- func (c *JSConsole) Error(args ...interface{})
- func (c *JSConsole) Info(args ...interface{})
- func (c *JSConsole) Log(args ...interface{})
- func (c *JSConsole) Trace(args ...interface{})
- func (c *JSConsole) Warn(args ...interface{})
- type JSError
- type MockLogger
- func (l *MockLogger) Debug(args ...interface{})
- func (l *MockLogger) Dir(data interface{})
- func (l *MockLogger) DirXML(data interface{})
- func (l *MockLogger) Error(args ...interface{})
- func (l *MockLogger) Info(args ...interface{})
- func (l *MockLogger) Log(args ...interface{})
- func (l *MockLogger) Warn(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidJSError = NewJSTypeError("TypeError", "invalid js error")
View Source
var (
ErrNotPromise = NewJSTypeError("PromiseError", "not a valid promise")
)
Functions ¶
func FromJsError ¶
func ResolvePromise ¶
func ToJsTypeError ¶
Types ¶
type IConsole ¶
type IConsole interface { Log(args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Dir(data interface{}) DirXML(data interface{}) }
type JSConsole ¶
type JSConsole struct {
// contains filtered or unexported fields
}
func NewGlobalConsole ¶
func NewGlobalConsole() *JSConsole
type JSError ¶
type JSError struct {
// contains filtered or unexported fields
}
func NewJSError ¶
func NewJSTypeError ¶
type MockLogger ¶
type MockLogger struct{}
func (*MockLogger) Debug ¶
func (l *MockLogger) Debug(args ...interface{})
func (*MockLogger) Dir ¶
func (l *MockLogger) Dir(data interface{})
func (*MockLogger) DirXML ¶
func (l *MockLogger) DirXML(data interface{})
func (*MockLogger) Error ¶
func (l *MockLogger) Error(args ...interface{})
func (*MockLogger) Info ¶
func (l *MockLogger) Info(args ...interface{})
func (*MockLogger) Log ¶
func (l *MockLogger) Log(args ...interface{})
func (*MockLogger) Warn ¶
func (l *MockLogger) Warn(args ...interface{})
Click to show internal directories.
Click to hide internal directories.