コード例 #1
0
ファイル: image_input.go プロジェクト: kobeld/duoerl
func (this *ImageInput) SetAttrsForCreate(att *tenpu.Attachment) (err error) {
	if this.OwnerId != "" {
		att.OwnerId = []string{this.OwnerId}
	}
	att.Category = this.Category
	return
}
コード例 #2
0
ファイル: handlers_test.go プロジェクト: jmptrader/tenpu
func (d *tenpuInput) SetAttrsForCreate(att *tenpu.Attachment) (err error) {
	if d.OwnerId == "" {
		err = errors.New("ownerId required")
		return
	}
	att.OwnerId = []string{d.OwnerId}
	return
}