mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 03:52:41 +08:00
parent
1cd31573a9
commit
bf2d83d939
@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/wailsapp/wails/v2/internal/fs"
|
"github.com/wailsapp/wails/v2/internal/fs"
|
||||||
@ -32,8 +33,17 @@ func (b *Bindings) GenerateGoBindings(baseDir string) error {
|
|||||||
tsContent.WriteString(`// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
tsContent.WriteString(`// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
`)
|
`)
|
||||||
|
// Sort the method names alphabetically
|
||||||
|
methodNames := make([]string, 0, len(methods))
|
||||||
|
for methodName := range methods {
|
||||||
|
methodNames = append(methodNames, methodName)
|
||||||
|
}
|
||||||
|
sort.Strings(methodNames)
|
||||||
|
|
||||||
var importNamespaces slicer.StringSlicer
|
var importNamespaces slicer.StringSlicer
|
||||||
for methodName, methodDetails := range methods {
|
for _, methodName := range methodNames {
|
||||||
|
// Get the method details
|
||||||
|
methodDetails := methods[methodName]
|
||||||
|
|
||||||
// Generate JS
|
// Generate JS
|
||||||
var args slicer.StringSlicer
|
var args slicer.StringSlicer
|
||||||
|
Loading…
Reference in New Issue
Block a user