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