From 9a7be38462addee9a2b111f96da2f63f0db7301b Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 30 Aug 2020 15:47:32 +1000 Subject: [PATCH] Update WailsInit checker --- lib/binding/method.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/binding/method.go b/lib/binding/method.go index 4b089733..9a0a3260 100644 --- a/lib/binding/method.go +++ b/lib/binding/method.go @@ -196,7 +196,7 @@ func (b *boundMethod) processWailsInit() error { // It must be *wails.Runtime inputName := b.inputs[0].String() b.log.Debugf("WailsInit input type: %s", inputName) - if inputName != "*wails.Runtime" { + if inputName != "*runtime.Runtime" { return fmt.Errorf("Invalid WailsInit() definition. Expected input to be wails.Runtime, but got %s", inputName) } @@ -219,7 +219,7 @@ func (b *boundMethod) processWailsInit() error { } func (b *boundMethod) processWailsShutdown() error { - // We must have only 1 input, it must be *wails.Runtime + // We must not have any inputs if len(b.inputs) != 0 { return fmt.Errorf("Invalid WailsShutdown() definition. Expected 0 inputs, but got %d", len(b.inputs)) }