mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 07:05:50 +01:00
34 lines
677 B
Go
34 lines
677 B
Go
package binding_test
|
|
|
|
type WithoutFields struct {
|
|
}
|
|
|
|
func (s WithoutFields) Get() WithoutFields {
|
|
return s
|
|
}
|
|
|
|
var WithoutFieldsTest = BindingTest{
|
|
name: "StructWithoutFields",
|
|
structs: []interface{}{
|
|
&WithoutFields{},
|
|
},
|
|
exemptions: nil,
|
|
shouldError: false,
|
|
want: `
|
|
export namespace binding_test {
|
|
|
|
export class WithoutFields {
|
|
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new WithoutFields(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
|
|
}
|
|
}
|
|
|
|
}`,
|
|
}
|