Example #1
0
func (this *ImageInput) SetAttrsForCreate(att *tenpu.Attachment) (err error) {
	if this.OwnerId != "" {
		att.OwnerId = []string{this.OwnerId}
	}
	att.Category = this.Category
	return
}
Example #2
0
func (d *tenpuInput) SetAttrsForCreate(att *tenpu.Attachment) (err error) {
	if d.OwnerId == "" {
		err = errors.New("ownerId required")
		return
	}
	att.OwnerId = []string{d.OwnerId}
	return
}