mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 16:02:07 +08:00
parent
1cd31573a9
commit
bf2d83d939
@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"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
|
||||
// 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
|
||||
for methodName, methodDetails := range methods {
|
||||
for _, methodName := range methodNames {
|
||||
// Get the method details
|
||||
methodDetails := methods[methodName]
|
||||
|
||||
// Generate JS
|
||||
var args slicer.StringSlicer
|
||||
|
Loading…
Reference in New Issue
Block a user