tcncloud/protoc-gen-persist

generate nil safe getters and setters

Closed this issue · 0 comments

type UserForUServ struct {
	Id        int64
	Name      string
	Friends   []byte
	CreatedOn interface{}
}
func (p *UserForUServ) GetId() int64                   { return p.Id }
func (p *UserForUServ) SetId(param int64)              { p.Id = param }

in these getters and setters, it is not safe if p is nil.