Update parser and bindings generation

Update tests
This commit is contained in:
Lea Anthony 2023-11-05 18:02:36 +11:00
commit 075eb1fa3f
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405
34 changed files with 784 additions and 106 deletions

View file

@ -102,7 +102,8 @@ func sanitiseJSVarName(name string) string {
return name
}
func GenerateBinding(structName string, method *BoundMethod) (string, []string) {
func GenerateBinding(structName string, method *BoundMethod) (string, []string, []string) {
var namespacedStructs []string
var models []string
result := strings.ReplaceAll(bindingTemplate, "{{structName}}", structName)
result = strings.ReplaceAll(result, "{{methodName}}", method.Name)
@ -114,11 +115,16 @@ func GenerateBinding(structName string, method *BoundMethod) (string, []string)
result = strings.ReplaceAll(result, "Comments", comments)
var params string
for _, input := range method.Inputs {
inputName := sanitiseJSVarName(input.Name)
pkgName := getPackageName(input)
if pkgName != "" {
models = append(models, pkgName)
if input.Type.IsStruct {
nsStruct := input.NamespacedStructType()
namespacedStructs = append(namespacedStructs, nsStruct)
}
}
params += " * @param " + sanitiseJSVarName(input.Name) + " {" + input.JSType() + "}\n"
params += " * @param " + inputName + " {" + input.JSType() + "}\n"
}
params = strings.TrimSuffix(params, "\n")
if len(params) == 0 {
@ -156,6 +162,10 @@ func GenerateBinding(structName string, method *BoundMethod) (string, []string)
if jsType == "error" {
jsType = "void"
}
if output.Type.IsStruct {
namespacedStructs = append(namespacedStructs, output.NamespacedStructType())
jsType = output.NamespacedStructVariable()
}
returns += jsType + ", "
}
returns = strings.TrimSuffix(returns, ", ")
@ -163,7 +173,7 @@ func GenerateBinding(structName string, method *BoundMethod) (string, []string)
}
result = strings.ReplaceAll(result, " * @returns {Promise<string>}", returns)
return result, lo.Uniq(models)
return result, lo.Uniq(models), lo.Uniq(namespacedStructs)
}
func getPackageName(input *Parameter) string {
@ -217,6 +227,7 @@ func GenerateBindings(bindings map[string]map[string][]*BoundMethod) map[string]
sort.Strings(packageNames)
for _, packageName := range packageNames {
var allModels []string
var allNamespacedStructs []string
packageBindings := bindings[packageName]
structNames := lo.Keys(packageBindings)
@ -239,7 +250,8 @@ window.go = window.go || {};
return methods[i].Name < methods[j].Name
})
for _, method := range methods {
thisBinding, models := GenerateBinding(structName, method)
thisBinding, models, namespacedStructs := GenerateBinding(structName, method)
allNamespacedStructs = append(allNamespacedStructs, namespacedStructs...)
allModels = append(allModels, models...)
result[normalisedPackageNames[packageName]] += thisBinding
}
@ -247,19 +259,14 @@ window.go = window.go || {};
}
result[normalisedPackageNames[packageName]] += "};\n"
// add imports
/* if len(allModels) > 0 {
allModels := lo.Uniq(allModels)
var models []string
for _, model := range allModels {
models = append(models, normalisedPackageNames[model])
}
sort.Strings(models)
result[normalisedPackageNames[packageName]] += "\n"
imports := "import {" + strings.Join(models, ", ") + "} from './models';\n"
result[normalisedPackageNames[packageName]] = imports + result[normalisedPackageNames[packageName]]
}
*/
if len(allNamespacedStructs) > 0 {
typedefs := "/**\n"
for _, namespacedStruct := range lo.Uniq(allNamespacedStructs) {
typedefs += " * @typedef {import('./models')." + namespacedStruct + "} " + strings.ReplaceAll(namespacedStruct, ".", "") + "\n"
}
typedefs += " */\n\n"
result[normalisedPackageNames[packageName]] = typedefs + result[normalisedPackageNames[packageName]]
}
result[normalisedPackageNames[packageName]] = header + result[normalisedPackageNames[packageName]]
}

