mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-09 00:29:13 +08:00
Fix tests
This commit is contained in:
parent
965f939967
commit
b925335bbb
@ -52,7 +52,7 @@ func TestGenerateIcon(t *testing.T) {
|
||||
_, thisFile, _, _ := runtime.Caller(1)
|
||||
localDir := filepath.Dir(thisFile)
|
||||
// Get the path to the example icon
|
||||
exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
|
||||
exampleIcon := filepath.Join(localDir, "defaults", "appicon.png")
|
||||
return &IconsOptions{
|
||||
Input: exampleIcon,
|
||||
WindowsFilename: "appicon.ico",
|
||||
@ -94,7 +94,7 @@ func TestGenerateIcon(t *testing.T) {
|
||||
_, thisFile, _, _ := runtime.Caller(1)
|
||||
localDir := filepath.Dir(thisFile)
|
||||
// Get the path to the example icon
|
||||
exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
|
||||
exampleIcon := filepath.Join(localDir, "defaults", "appicon.png")
|
||||
return &IconsOptions{
|
||||
Input: exampleIcon,
|
||||
MacFilename: "appicon.icns",
|
||||
@ -133,7 +133,7 @@ func TestGenerateIcon(t *testing.T) {
|
||||
_, thisFile, _, _ := runtime.Caller(1)
|
||||
localDir := filepath.Dir(thisFile)
|
||||
// Get the path to the example icon
|
||||
exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
|
||||
exampleIcon := filepath.Join(localDir, "defaults", "appicon.png")
|
||||
return &IconsOptions{
|
||||
Input: exampleIcon,
|
||||
Sizes: "16",
|
||||
@ -181,7 +181,7 @@ func TestGenerateIcon(t *testing.T) {
|
||||
_, thisFile, _, _ := runtime.Caller(1)
|
||||
localDir := filepath.Dir(thisFile)
|
||||
// Get the path to the example icon
|
||||
exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
|
||||
exampleIcon := filepath.Join(localDir, "defaults", "appicon.png")
|
||||
return &IconsOptions{
|
||||
Input: exampleIcon,
|
||||
}
|
||||
@ -195,7 +195,7 @@ func TestGenerateIcon(t *testing.T) {
|
||||
_, thisFile, _, _ := runtime.Caller(1)
|
||||
localDir := filepath.Dir(thisFile)
|
||||
// Get the path to the example icon
|
||||
exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
|
||||
exampleIcon := filepath.Join(localDir, "defaults", "appicon.png")
|
||||
return &IconsOptions{
|
||||
Input: exampleIcon,
|
||||
WindowsFilename: "appicon.ico",
|
||||
@ -211,7 +211,7 @@ func TestGenerateIcon(t *testing.T) {
|
||||
_, thisFile, _, _ := runtime.Caller(1)
|
||||
localDir := filepath.Dir(thisFile)
|
||||
// Get the path to the example icon
|
||||
exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
|
||||
exampleIcon := filepath.Join(localDir, "defaults", "appicon.png")
|
||||
return &IconsOptions{
|
||||
Input: exampleIcon,
|
||||
WindowsFilename: "appicon.ico",
|
||||
|
@ -1,39 +0,0 @@
|
||||
package commands
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestBuild(t *testing.T) {
|
||||
type args struct {
|
||||
options *RunTaskOptions
|
||||
otherArgs []string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "should error if task name not provided",
|
||||
args: args{
|
||||
options: &RunTaskOptions{},
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "should work if task name provided",
|
||||
args: args{
|
||||
options: &RunTaskOptions{
|
||||
Name: "build",
|
||||
},
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := RunTask(tt.args.options, tt.args.otherArgs); (err != nil) != tt.wantErr {
|
||||
t.Errorf("Run() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
@ -108,6 +108,9 @@ func GenerateBinding(structName string, method *BoundMethod) (string, []string)
|
||||
result = strings.ReplaceAll(result, "{{methodName}}", method.Name)
|
||||
result = strings.ReplaceAll(result, "{{ID}}", fmt.Sprintf("%v", method.ID))
|
||||
comments := strings.TrimSpace(method.DocComment)
|
||||
if comments != "" {
|
||||
comments = " " + comments
|
||||
}
|
||||
result = strings.ReplaceAll(result, "Comments", comments)
|
||||
var params string
|
||||
for _, input := range method.Inputs {
|
||||
@ -238,7 +241,7 @@ window.go = window.go || {};
|
||||
for _, method := range methods {
|
||||
thisBinding, models := GenerateBinding(structName, method)
|
||||
allModels = append(allModels, models...)
|
||||
result[normalisedPackageNames[packageName]] += " " + thisBinding
|
||||
result[normalisedPackageNames[packageName]] += thisBinding
|
||||
}
|
||||
result[normalisedPackageNames[packageName]] += " },\n"
|
||||
}
|
||||
|
@ -110,6 +110,11 @@ func TestGenerateBindings(t *testing.T) {
|
||||
return
|
||||
}
|
||||
// compare the binding
|
||||
|
||||
// convert all line endings to \n
|
||||
binding = convertLineEndings(binding)
|
||||
expected = convertLineEndings(expected)
|
||||
|
||||
if diff := cmp.Diff(expected, binding); diff != "" {
|
||||
err = os.WriteFile(tt.dir+"/bindings_"+name+".got.js", []byte(binding), 0644)
|
||||
if err != nil {
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@ -63,8 +64,10 @@ func TestGenerateModels(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("GenerateModels() error = %v", err)
|
||||
}
|
||||
|
||||
if diff := cmp.Diff(tt.want, got); diff != "" {
|
||||
// convert all line endings to \n
|
||||
got = convertLineEndings(got)
|
||||
want := convertLineEndings(tt.want)
|
||||
if diff := cmp.Diff(want, got); diff != "" {
|
||||
err = os.WriteFile(filepath.Join(tt.dir, "models.got.ts"), []byte(got), 0644)
|
||||
if err != nil {
|
||||
t.Errorf("os.WriteFile() error = %v", err)
|
||||
@ -75,3 +78,8 @@ func TestGenerateModels(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func convertLineEndings(str string) string {
|
||||
// replace all \r\n with \n
|
||||
return strings.ReplaceAll(str, "\r\n", "\n")
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
{
|
||||
Name: "NoInputsStringOut",
|
||||
@ -53,6 +54,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1075577233,
|
||||
},
|
||||
{
|
||||
Name: "StringArrayInputStringOut",
|
||||
@ -72,6 +74,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1091960237,
|
||||
},
|
||||
{
|
||||
Name: "StringArrayInputStringArrayOut",
|
||||
@ -92,6 +95,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 383995060,
|
||||
},
|
||||
{
|
||||
Name: "StringArrayInputNamedOutput",
|
||||
@ -113,6 +117,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3678582682,
|
||||
},
|
||||
{
|
||||
Name: "StringArrayInputNamedOutputs",
|
||||
@ -140,6 +145,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 319259595,
|
||||
},
|
||||
{
|
||||
Name: "IntPointerInputNamedOutputs",
|
||||
@ -166,6 +172,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
Name: "error",
|
||||
}},
|
||||
},
|
||||
ID: 2718999663,
|
||||
},
|
||||
{
|
||||
Name: "UIntPointerInAndOutput",
|
||||
@ -186,6 +193,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1367187362,
|
||||
},
|
||||
{
|
||||
Name: "UInt8PointerInAndOutput",
|
||||
@ -206,6 +214,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 518250834,
|
||||
},
|
||||
{
|
||||
Name: "UInt16PointerInAndOutput",
|
||||
@ -226,6 +235,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1236957573,
|
||||
},
|
||||
{
|
||||
Name: "UInt32PointerInAndOutput",
|
||||
@ -246,6 +256,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1739300671,
|
||||
},
|
||||
{
|
||||
Name: "UInt64PointerInAndOutput",
|
||||
@ -266,6 +277,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1403757716,
|
||||
},
|
||||
{
|
||||
Name: "IntPointerInAndOutput",
|
||||
@ -286,6 +298,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1066151743,
|
||||
},
|
||||
{
|
||||
Name: "Int8PointerInAndOutput",
|
||||
@ -306,6 +319,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2189402897,
|
||||
},
|
||||
{
|
||||
Name: "Int16PointerInAndOutput",
|
||||
@ -326,6 +340,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1754277916,
|
||||
},
|
||||
{
|
||||
Name: "Int32PointerInAndOutput",
|
||||
@ -346,6 +361,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 4251088558,
|
||||
},
|
||||
{
|
||||
Name: "Int64PointerInAndOutput",
|
||||
@ -366,6 +382,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2205561041,
|
||||
},
|
||||
{
|
||||
Name: "IntInIntOut",
|
||||
@ -384,6 +401,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 642881729,
|
||||
},
|
||||
{
|
||||
Name: "Int8InIntOut",
|
||||
@ -402,6 +420,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 572240879,
|
||||
},
|
||||
{
|
||||
Name: "Int16InIntOut",
|
||||
@ -420,6 +439,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3306292566,
|
||||
},
|
||||
{
|
||||
Name: "Int32InIntOut",
|
||||
@ -438,6 +458,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1909469092,
|
||||
},
|
||||
{
|
||||
Name: "Int64InIntOut",
|
||||
@ -456,6 +477,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1343888303,
|
||||
},
|
||||
{
|
||||
Name: "UIntInUIntOut",
|
||||
@ -474,6 +496,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2836661285,
|
||||
},
|
||||
{
|
||||
Name: "UInt8InUIntOut",
|
||||
@ -492,6 +515,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2988345717,
|
||||
},
|
||||
{
|
||||
Name: "UInt16InUIntOut",
|
||||
@ -510,6 +534,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3401034892,
|
||||
},
|
||||
{
|
||||
Name: "UInt32InUIntOut",
|
||||
@ -528,6 +553,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1160383782,
|
||||
},
|
||||
{
|
||||
Name: "UInt64InUIntOut",
|
||||
@ -546,6 +572,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 793803239,
|
||||
},
|
||||
{
|
||||
Name: "Float32InFloat32Out",
|
||||
@ -564,6 +591,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3132595881,
|
||||
},
|
||||
{
|
||||
Name: "Float64InFloat64Out",
|
||||
@ -582,6 +610,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2182412247,
|
||||
},
|
||||
{
|
||||
Name: "PointerFloat32InFloat32Out",
|
||||
@ -602,6 +631,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 224675106,
|
||||
},
|
||||
{
|
||||
Name: "PointerFloat64InFloat64Out",
|
||||
@ -622,6 +652,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2124953624,
|
||||
},
|
||||
{
|
||||
Name: "BoolInBoolOut",
|
||||
@ -640,6 +671,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2424639793,
|
||||
},
|
||||
{
|
||||
Name: "PointerBoolInBoolOut",
|
||||
@ -660,6 +692,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3589606958,
|
||||
},
|
||||
{
|
||||
Name: "PointerStringInStringOut",
|
||||
@ -680,6 +713,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 229603958,
|
||||
},
|
||||
{
|
||||
Name: "StructPointerInputErrorOutput",
|
||||
@ -701,6 +735,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2447692557,
|
||||
},
|
||||
{
|
||||
Name: "StructInputStructOutput",
|
||||
@ -723,6 +758,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3835643147,
|
||||
},
|
||||
{
|
||||
Name: "StructPointerInputStructPointerOutput",
|
||||
@ -747,6 +783,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2943477349,
|
||||
},
|
||||
{
|
||||
Name: "MapIntInt",
|
||||
@ -764,6 +801,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2386486356,
|
||||
},
|
||||
{
|
||||
Name: "PointerMapIntInt",
|
||||
@ -782,6 +820,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3516977899,
|
||||
},
|
||||
{
|
||||
Name: "MapIntPointerInt",
|
||||
@ -800,6 +839,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 550413585,
|
||||
},
|
||||
{
|
||||
Name: "MapIntSliceInt",
|
||||
@ -818,6 +858,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 2900172572,
|
||||
},
|
||||
{
|
||||
Name: "MapIntSliceIntInMapIntSliceIntOut",
|
||||
@ -851,6 +892,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 881980169,
|
||||
},
|
||||
{
|
||||
Name: "ArrayInt",
|
||||
@ -863,6 +905,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 3862002418,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -956,11 +999,13 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
},
|
||||
"OtherService": {
|
||||
{
|
||||
Name: "Hello",
|
||||
ID: 4249972365,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -992,11 +1037,13 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
},
|
||||
"OtherService": {
|
||||
{
|
||||
Name: "Hello",
|
||||
ID: 4249972365,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1029,6 +1076,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
{
|
||||
Name: "NewPerson",
|
||||
@ -1052,6 +1100,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1661412647,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1069,6 +1118,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 469445984,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1149,6 +1199,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1180,6 +1231,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1211,6 +1263,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
{
|
||||
Name: "NewPerson",
|
||||
@ -1234,6 +1287,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1661412647,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1251,6 +1305,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 302702907,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1331,6 +1386,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1362,6 +1418,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1411160069,
|
||||
},
|
||||
{
|
||||
Name: "NewPerson",
|
||||
@ -1385,6 +1442,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 1661412647,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1402,6 +1460,7 @@ func TestParseDirectory(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ID: 302702907,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {main} from './models';
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -19,9 +14,7 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NewPerson
|
||||
@ -29,15 +22,7 @@ function Greet(name) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<main.Person | null>}
|
||||
**/
|
||||
function NewPerson(name) {
|
||||
return wails.Call(GreetService("NewPerson", name));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
NewPerson,
|
||||
NewPerson: function(name) { wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {services} from './models';
|
||||
|
||||
function OtherService(method) {
|
||||
return {
|
||||
packageName: "services",
|
||||
serviceName: "OtherService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.services = {
|
||||
OtherService: {
|
||||
|
||||
/**
|
||||
* OtherService.Yay
|
||||
@ -19,14 +14,7 @@ function OtherService(method) {
|
||||
*
|
||||
* @returns {Promise<services.Address | null>}
|
||||
**/
|
||||
function Yay() {
|
||||
return wails.Call(OtherService("Yay"));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.services = {
|
||||
OtherService: {
|
||||
Yay,
|
||||
Yay: function() { wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -2,14 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -17,17 +13,9 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
function OtherService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "OtherService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
OtherService: {
|
||||
|
||||
/**
|
||||
* OtherService.Hello
|
||||
@ -35,16 +23,6 @@ function OtherService(method) {
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function Hello() {
|
||||
return wails.Call(OtherService("Hello"));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
},
|
||||
OtherService: {
|
||||
Hello,
|
||||
Hello: function() { wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
@ -2,14 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -17,17 +13,9 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
function OtherService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "OtherService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
OtherService: {
|
||||
|
||||
/**
|
||||
* OtherService.Hello
|
||||
@ -35,16 +23,6 @@ function OtherService(method) {
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function Hello() {
|
||||
return wails.Call(OtherService("Hello"));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
},
|
||||
OtherService: {
|
||||
Hello,
|
||||
Hello: function() { wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {main} from './models';
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -19,9 +14,7 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NewPerson
|
||||
@ -29,15 +22,7 @@ function Greet(name) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<main.Person | null>}
|
||||
**/
|
||||
function NewPerson(name) {
|
||||
return wails.Call(GreetService("NewPerson", name));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
NewPerson,
|
||||
NewPerson: function(name) { wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {services} from './models';
|
||||
|
||||
function OtherService(method) {
|
||||
return {
|
||||
packageName: "services",
|
||||
serviceName: "OtherService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.services = {
|
||||
OtherService: {
|
||||
|
||||
/**
|
||||
* OtherService.Yay
|
||||
@ -19,14 +14,7 @@ function OtherService(method) {
|
||||
*
|
||||
* @returns {Promise<services.Address | null>}
|
||||
**/
|
||||
function Yay() {
|
||||
return wails.Call(OtherService("Yay"));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.services = {
|
||||
OtherService: {
|
||||
Yay,
|
||||
Yay: function() { wails.CallByID(469445984, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {main} from './models';
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.ArrayInt
|
||||
@ -19,9 +14,7 @@ function GreetService(method) {
|
||||
* @param _in {number[]}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function ArrayInt(_in) {
|
||||
return wails.Call(GreetService("ArrayInt", _in));
|
||||
}
|
||||
ArrayInt: function(_in) { wails.CallByID(3862002418, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.BoolInBoolOut
|
||||
@ -29,9 +22,7 @@ function ArrayInt(_in) {
|
||||
* @param _in {boolean}
|
||||
* @returns {Promise<boolean>}
|
||||
**/
|
||||
function BoolInBoolOut(_in) {
|
||||
return wails.Call(GreetService("BoolInBoolOut", _in));
|
||||
}
|
||||
BoolInBoolOut: function(_in) { wails.CallByID(2424639793, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Float32InFloat32Out
|
||||
@ -39,9 +30,7 @@ function BoolInBoolOut(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function Float32InFloat32Out(_in) {
|
||||
return wails.Call(GreetService("Float32InFloat32Out", _in));
|
||||
}
|
||||
Float32InFloat32Out: function(_in) { wails.CallByID(3132595881, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Float64InFloat64Out
|
||||
@ -49,9 +38,7 @@ function Float32InFloat32Out(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function Float64InFloat64Out(_in) {
|
||||
return wails.Call(GreetService("Float64InFloat64Out", _in));
|
||||
}
|
||||
Float64InFloat64Out: function(_in) { wails.CallByID(2182412247, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -59,9 +46,7 @@ function Float64InFloat64Out(_in) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int16InIntOut
|
||||
@ -69,9 +54,7 @@ function Greet(name) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function Int16InIntOut(_in) {
|
||||
return wails.Call(GreetService("Int16InIntOut", _in));
|
||||
}
|
||||
Int16InIntOut: function(_in) { wails.CallByID(3306292566, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int16PointerInAndOutput
|
||||
@ -79,9 +62,7 @@ function Int16InIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function Int16PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("Int16PointerInAndOutput", _in));
|
||||
}
|
||||
Int16PointerInAndOutput: function(_in) { wails.CallByID(1754277916, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int32InIntOut
|
||||
@ -89,9 +70,7 @@ function Int16PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function Int32InIntOut(_in) {
|
||||
return wails.Call(GreetService("Int32InIntOut", _in));
|
||||
}
|
||||
Int32InIntOut: function(_in) { wails.CallByID(1909469092, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int32PointerInAndOutput
|
||||
@ -99,9 +78,7 @@ function Int32InIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function Int32PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("Int32PointerInAndOutput", _in));
|
||||
}
|
||||
Int32PointerInAndOutput: function(_in) { wails.CallByID(4251088558, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int64InIntOut
|
||||
@ -109,9 +86,7 @@ function Int32PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function Int64InIntOut(_in) {
|
||||
return wails.Call(GreetService("Int64InIntOut", _in));
|
||||
}
|
||||
Int64InIntOut: function(_in) { wails.CallByID(1343888303, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int64PointerInAndOutput
|
||||
@ -119,9 +94,7 @@ function Int64InIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function Int64PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("Int64PointerInAndOutput", _in));
|
||||
}
|
||||
Int64PointerInAndOutput: function(_in) { wails.CallByID(2205561041, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int8InIntOut
|
||||
@ -129,9 +102,7 @@ function Int64PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function Int8InIntOut(_in) {
|
||||
return wails.Call(GreetService("Int8InIntOut", _in));
|
||||
}
|
||||
Int8InIntOut: function(_in) { wails.CallByID(572240879, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.Int8PointerInAndOutput
|
||||
@ -139,9 +110,7 @@ function Int8InIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function Int8PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("Int8PointerInAndOutput", _in));
|
||||
}
|
||||
Int8PointerInAndOutput: function(_in) { wails.CallByID(2189402897, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.IntInIntOut
|
||||
@ -149,9 +118,7 @@ function Int8PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function IntInIntOut(_in) {
|
||||
return wails.Call(GreetService("IntInIntOut", _in));
|
||||
}
|
||||
IntInIntOut: function(_in) { wails.CallByID(642881729, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.IntPointerInAndOutput
|
||||
@ -159,9 +126,7 @@ function IntInIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function IntPointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("IntPointerInAndOutput", _in));
|
||||
}
|
||||
IntPointerInAndOutput: function(_in) { wails.CallByID(1066151743, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.IntPointerInputNamedOutputs
|
||||
@ -169,9 +134,7 @@ function IntPointerInAndOutput(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null, void>}
|
||||
**/
|
||||
function IntPointerInputNamedOutputs(_in) {
|
||||
return wails.Call(GreetService("IntPointerInputNamedOutputs", _in));
|
||||
}
|
||||
IntPointerInputNamedOutputs: function(_in) { wails.CallByID(2718999663, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.MapIntInt
|
||||
@ -179,9 +142,7 @@ function IntPointerInputNamedOutputs(_in) {
|
||||
* @param _in {map}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function MapIntInt(_in) {
|
||||
return wails.Call(GreetService("MapIntInt", _in));
|
||||
}
|
||||
MapIntInt: function(_in) { wails.CallByID(2386486356, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.MapIntPointerInt
|
||||
@ -189,9 +150,7 @@ function MapIntInt(_in) {
|
||||
* @param _in {map}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function MapIntPointerInt(_in) {
|
||||
return wails.Call(GreetService("MapIntPointerInt", _in));
|
||||
}
|
||||
MapIntPointerInt: function(_in) { wails.CallByID(550413585, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.MapIntSliceInt
|
||||
@ -199,9 +158,7 @@ function MapIntPointerInt(_in) {
|
||||
* @param _in {map}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function MapIntSliceInt(_in) {
|
||||
return wails.Call(GreetService("MapIntSliceInt", _in));
|
||||
}
|
||||
MapIntSliceInt: function(_in) { wails.CallByID(2900172572, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.MapIntSliceIntInMapIntSliceIntOut
|
||||
@ -209,9 +166,7 @@ function MapIntSliceInt(_in) {
|
||||
* @param _in {map}
|
||||
* @returns {Promise<map>}
|
||||
**/
|
||||
function MapIntSliceIntInMapIntSliceIntOut(_in) {
|
||||
return wails.Call(GreetService("MapIntSliceIntInMapIntSliceIntOut", _in));
|
||||
}
|
||||
MapIntSliceIntInMapIntSliceIntOut: function(_in) { wails.CallByID(881980169, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NoInputsStringOut
|
||||
@ -219,9 +174,7 @@ function MapIntSliceIntInMapIntSliceIntOut(_in) {
|
||||
*
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function NoInputsStringOut() {
|
||||
return wails.Call(GreetService("NoInputsStringOut"));
|
||||
}
|
||||
NoInputsStringOut: function() { wails.CallByID(1075577233, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.PointerBoolInBoolOut
|
||||
@ -229,9 +182,7 @@ function NoInputsStringOut() {
|
||||
* @param _in {boolean | null}
|
||||
* @returns {Promise<boolean | null>}
|
||||
**/
|
||||
function PointerBoolInBoolOut(_in) {
|
||||
return wails.Call(GreetService("PointerBoolInBoolOut", _in));
|
||||
}
|
||||
PointerBoolInBoolOut: function(_in) { wails.CallByID(3589606958, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.PointerFloat32InFloat32Out
|
||||
@ -239,9 +190,7 @@ function PointerBoolInBoolOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function PointerFloat32InFloat32Out(_in) {
|
||||
return wails.Call(GreetService("PointerFloat32InFloat32Out", _in));
|
||||
}
|
||||
PointerFloat32InFloat32Out: function(_in) { wails.CallByID(224675106, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.PointerFloat64InFloat64Out
|
||||
@ -249,9 +198,7 @@ function PointerFloat32InFloat32Out(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function PointerFloat64InFloat64Out(_in) {
|
||||
return wails.Call(GreetService("PointerFloat64InFloat64Out", _in));
|
||||
}
|
||||
PointerFloat64InFloat64Out: function(_in) { wails.CallByID(2124953624, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.PointerMapIntInt
|
||||
@ -259,9 +206,7 @@ function PointerFloat64InFloat64Out(_in) {
|
||||
* @param _in {map | null}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function PointerMapIntInt(_in) {
|
||||
return wails.Call(GreetService("PointerMapIntInt", _in));
|
||||
}
|
||||
PointerMapIntInt: function(_in) { wails.CallByID(3516977899, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.PointerStringInStringOut
|
||||
@ -269,9 +214,7 @@ function PointerMapIntInt(_in) {
|
||||
* @param _in {string | null}
|
||||
* @returns {Promise<string | null>}
|
||||
**/
|
||||
function PointerStringInStringOut(_in) {
|
||||
return wails.Call(GreetService("PointerStringInStringOut", _in));
|
||||
}
|
||||
PointerStringInStringOut: function(_in) { wails.CallByID(229603958, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StringArrayInputNamedOutput
|
||||
@ -279,9 +222,7 @@ function PointerStringInStringOut(_in) {
|
||||
* @param _in {string[]}
|
||||
* @returns {Promise<string[]>}
|
||||
**/
|
||||
function StringArrayInputNamedOutput(_in) {
|
||||
return wails.Call(GreetService("StringArrayInputNamedOutput", _in));
|
||||
}
|
||||
StringArrayInputNamedOutput: function(_in) { wails.CallByID(3678582682, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StringArrayInputNamedOutputs
|
||||
@ -289,9 +230,7 @@ function StringArrayInputNamedOutput(_in) {
|
||||
* @param _in {string[]}
|
||||
* @returns {Promise<string[], void>}
|
||||
**/
|
||||
function StringArrayInputNamedOutputs(_in) {
|
||||
return wails.Call(GreetService("StringArrayInputNamedOutputs", _in));
|
||||
}
|
||||
StringArrayInputNamedOutputs: function(_in) { wails.CallByID(319259595, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StringArrayInputStringArrayOut
|
||||
@ -299,9 +238,7 @@ function StringArrayInputNamedOutputs(_in) {
|
||||
* @param _in {string[]}
|
||||
* @returns {Promise<string[]>}
|
||||
**/
|
||||
function StringArrayInputStringArrayOut(_in) {
|
||||
return wails.Call(GreetService("StringArrayInputStringArrayOut", _in));
|
||||
}
|
||||
StringArrayInputStringArrayOut: function(_in) { wails.CallByID(383995060, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StringArrayInputStringOut
|
||||
@ -309,9 +246,7 @@ function StringArrayInputStringArrayOut(_in) {
|
||||
* @param _in {string[]}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function StringArrayInputStringOut(_in) {
|
||||
return wails.Call(GreetService("StringArrayInputStringOut", _in));
|
||||
}
|
||||
StringArrayInputStringOut: function(_in) { wails.CallByID(1091960237, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StructInputStructOutput
|
||||
@ -319,9 +254,7 @@ function StringArrayInputStringOut(_in) {
|
||||
* @param _in {main.Person}
|
||||
* @returns {Promise<main.Person>}
|
||||
**/
|
||||
function StructInputStructOutput(_in) {
|
||||
return wails.Call(GreetService("StructInputStructOutput", _in));
|
||||
}
|
||||
StructInputStructOutput: function(_in) { wails.CallByID(3835643147, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StructPointerInputErrorOutput
|
||||
@ -329,9 +262,7 @@ function StructInputStructOutput(_in) {
|
||||
* @param _in {main.Person | null}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
function StructPointerInputErrorOutput(_in) {
|
||||
return wails.Call(GreetService("StructPointerInputErrorOutput", _in));
|
||||
}
|
||||
StructPointerInputErrorOutput: function(_in) { wails.CallByID(2447692557, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.StructPointerInputStructPointerOutput
|
||||
@ -339,9 +270,7 @@ function StructPointerInputErrorOutput(_in) {
|
||||
* @param _in {main.Person | null}
|
||||
* @returns {Promise<main.Person | null>}
|
||||
**/
|
||||
function StructPointerInputStructPointerOutput(_in) {
|
||||
return wails.Call(GreetService("StructPointerInputStructPointerOutput", _in));
|
||||
}
|
||||
StructPointerInputStructPointerOutput: function(_in) { wails.CallByID(2943477349, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt16InUIntOut
|
||||
@ -349,9 +278,7 @@ function StructPointerInputStructPointerOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function UInt16InUIntOut(_in) {
|
||||
return wails.Call(GreetService("UInt16InUIntOut", _in));
|
||||
}
|
||||
UInt16InUIntOut: function(_in) { wails.CallByID(3401034892, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt16PointerInAndOutput
|
||||
@ -359,9 +286,7 @@ function UInt16InUIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function UInt16PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("UInt16PointerInAndOutput", _in));
|
||||
}
|
||||
UInt16PointerInAndOutput: function(_in) { wails.CallByID(1236957573, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt32InUIntOut
|
||||
@ -369,9 +294,7 @@ function UInt16PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function UInt32InUIntOut(_in) {
|
||||
return wails.Call(GreetService("UInt32InUIntOut", _in));
|
||||
}
|
||||
UInt32InUIntOut: function(_in) { wails.CallByID(1160383782, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt32PointerInAndOutput
|
||||
@ -379,9 +302,7 @@ function UInt32InUIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function UInt32PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("UInt32PointerInAndOutput", _in));
|
||||
}
|
||||
UInt32PointerInAndOutput: function(_in) { wails.CallByID(1739300671, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt64InUIntOut
|
||||
@ -389,9 +310,7 @@ function UInt32PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function UInt64InUIntOut(_in) {
|
||||
return wails.Call(GreetService("UInt64InUIntOut", _in));
|
||||
}
|
||||
UInt64InUIntOut: function(_in) { wails.CallByID(793803239, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt64PointerInAndOutput
|
||||
@ -399,9 +318,7 @@ function UInt64InUIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function UInt64PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("UInt64PointerInAndOutput", _in));
|
||||
}
|
||||
UInt64PointerInAndOutput: function(_in) { wails.CallByID(1403757716, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt8InUIntOut
|
||||
@ -409,9 +326,7 @@ function UInt64PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function UInt8InUIntOut(_in) {
|
||||
return wails.Call(GreetService("UInt8InUIntOut", _in));
|
||||
}
|
||||
UInt8InUIntOut: function(_in) { wails.CallByID(2988345717, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UInt8PointerInAndOutput
|
||||
@ -419,9 +334,7 @@ function UInt8InUIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function UInt8PointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("UInt8PointerInAndOutput", _in));
|
||||
}
|
||||
UInt8PointerInAndOutput: function(_in) { wails.CallByID(518250834, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UIntInUIntOut
|
||||
@ -429,9 +342,7 @@ function UInt8PointerInAndOutput(_in) {
|
||||
* @param _in {number}
|
||||
* @returns {Promise<number>}
|
||||
**/
|
||||
function UIntInUIntOut(_in) {
|
||||
return wails.Call(GreetService("UIntInUIntOut", _in));
|
||||
}
|
||||
UIntInUIntOut: function(_in) { wails.CallByID(2836661285, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.UIntPointerInAndOutput
|
||||
@ -439,56 +350,7 @@ function UIntInUIntOut(_in) {
|
||||
* @param _in {number | null}
|
||||
* @returns {Promise<number | null>}
|
||||
**/
|
||||
function UIntPointerInAndOutput(_in) {
|
||||
return wails.Call(GreetService("UIntPointerInAndOutput", _in));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
ArrayInt,
|
||||
BoolInBoolOut,
|
||||
Float32InFloat32Out,
|
||||
Float64InFloat64Out,
|
||||
Greet,
|
||||
Int16InIntOut,
|
||||
Int16PointerInAndOutput,
|
||||
Int32InIntOut,
|
||||
Int32PointerInAndOutput,
|
||||
Int64InIntOut,
|
||||
Int64PointerInAndOutput,
|
||||
Int8InIntOut,
|
||||
Int8PointerInAndOutput,
|
||||
IntInIntOut,
|
||||
IntPointerInAndOutput,
|
||||
IntPointerInputNamedOutputs,
|
||||
MapIntInt,
|
||||
MapIntPointerInt,
|
||||
MapIntSliceInt,
|
||||
MapIntSliceIntInMapIntSliceIntOut,
|
||||
NoInputsStringOut,
|
||||
PointerBoolInBoolOut,
|
||||
PointerFloat32InFloat32Out,
|
||||
PointerFloat64InFloat64Out,
|
||||
PointerMapIntInt,
|
||||
PointerStringInStringOut,
|
||||
StringArrayInputNamedOutput,
|
||||
StringArrayInputNamedOutputs,
|
||||
StringArrayInputStringArrayOut,
|
||||
StringArrayInputStringOut,
|
||||
StructInputStructOutput,
|
||||
StructPointerInputErrorOutput,
|
||||
StructPointerInputStructPointerOutput,
|
||||
UInt16InUIntOut,
|
||||
UInt16PointerInAndOutput,
|
||||
UInt32InUIntOut,
|
||||
UInt32PointerInAndOutput,
|
||||
UInt64InUIntOut,
|
||||
UInt64PointerInAndOutput,
|
||||
UInt8InUIntOut,
|
||||
UInt8PointerInAndOutput,
|
||||
UIntInUIntOut,
|
||||
UIntPointerInAndOutput,
|
||||
UIntPointerInAndOutput: function(_in) { wails.CallByID(1367187362, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -2,14 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -17,13 +13,6 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
@ -2,14 +2,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -17,13 +13,6 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {main} from './models';
|
||||
|
||||
function GreetService(method) {
|
||||
return {
|
||||
packageName: "main",
|
||||
serviceName: "GreetService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
@ -19,9 +14,7 @@ function GreetService(method) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
function Greet(name) {
|
||||
return wails.Call(GreetService("Greet", name));
|
||||
}
|
||||
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NewPerson
|
||||
@ -29,15 +22,7 @@ function Greet(name) {
|
||||
* @param name {string}
|
||||
* @returns {Promise<main.Person | null>}
|
||||
**/
|
||||
function NewPerson(name) {
|
||||
return wails.Call(GreetService("NewPerson", name));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
Greet,
|
||||
NewPerson,
|
||||
NewPerson: function(name) { wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -4,14 +4,9 @@
|
||||
|
||||
import {services} from './models';
|
||||
|
||||
function OtherService(method) {
|
||||
return {
|
||||
packageName: "services",
|
||||
serviceName: "OtherService",
|
||||
methodName: method,
|
||||
args: Array.prototype.slice.call(arguments, 1),
|
||||
};
|
||||
}
|
||||
window.go = window.go || {};
|
||||
window.go.services = {
|
||||
OtherService: {
|
||||
|
||||
/**
|
||||
* OtherService.Yay
|
||||
@ -19,14 +14,7 @@ function OtherService(method) {
|
||||
*
|
||||
* @returns {Promise<services.Address | null>}
|
||||
**/
|
||||
function Yay() {
|
||||
return wails.Call(OtherService("Yay"));
|
||||
}
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.services = {
|
||||
OtherService: {
|
||||
Yay,
|
||||
Yay: function() { wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/wailsapp/wails/v3/internal/flags"
|
||||
)
|
||||
|
||||
func TestInstall(t *testing.T) {
|
||||
type args struct {
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
options *flags.Init
|
||||
@ -25,6 +25,10 @@ func TestInstall(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
// Remove test directory if it exists
|
||||
if _, err := os.Stat(tt.options.ProjectName); err == nil {
|
||||
_ = os.RemoveAll(tt.options.ProjectName)
|
||||
}
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := Install(tt.options); (err != nil) != tt.wantErr {
|
||||
t.Errorf("Install() error = %v, wantErr %v", err, tt.wantErr)
|
||||
|
Loading…
Reference in New Issue
Block a user