Added support for nilsafe getters GetNameOrNil() *string => additional feature that allows (panic free) optional chaining
Added support for imported packages []*time.Time (bug fix)
Added support for []*Struct and []Struct fields (bug fix)
Features
This extension generates pointer receivers. Setters always return the struct pointer to allow method chaining.
How to use
Select a struct and all of its fields
Shift+CMD+P Select command & return
Note: The first line in your selection should always be a struct declaration. The extension will only generate getters and setters for selected fields.
Extension Settings
None at the moment
Known Issues
Nested structs are not yet supported. Workaround => create a separate type for the nested struct and use it as a field in the parent struct.
// not working
type Nested struct {
a *A
nest struct {
nest2 struct {
nest3 struct {
b *B
}
}
}
}
// working
type Nested struct {
a *A
nest *Nest2
}
type Nest2 struct {
nest2 *Nest3
}
type Nest3 struct {
b *B
}
Release Notes
1.0.5
Improved handling of any / interface{} types
1.0.4
Added support for map[string]interface{} types
1.0.3
Insert code below the struct declaration instead of EOF