//TODO: add content
197989
func GetDingtalkPayload(p api.Payloader, event HookEventType) (payload *DingtalkPayload, err error) {
	switch event {
	case HOOK_EVENT_CREATE:
		payload, err = getDingtalkCreatePayload(p.(*api.CreatePayload))
	case HOOK_EVENT_DELETE:
		payload, err = getDingtalkDeletePayload(p.(*api.DeletePayload))
	case HOOK_EVENT_FORK:
		payload, err = getDingtalkForkPayload(p.(*api.ForkPayload))
	case HOOK_EVENT_PUSH:
		payload, err = getDingtalkPushPayload(p.(*api.PushPayload))
	case HOOK_EVENT_ISSUES:
		payload, err = getDingtalkIssuesPayload(p.(*api.IssuesPayload))
	case HOOK_EVENT_ISSUE_COMMENT:
		payload, err = getDingtalkIssueCommentPayload(p.(*api.IssueCommentPayload))
	case HOOK_EVENT_PULL_REQUEST:
		payload, err = getDingtalkPullRequestPayload(p.(*api.PullRequestPayload))
	case HOOK_EVENT_RELEASE:
		payload, err = getDingtalkReleasePayload(p.(*api.ReleasePayload))
	}

	if err != nil {
		return nil, fmt.Errorf("event '%s': %v", event, err)
	}

	return payload, nil
}
507370
func (t *Tag) Append(b ...Body) {
	t.Body = append(t.Body, b...)
}
335291
func (dal *DjangoAdminLog) DjangoContentType(db XODB) (*DjangoContentType, error) {
	return DjangoContentTypeByID(db, dal.ContentTypeID.Float64)
}
46728
func (s *Sprocket) AddHeaderTreatment(ext string, HeaderTreatment types.ContentTreatmentInterface) {
	extInfo := s.getOrCreateExtensionInfo(ext)
	extInfo.HeaderTreatment = append(extInfo.HeaderTreatment, HeaderTreatment)
}
579311
func (resp *HttpResponse) Content() []byte {
	if resp == nil {
		return nil
	}
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err, " - read ", len(body), " bytes")
	}
	resp.Body.Close()
	return body
}
391746
func (section *Section) AddInclude(filename string) {
	section.includes = append(section.includes, filename)
}
1195731
func (ctx *Context) ContentType() string {
	return string(ctx.Request.Header.Peek(contentType))
}
70757
func (c *RawBinaryClient) Append(key string, value []byte) MutateResponse {
	item := &Item{
		Key:   key,
		Value: value,
	}

	c.mutex.Lock()
	defer c.mutex.Unlock()

	if resp := c.sendMutateRequest(opAppend, item, false); resp != nil {
		return resp
	}

	return c.receiveMutateResponse(opAppend, item.Key)
}
1257750
func (n *node) addChild(c nodeContent) (*node, error) {
	if !n.isAllowed(c, false) {
		return nil, errors.New(ErrDuplicate, errorMessages)
	}
	child := &node{
		container: n.container,
		parent:    n,
		content:   c,
	}
	n.children = append(n.children, child)
	return child, nil
}
380574
func NewMarkupContent(content, markup string) MarkupContent {
	return MarkupContent{Content: content, Markup: markup}
}
1209725
func SetContentType(contentType string) RequestFunc {
	return func(ctx context.Context, pub *amqp.Publishing, _ *amqp.Delivery) context.Context {
		pub.ContentType = contentType
		return ctx
	}
}
232093
func (c *Container) AddVolume(v ContainerVolume) {
	c.volumes = append(c.volumes, v)
}
106276
func (s *Segment) AddMetadata(key string, value string) {
	s.addMetadata(key, value)
}
256879
func (b *fixupBody) Content(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Diagnostics) {
	schema = b.effectiveSchema(schema)
	content, diags := b.original.Content(schema)
	return b.fixupContent(content), diags
}
1374201
func (mp *MultiProvider) Add(dgst digest.Digest, p content.Provider) {
	mp.mu.Lock()
	defer mp.mu.Unlock()
	mp.sub[dgst] = p
}
926989
func (text *Text) Append(rawSentence string, words []string) {
	if len(words) > 0 {
		parsedSentence := ParsedSentence{
			original: rawSentence,
			words:    words,
		}

		text.parsedSentences = append(
			text.parsedSentences,
			parsedSentence,
		)
	}
}
696910
func (s *RegionService) AddRegion(p *AddRegionParams) (*AddRegionResponse, error) {
	resp, err := s.cs.newRequest("addRegion", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddRegionResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}