mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
33 lines
600 B
Go
33 lines
600 B
Go
package binding_test
|
|||
|
|
|
||
|
|
type EscapedName struct {
|
||
|
|
Name string `json:"n.a.m.e"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (s EscapedName) Get() EscapedName {
|
||
|
|
return s
|
||
|
|
}
|
||
|
|
|
||
|
|
var EscapedNameTest = BindingTest{
|
||
|
|
name: "EscapedName",
|
||
|
|
structs: []interface{}{
|
||
|
|
&EscapedName{},
|
||
|
|
},
|
||
|
|
exemptions: nil,
|
||
|
|
shouldError: false,
|
||
|
|
want: `
|
||
|
|
export namespace binding_test {
|
||
|
|
export class EscapedName {
|
||
|
|
"n.a.m.e": string;
|
||
|
|
static createFrom(source: any = {}) {
|
||
|
|
return new EscapedName(source);
|
||
|
|
}
|
||
|
|
constructor(source: any = {}) {
|
||
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
||
|
|
this["n.a.m.e"] = source["n.a.m.e"];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
`,
|
||
|
|
}
|