View file

@ -41,6 +41,23 @@ type Parameter struct {
Type *ParameterType
}
func (p *Parameter) NamespacedStructType() string {
var typeName string
if p.Type.Package != "" {
parts := strings.Split(p.Type.Package, "/")
typeName = parts[len(parts)-1] + "."
}
return typeName + p.Type.Name
}
func (p *Parameter) NamespacedStructVariable() string {
var typeName string
if p.Type.Package != "" {
parts := strings.Split(p.Type.Package, "/")
typeName = parts[len(parts)-1]
}
return typeName + p.Type.Name
}
func (p *Parameter) JSType() string {
// Convert type to javascript equivalent type
var typeName string
@ -57,11 +74,8 @@ func (p *Parameter) JSType() string {
// if the type is a struct, we need to add the package name
if p.Type.IsStruct {
if p.Type.Package != "" {
parts := strings.Split(p.Type.Package, "/")
typeName = parts[len(parts)-1] + "." + typeName
// TODO: Check if this is a duplicate package name
}
typeName = p.NamespacedStructType()
typeName = strings.ReplaceAll(typeName, ".", "")
}
// Add slice suffix

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {main} from './models';
/**
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
@ -14,15 +17,14 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @returns {Promise<main.Person | null>}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {services} from './models';
/**
* @typedef {import('./models').services.Address} servicesAddress
*/
window.go = window.go || {};
window.go.services = {
@ -12,9 +15,8 @@ window.go.services = {
* OtherService.Yay
*
*
* @returns {Promise<services.Address | null>}
* @returns {Promise<servicesAddress>}
**/
Yay: function() { wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
Yay: function() { return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -13,6 +13,6 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -13,7 +13,7 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
OtherService: {
@ -23,6 +23,6 @@ window.go.main = {
*
* @returns {Promise<void>}
**/
Hello: function() { wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
Hello: function() { return wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -13,7 +13,7 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
OtherService: {
@ -23,6 +23,6 @@ window.go.main = {
*
* @returns {Promise<void>}
**/
Hello: function() { wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
Hello: function() { return wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {main} from './models';
/**
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
@ -14,15 +17,14 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @returns {Promise<main.Person | null>}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {services} from './models';
/**
* @typedef {import('./models').services.Address} servicesAddress
*/
window.go = window.go || {};
window.go.services = {
@ -12,9 +15,8 @@ window.go.services = {
* OtherService.Yay
*
*
* @returns {Promise<services.Address | null>}
* @returns {Promise<servicesAddress>}
**/
Yay: function() { wails.CallByID(469445984, ...Array.prototype.slice.call(arguments, 0)); },
Yay: function() { return wails.CallByID(469445984, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {main} from './models';
/**
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
@ -14,7 +17,7 @@ window.go.main = {
* @param _in {number[]}
* @returns {Promise<void>}
**/
ArrayInt: function(_in) { wails.CallByID(3862002418, ...Array.prototype.slice.call(arguments, 0)); },
ArrayInt: function(_in) { return wails.CallByID(3862002418, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.BoolInBoolOut
@ -22,7 +25,7 @@ window.go.main = {
* @param _in {boolean}
* @returns {Promise<boolean>}
**/
BoolInBoolOut: function(_in) { wails.CallByID(2424639793, ...Array.prototype.slice.call(arguments, 0)); },
BoolInBoolOut: function(_in) { return wails.CallByID(2424639793, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Float32InFloat32Out
@ -30,7 +33,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
Float32InFloat32Out: function(_in) { wails.CallByID(3132595881, ...Array.prototype.slice.call(arguments, 0)); },
Float32InFloat32Out: function(_in) { return wails.CallByID(3132595881, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Float64InFloat64Out
@ -38,7 +41,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
Float64InFloat64Out: function(_in) { wails.CallByID(2182412247, ...Array.prototype.slice.call(arguments, 0)); },
Float64InFloat64Out: function(_in) { return wails.CallByID(2182412247, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Greet
@ -46,7 +49,7 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int16InIntOut
@ -54,7 +57,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
Int16InIntOut: function(_in) { wails.CallByID(3306292566, ...Array.prototype.slice.call(arguments, 0)); },
Int16InIntOut: function(_in) { return wails.CallByID(3306292566, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int16PointerInAndOutput
@ -62,7 +65,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int16PointerInAndOutput: function(_in) { wails.CallByID(1754277916, ...Array.prototype.slice.call(arguments, 0)); },
Int16PointerInAndOutput: function(_in) { return wails.CallByID(1754277916, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int32InIntOut
@ -70,7 +73,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
Int32InIntOut: function(_in) { wails.CallByID(1909469092, ...Array.prototype.slice.call(arguments, 0)); },
Int32InIntOut: function(_in) { return wails.CallByID(1909469092, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int32PointerInAndOutput
@ -78,7 +81,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int32PointerInAndOutput: function(_in) { wails.CallByID(4251088558, ...Array.prototype.slice.call(arguments, 0)); },
Int32PointerInAndOutput: function(_in) { return wails.CallByID(4251088558, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int64InIntOut
@ -86,7 +89,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
Int64InIntOut: function(_in) { wails.CallByID(1343888303, ...Array.prototype.slice.call(arguments, 0)); },
Int64InIntOut: function(_in) { return wails.CallByID(1343888303, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int64PointerInAndOutput
@ -94,7 +97,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int64PointerInAndOutput: function(_in) { wails.CallByID(2205561041, ...Array.prototype.slice.call(arguments, 0)); },
Int64PointerInAndOutput: function(_in) { return wails.CallByID(2205561041, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int8InIntOut
@ -102,7 +105,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
Int8InIntOut: function(_in) { wails.CallByID(572240879, ...Array.prototype.slice.call(arguments, 0)); },
Int8InIntOut: function(_in) { return wails.CallByID(572240879, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.Int8PointerInAndOutput
@ -110,7 +113,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
Int8PointerInAndOutput: function(_in) { wails.CallByID(2189402897, ...Array.prototype.slice.call(arguments, 0)); },
Int8PointerInAndOutput: function(_in) { return wails.CallByID(2189402897, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.IntInIntOut
@ -118,7 +121,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
IntInIntOut: function(_in) { wails.CallByID(642881729, ...Array.prototype.slice.call(arguments, 0)); },
IntInIntOut: function(_in) { return wails.CallByID(642881729, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.IntPointerInAndOutput
@ -126,7 +129,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
IntPointerInAndOutput: function(_in) { wails.CallByID(1066151743, ...Array.prototype.slice.call(arguments, 0)); },
IntPointerInAndOutput: function(_in) { return wails.CallByID(1066151743, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.IntPointerInputNamedOutputs
@ -134,7 +137,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null, void>}
**/
IntPointerInputNamedOutputs: function(_in) { wails.CallByID(2718999663, ...Array.prototype.slice.call(arguments, 0)); },
IntPointerInputNamedOutputs: function(_in) { return wails.CallByID(2718999663, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.MapIntInt
@ -142,7 +145,7 @@ window.go.main = {
* @param _in {map}
* @returns {Promise<void>}
**/
MapIntInt: function(_in) { wails.CallByID(2386486356, ...Array.prototype.slice.call(arguments, 0)); },
MapIntInt: function(_in) { return wails.CallByID(2386486356, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.MapIntPointerInt
@ -150,7 +153,7 @@ window.go.main = {
* @param _in {map}
* @returns {Promise<void>}
**/
MapIntPointerInt: function(_in) { wails.CallByID(550413585, ...Array.prototype.slice.call(arguments, 0)); },
MapIntPointerInt: function(_in) { return wails.CallByID(550413585, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.MapIntSliceInt
@ -158,7 +161,7 @@ window.go.main = {
* @param _in {map}
* @returns {Promise<void>}
**/
MapIntSliceInt: function(_in) { wails.CallByID(2900172572, ...Array.prototype.slice.call(arguments, 0)); },
MapIntSliceInt: function(_in) { return wails.CallByID(2900172572, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.MapIntSliceIntInMapIntSliceIntOut
@ -166,7 +169,7 @@ window.go.main = {
* @param _in {map}
* @returns {Promise<map>}
**/
MapIntSliceIntInMapIntSliceIntOut: function(_in) { wails.CallByID(881980169, ...Array.prototype.slice.call(arguments, 0)); },
MapIntSliceIntInMapIntSliceIntOut: function(_in) { return wails.CallByID(881980169, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.NoInputsStringOut
@ -174,7 +177,7 @@ window.go.main = {
*
* @returns {Promise<string>}
**/
NoInputsStringOut: function() { wails.CallByID(1075577233, ...Array.prototype.slice.call(arguments, 0)); },
NoInputsStringOut: function() { return wails.CallByID(1075577233, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.PointerBoolInBoolOut
@ -182,7 +185,7 @@ window.go.main = {
* @param _in {boolean | null}
* @returns {Promise<boolean | null>}
**/
PointerBoolInBoolOut: function(_in) { wails.CallByID(3589606958, ...Array.prototype.slice.call(arguments, 0)); },
PointerBoolInBoolOut: function(_in) { return wails.CallByID(3589606958, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.PointerFloat32InFloat32Out
@ -190,7 +193,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
PointerFloat32InFloat32Out: function(_in) { wails.CallByID(224675106, ...Array.prototype.slice.call(arguments, 0)); },
PointerFloat32InFloat32Out: function(_in) { return wails.CallByID(224675106, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.PointerFloat64InFloat64Out
@ -198,7 +201,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
PointerFloat64InFloat64Out: function(_in) { wails.CallByID(2124953624, ...Array.prototype.slice.call(arguments, 0)); },
PointerFloat64InFloat64Out: function(_in) { return wails.CallByID(2124953624, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.PointerMapIntInt
@ -206,7 +209,7 @@ window.go.main = {
* @param _in {map | null}
* @returns {Promise<void>}
**/
PointerMapIntInt: function(_in) { wails.CallByID(3516977899, ...Array.prototype.slice.call(arguments, 0)); },
PointerMapIntInt: function(_in) { return wails.CallByID(3516977899, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.PointerStringInStringOut
@ -214,7 +217,7 @@ window.go.main = {
* @param _in {string | null}
* @returns {Promise<string | null>}
**/
PointerStringInStringOut: function(_in) { wails.CallByID(229603958, ...Array.prototype.slice.call(arguments, 0)); },
PointerStringInStringOut: function(_in) { return wails.CallByID(229603958, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StringArrayInputNamedOutput
@ -222,7 +225,7 @@ window.go.main = {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
StringArrayInputNamedOutput: function(_in) { wails.CallByID(3678582682, ...Array.prototype.slice.call(arguments, 0)); },
StringArrayInputNamedOutput: function(_in) { return wails.CallByID(3678582682, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StringArrayInputNamedOutputs
@ -230,7 +233,7 @@ window.go.main = {
* @param _in {string[]}
* @returns {Promise<string[], void>}
**/
StringArrayInputNamedOutputs: function(_in) { wails.CallByID(319259595, ...Array.prototype.slice.call(arguments, 0)); },
StringArrayInputNamedOutputs: function(_in) { return wails.CallByID(319259595, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StringArrayInputStringArrayOut
@ -238,7 +241,7 @@ window.go.main = {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
StringArrayInputStringArrayOut: function(_in) { wails.CallByID(383995060, ...Array.prototype.slice.call(arguments, 0)); },
StringArrayInputStringArrayOut: function(_in) { return wails.CallByID(383995060, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StringArrayInputStringOut
@ -246,31 +249,31 @@ window.go.main = {
* @param _in {string[]}
* @returns {Promise<string>}
**/
StringArrayInputStringOut: function(_in) { wails.CallByID(1091960237, ...Array.prototype.slice.call(arguments, 0)); },
StringArrayInputStringOut: function(_in) { return wails.CallByID(1091960237, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StructInputStructOutput
*
* @param _in {main.Person}
* @returns {Promise<main.Person>}
* @param _in {mainPerson}
* @returns {Promise<mainPerson>}
**/
StructInputStructOutput: function(_in) { wails.CallByID(3835643147, ...Array.prototype.slice.call(arguments, 0)); },
StructInputStructOutput: function(_in) { return wails.CallByID(3835643147, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StructPointerInputErrorOutput
*
* @param _in {main.Person | null}
* @param _in {mainPerson | null}
* @returns {Promise<void>}
**/
StructPointerInputErrorOutput: function(_in) { wails.CallByID(2447692557, ...Array.prototype.slice.call(arguments, 0)); },
StructPointerInputErrorOutput: function(_in) { return wails.CallByID(2447692557, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.StructPointerInputStructPointerOutput
*
* @param _in {main.Person | null}
* @returns {Promise<main.Person | null>}
* @param _in {mainPerson | null}
* @returns {Promise<mainPerson>}
**/
StructPointerInputStructPointerOutput: function(_in) { wails.CallByID(2943477349, ...Array.prototype.slice.call(arguments, 0)); },
StructPointerInputStructPointerOutput: function(_in) { return wails.CallByID(2943477349, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt16InUIntOut
@ -278,7 +281,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
UInt16InUIntOut: function(_in) { wails.CallByID(3401034892, ...Array.prototype.slice.call(arguments, 0)); },
UInt16InUIntOut: function(_in) { return wails.CallByID(3401034892, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt16PointerInAndOutput
@ -286,7 +289,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt16PointerInAndOutput: function(_in) { wails.CallByID(1236957573, ...Array.prototype.slice.call(arguments, 0)); },
UInt16PointerInAndOutput: function(_in) { return wails.CallByID(1236957573, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt32InUIntOut
@ -294,7 +297,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
UInt32InUIntOut: function(_in) { wails.CallByID(1160383782, ...Array.prototype.slice.call(arguments, 0)); },
UInt32InUIntOut: function(_in) { return wails.CallByID(1160383782, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt32PointerInAndOutput
@ -302,7 +305,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt32PointerInAndOutput: function(_in) { wails.CallByID(1739300671, ...Array.prototype.slice.call(arguments, 0)); },
UInt32PointerInAndOutput: function(_in) { return wails.CallByID(1739300671, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt64InUIntOut
@ -310,7 +313,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
UInt64InUIntOut: function(_in) { wails.CallByID(793803239, ...Array.prototype.slice.call(arguments, 0)); },
UInt64InUIntOut: function(_in) { return wails.CallByID(793803239, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt64PointerInAndOutput
@ -318,7 +321,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt64PointerInAndOutput: function(_in) { wails.CallByID(1403757716, ...Array.prototype.slice.call(arguments, 0)); },
UInt64PointerInAndOutput: function(_in) { return wails.CallByID(1403757716, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt8InUIntOut
@ -326,7 +329,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
UInt8InUIntOut: function(_in) { wails.CallByID(2988345717, ...Array.prototype.slice.call(arguments, 0)); },
UInt8InUIntOut: function(_in) { return wails.CallByID(2988345717, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UInt8PointerInAndOutput
@ -334,7 +337,7 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UInt8PointerInAndOutput: function(_in) { wails.CallByID(518250834, ...Array.prototype.slice.call(arguments, 0)); },
UInt8PointerInAndOutput: function(_in) { return wails.CallByID(518250834, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UIntInUIntOut
@ -342,7 +345,7 @@ window.go.main = {
* @param _in {number}
* @returns {Promise<number>}
**/
UIntInUIntOut: function(_in) { wails.CallByID(2836661285, ...Array.prototype.slice.call(arguments, 0)); },
UIntInUIntOut: function(_in) { return wails.CallByID(2836661285, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.UIntPointerInAndOutput
@ -350,7 +353,6 @@ window.go.main = {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
UIntPointerInAndOutput: function(_in) { wails.CallByID(1367187362, ...Array.prototype.slice.call(arguments, 0)); },
UIntPointerInAndOutput: function(_in) { return wails.CallByID(1367187362, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -13,6 +13,6 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -13,6 +13,6 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {main} from './models';
/**
* @typedef {import('./models').main.Person} mainPerson
*/
window.go = window.go || {};
window.go.main = {
@ -14,15 +17,14 @@ window.go.main = {
* @param name {string}
* @returns {Promise<string>}
**/
Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
/**
* GreetService.NewPerson
* NewPerson creates a new person
* @param name {string}
* @returns {Promise<main.Person | null>}
* @returns {Promise<mainPerson>}
**/
NewPerson: function(name) { wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -2,7 +2,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {services} from './models';
/**
* @typedef {import('./models').services.Address} servicesAddress
*/
window.go = window.go || {};
window.go.services = {
@ -12,9 +15,8 @@ window.go.services = {
* OtherService.Yay
*
*
* @returns {Promise<services.Address | null>}
* @returns {Promise<servicesAddress>}
**/
Yay: function() { wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
Yay: function() { return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
},
};

View file

@ -0,0 +1,125 @@
version: '3'
vars:
APP_NAME: "test"
tasks:
pre-build:
summary: Pre-build hooks
post-build:
summary: Post-build hooks
install-frontend-deps:
summary: Install frontend dependencies
dir: frontend
sources:
- package.json
- package-lock.json
generates:
- node_modules/*
preconditions:
- sh: npm version
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
cmds:
- npm install
build-frontend:
summary: Build the frontend project
dir: frontend
deps:
- install-frontend-deps
cmds:
- npm run build
build:darwin:
summary: Builds the application
platforms:
- darwin
cmds:
- task: pre-build
- task: build-frontend
- go build -gcflags=all="-N -l" -o bin/testapp
- task: post-build
env:
CGO_CFLAGS: "-mmacosx-version-min=10.13"
CGO_LDFLAGS: "-mmacosx-version-min=10.13"
MACOSX_DEPLOYMENT_TARGET: "10.13"
build:windows:
summary: Builds the application for Windows
platforms:
- windows
cmds:
- task: pre-build
- task: build-frontend
- go build -gcflags=all="-N -l" -o bin/testapp.exe
- task: post-build
build:
summary: Builds the application
cmds:
- task: build:darwin
- task: build:windows
generate-icons:
summary: Generates Windows `.ico` and Mac `.icns` files from an image
dir: build
cmds:
# Generates both .ico and .icns files
- wails generate icons -input appicon.png
build-app-prod-darwin:
summary: Creates a production build of the application
cmds:
- task: pre-build
- task: build-frontend
- GOOS=darwin GOARCH={{.ARCH}} go build -tags production -ldflags="-w -s" -o build/bin/{{.APP_NAME}}
- task: post-build
env:
CGO_CFLAGS: "-mmacosx-version-min=10.13"
CGO_LDFLAGS: "-mmacosx-version-min=10.13"
MACOSX_DEPLOYMENT_TARGET: "10.13"
vars:
ARCH: $GOARCH
create-app-bundle:
summary: Builds a `.app` bundle
cmds:
- mkdir -p {{.APP_NAME}}.app/Contents/{MacOS,Resources}
- cp build/icons.icns {{.APP_NAME}}.app/Contents/Resources
- cp build/bin/{{.APP_NAME}} {{.APP_NAME}}.app/Contents/MacOS
- cp build/Info.plist {{.APP_NAME}}.app/Contents
package-darwin-arm64:
summary: Packages a production build of the application into a `.app` bundle
platform: darwin
deps:
- task: build-app-prod-darwin
vars:
ARCH: arm64
- generate-icons
cmds:
- task: create-app-bundle
generate:syso:
dir: build
platform: windows
cmds:
- wails generate syso -arch {{.ARCH}} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
vars:
ARCH: $GOARCH
package:windows:
summary: Packages a production build of the application into a `.exe` bundle
platform: windows
deps:
- generate-icons
cmds:
- task: generate:syso
vars:
ARCH: amd64
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{.APP_NAME}}.exe
- powershell Remove-item wails.syso

View file

@ -0,0 +1,32 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>My Product Name</string>
<key>CFBundleExecutable</key>
<string>test</string>
<key>CFBundleIdentifier</key>
<string>com.wails.test</string>
<key>CFBundleVersion</key>
<string>v1.0.0</string>
<key>CFBundleGetInfoString</key>
<string>This is a comment</string>
<key>CFBundleShortVersionString</key>
<string>v1.0.0</string>
<key>CFBundleIconFile</key>
<string>icons</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2023 My Company Name</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
</dict>
</plist>

View file

@ -0,0 +1,27 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>My Product Name</string>
<key>CFBundleExecutable</key>
<string>test</string>
<key>CFBundleIdentifier</key>
<string>com.wails.test</string>
<key>CFBundleVersion</key>
<string>v1.0.0</string>
<key>CFBundleGetInfoString</key>
<string>This is a comment</string>
<key>CFBundleShortVersionString</key>
<string>v1.0.0</string>
<key>CFBundleIconFile</key>
<string>icons</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2023 My Company Name</string>
</dict>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

View file

@ -0,0 +1 @@
# Wails + Svelte

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/wails.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wails + Svelte</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View file

@ -0,0 +1,33 @@
{
"compilerOptions": {
"moduleResolution": "Node",
"target": "ESNext",
"module": "ESNext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable this if you'd like to use dynamic types.
*/
"checkJs": true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
}

View file

@ -0,0 +1,16 @@
{
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.0",
"svelte": "^3.54.0",
"vite": "^4.0.0"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

@ -0,0 +1,45 @@
<script>
import svelteLogo from './assets/svelte.svg'
import Counter from './lib/Counter.svelte'
</script>
<main>
<div>
<a href="https://wails.io" target="_blank" rel="noreferrer">
<img src="/wails.png" class="logo" alt="Wails Logo" />
</a>
<a href="https://svelte.dev" target="_blank" rel="noreferrer">
<img src={svelteLogo} class="logo svelte" alt="Svelte Logo" />
</a>
</div>
<h1>Wails + Svelte</h1>
<div class="card">
<Counter />
</div>
<p>
Check out <a href="https://github.com/sveltejs/kit#readme" target="_blank" rel="noreferrer">SvelteKit</a>, the official Svelte app framework powered by Vite!
</p>
<p class="read-the-docs">
Click on the Wails and Svelte logos to learn more
</p>
</main>
<style>
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.svelte:hover {
filter: drop-shadow(0 0 2em #ff3e00aa);
}
.read-the-docs {
color: #888;
}
</style>

View file

@ -0,0 +1,81 @@
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
.card {
padding: 2em;
}
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="26.6" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 308"><path fill="#FF3E00" d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.198 82.198 0 0 0-37.135 55.056a86.566 86.566 0 0 0 8.536 55.576a82.425 82.425 0 0 0-12.296 30.719a87.596 87.596 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.182 82.182 0 0 0 37.135-55.057a86.601 86.601 0 0 0-8.53-55.577a82.409 82.409 0 0 0 12.29-30.718a87.573 87.573 0 0 0-14.963-66.244"></path><path fill="#FFF" d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.685 52.685 0 0 1-9.003-39.85a49.978 49.978 0 0 1 1.713-6.693l1.35-4.115l3.671 2.697a92.447 92.447 0 0 0 28.036 14.007l2.663.808l-.245 2.659a16.067 16.067 0 0 0 2.89 10.656a17.143 17.143 0 0 0 18.397 6.828a15.786 15.786 0 0 0 4.403-1.935l71.67-45.672a14.922 14.922 0 0 0 6.734-9.977a15.923 15.923 0 0 0-2.713-12.011a17.156 17.156 0 0 0-18.404-6.832a15.78 15.78 0 0 0-4.396 1.933l-27.35 17.434a52.298 52.298 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.681 52.681 0 0 1-9.004-39.849a49.428 49.428 0 0 1 22.34-33.114l71.664-45.677a52.218 52.218 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.685 52.685 0 0 1 9.004 39.85a50.559 50.559 0 0 1-1.713 6.692l-1.35 4.116l-3.67-2.693a92.373 92.373 0 0 0-28.037-14.013l-2.664-.809l.246-2.658a16.099 16.099 0 0 0-2.89-10.656a17.143 17.143 0 0 0-18.398-6.828a15.786 15.786 0 0 0-4.402 1.935l-71.67 45.674a14.898 14.898 0 0 0-6.73 9.975a15.9 15.9 0 0 0 2.709 12.012a17.156 17.156 0 0 0 18.404 6.832a15.841 15.841 0 0 0 4.402-1.935l27.345-17.427a52.147 52.147 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.681 52.681 0 0 1 9.003 39.848a49.453 49.453 0 0 1-22.34 33.12l-71.664 45.673a52.218 52.218 0 0 1-14.563 6.398"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,10 @@
<script>
let count = 0
const increment = () => {
count += 1
}
</script>
<button on:click={increment}>
count is {count}
</button>

View file

@ -0,0 +1,8 @@
import './app.css'
import App from './App.svelte'
const app = new App({
target: document.getElementById('app'),
})
export default app

View file

@ -0,0 +1,2 @@
/// <reference types="svelte" />
/// <reference types="vite/client" />

View file

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
})

View file

@ -0,0 +1,45 @@
module changeme
go 1.21
require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/ebitengine/purego v0.4.0-alpha.4 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.2.0 // indirect
github.com/go-git/go-git/v5 v5.3.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
github.com/leaanthony/u v1.1.0 // indirect
github.com/lmittmann/tint v1.0.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/wailsapp/go-webview2 v1.0.9 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.13.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
replace github.com/wailsapp/wails/v3 => D:\GolandProjects\wails\v3

View file

@ -0,0 +1,154 @@
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ebitengine/purego v0.4.0-alpha.4 h1:Y7yIV06Yo5M2BAdD7EVPhfp6LZ0tEcQo5770OhYUVes=
github.com/ebitengine/purego v0.4.0-alpha.4/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ=
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk=
github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc=
github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=
github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/lmittmann/tint v1.0.0 h1:fzEj70K1L58uyoePQxKe+ezDZJ5pybiWGdA0JeFvvyw=
github.com/lmittmann/tint v1.0.0/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/wailsapp/go-webview2 v1.0.9 h1:lrU+q0cf1wgLdR69rN+ZnRtMJNaJRrcQ4ELxoO7/xjs=
github.com/wailsapp/go-webview2 v1.0.9/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

View file

@ -0,0 +1,43 @@
package main
import (
"embed"
_ "embed"
"log"
"github.com/wailsapp/wails/v3/pkg/application"
)
//go:embed frontend/dist
var assets embed.FS
func main() {
app := application.New(application.Options{
Name: "test",
Description: "A demo of using raw HTML & CSS",
Assets: application.AssetOptions{
FS: assets,
},
Mac: application.MacOptions{
ApplicationShouldTerminateAfterLastWindowClosed: true,
},
})
// Create window
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Title: "Plain Bundle",
CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
Mac: application.MacWindow{
InvisibleTitleBarHeight: 50,
Backdrop: application.MacBackdropTranslucent,
TitleBar: application.MacTitleBarHiddenInset,
},
URL: "/",
})
err := app.Run()
if err != nil {
log.Fatal(err)
}
}