// Comment writes comment data without any encoding.
19953
func (w *standardSMLWriter) Comment(comment string) error {
	return w.context.Writef("{# %s #}", comment)
}
1017978
func (s *AssociateVPCWithHostedZoneInput) SetComment(v string) *AssociateVPCWithHostedZoneInput {
	s.Comment = &v
	return s
}
537818
func (comment *UserPostComment) Post() (ExistingPost, error) {
	var post *UserPost
	var err error
	if post, err = NewUserPost(comment.Hpid); err != nil {
		return nil, err
	}
	return ExistingPost(post), nil
}
1104867
func (m *GormCommentRepository) Save(ctx context.Context, comment *Comment, modifierID uuid.UUID) error {
	c := Comment{}
	tx := m.db.Where("id=?", comment.ID).First(&c)
	if tx.RecordNotFound() {
		log.Error(ctx, map[string]interface{}{
			"comment_id": comment.ID,
		}, "comment not found!")
		// treating this as a not found error: the fact that we're using number internal is implementation detail
		return errors.NewNotFoundError("comment", comment.ID.String())
	}
	if err := tx.Error; err != nil {
		log.Error(ctx, map[string]interface{}{
			"comment_id": comment.ID,
			"err":        err,
		}, "comment search operation failed!")

		return errors.NewInternalError(ctx, err)
	}
	// make sure no comment is created with an empty 'markup' value
	if comment.Markup == "" {
		comment.Markup = rendering.SystemMarkupDefault
	}
	tx = tx.Save(comment)
	if err := tx.Error; err != nil {
		log.Error(ctx, map[string]interface{}{
			"comment_id": comment.ID,
			"err":        err,
		}, "unable to save the comment!")

		return errors.NewInternalError(ctx, err)
	}
	// save a revision of the updated comment
	if err := m.revisionRepository.Create(ctx, modifierID, RevisionTypeUpdate, *comment); err != nil {
		return errs.Wrapf(err, "error while saving work item")
	}
	log.Debug(ctx, map[string]interface{}{
		"comment_id": comment.ID,
	}, "Comment updated!")

	return nil
}
1355036
func (s *ChangeInfo) SetComment(v string) *ChangeInfo {
	s.Comment = &v
	return s
}
1319726
func (s *DistributionConfig) SetComment(v string) *DistributionConfig {
	s.Comment = &v
	return s
}
430624
func (c *jiraClientImpl) PostComment(issueID string, commentToPost string) error {
	_, _, err := c.Client.Issue.AddComment(issueID, &jira.Comment{Body: commentToPost})
	return err
}
555170
func (f *File) HeaderComment(comment string) {
	f.headers = append(f.headers, comment)
}
340579
func (s *MaintenanceWindowRunCommandParameters) SetComment(v string) *MaintenanceWindowRunCommandParameters {
	s.Comment = &v
	return s
}
854418
func (nb *NodeBuilder) CommentNode(comment string) error {
	if nb.done {
		return errors.New(ErrBuilder, errorMessages, "building is already done")
	}
	if len(nb.stack) > 0 {
		nb.stack[len(nb.stack)-1].appendCommentNode(comment)
		return nil
	}
	return errors.New(ErrBuilder, errorMessages, "no opening tag for comment")
}
611073
func (s *DisassociateVPCFromHostedZoneInput) SetComment(v string) *DisassociateVPCFromHostedZoneInput {
	s.Comment = &v
	return s
}
1280133
func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary {
	s.Comment = &v
	return s
}
362049
func (s *TrafficPolicy) SetComment(v string) *TrafficPolicy {
	s.Comment = &v
	return s
}
867645
func (s *Job) SetComment(v string) *Job {
	s.Comment = &v
	return s
}
201714
func ConvertComment(request *http.Request, comment comment.Comment, additional ...CommentConvertFunc) *app.Comment {
	relatedURL := rest.AbsoluteURL(request, app.CommentsHref(comment.ID))
	relatedCreatorLink := rest.AbsoluteURL(request, fmt.Sprintf("%s/%s", usersEndpoint, comment.Creator))
	c := &app.Comment{
		Type: APIStringTypeComments,
		ID:   &comment.ID,
		Attributes: &app.CommentAttributes{
			Body:         &comment.Body,
			BodyRendered: ptr.String(rendering.RenderMarkupToHTML(comment.Body, comment.Markup)),
			Markup:       ptr.String(rendering.NilSafeGetMarkup(&comment.Markup)),
			CreatedAt:    &comment.CreatedAt,
			UpdatedAt:    &comment.UpdatedAt,
		},
		Relationships: &app.CommentRelations{
			Creator: &app.RelationGeneric{
				Data: &app.GenericData{
					Type: ptr.String(APIStringTypeUser),
					ID:   ptr.String(comment.Creator.String()),
					Links: &app.GenericLinks{
						Related: &relatedCreatorLink,
					},
				},
			},
			CreatedBy: &app.CommentCreatedBy{ // Keep old API style until all cients are updated
				Data: &app.IdentityRelationData{
					Type: APIStringTypeUser,
					ID:   &comment.Creator,
				},
				Links: &app.GenericLinks{
					Related: &relatedCreatorLink,
				},
			},
		},
		Links: &app.GenericLinks{
			Self:    &relatedURL,
			Related: &relatedURL,
		},
	}
	if comment.ParentCommentID.Valid == true {
		c.Relationships.ParentComment = &app.RelationGeneric{
			Data: &app.GenericData{
				Type: ptr.String(APIStringTypeComments),
				ID:   ptr.String(comment.ParentCommentID.UUID.String()),
			},
		}
	}
	for _, add := range additional {
		add(request, &comment, c)
	}
	return c
}
493544
func (p Comment) String() string {
	var buf bytes.Buffer
	if p.TranslatorComment != "" {
		ss := strings.Split(p.TranslatorComment, "\n")
		for i := 0; i < len(ss); i++ {
			fmt.Fprintf(&buf, "# %s\n", ss[i])
		}
	}
	if p.ExtractedComment != "" {
		ss := strings.Split(p.ExtractedComment, "\n")
		for i := 0; i < len(ss); i++ {
			fmt.Fprintf(&buf, "#. %s\n", ss[i])
		}
	}
	if a, b := len(p.ReferenceFile), len(p.ReferenceLine); a != 0 && a == b {
		fmt.Fprintf(&buf, "#:")
		for i := 0; i < len(p.ReferenceFile); i++ {
			fmt.Fprintf(&buf, " %s:%d", p.ReferenceFile[i], p.ReferenceLine[i])
		}
		fmt.Fprintf(&buf, "\n")
	}
	if len(p.Flags) != 0 {
		fmt.Fprintf(&buf, "#, %s", p.Flags[0])
		for i := 1; i < len(p.Flags); i++ {
			fmt.Fprintf(&buf, ", %s", p.Flags[i])
		}
		fmt.Fprintf(&buf, "\n")
	}
	if p.PrevMsgContext != "" {
		s := encodeCommentPoString(p.PrevMsgContext)
		fmt.Fprintf(&buf, "#| msgctxt %s\n", s)
	}
	if p.PrevMsgId != "" {
		s := encodeCommentPoString(p.PrevMsgId)
		fmt.Fprintf(&buf, "#| msgid %s\n", s)
	}
	return buf.String()
}
603334
func (s *StreamingDistributionConfig) SetComment(v string) *StreamingDistributionConfig {
	s.Comment = &v
	return s
}