// loadComment gets the Go comment from the specified line
// in the specified file.
182516
func loadComment(path string, line int) (string, bool) {
	f, err := os.Open(path)
	if err != nil {
		return "", false
	}
	defer f.Close()
	s := bufio.NewScanner(f)
	i := 1
	for s.Scan() {
		if i == line {
			text := s.Text()
			commentI := strings.Index(text, "//")
			if commentI == -1 {
				return "", false // no comment
			}
			text = text[commentI+2:]
			text = strings.TrimSpace(text)
			return text, true
		}
		i++
	}
	return "", false
}
1012584
func (s *GetCommentOutput) SetComment(v *Comment) *GetCommentOutput {
	s.Comment = v
	return s
}
1319726
func (s *DistributionConfig) SetComment(v string) *DistributionConfig {
	s.Comment = &v
	return s
}
481247
func (u *User) RequestComment() {
	packet := MumbleProto.RequestBlob{
		SessionComment: []uint32{u.Session},
	}
	u.client.Conn.WriteProto(&packet)
}
1184649
func (s *FieldLevelEncryptionProfileConfig) SetComment(v string) *FieldLevelEncryptionProfileConfig {
	s.Comment = &v
	return s
}
644477
func (s *Deployment) SetComment(v string) *Deployment {
	s.Comment = &v
	return s
}
1039716
func (s *CreateTrafficPolicyVersionInput) SetComment(v string) *CreateTrafficPolicyVersionInput {
	s.Comment = &v
	return s
}
946846
func (s *CommandInvocation) SetComment(v string) *CommandInvocation {
	s.Comment = &v
	return s
}
921590
func (s *DistributionSummary) SetComment(v string) *DistributionSummary {
	s.Comment = &v
	return s
}
729416
func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error) {
	sess := x.NewSession()
	defer sess.Close()
	if err = sess.Begin(); err != nil {
		return nil, err
	}

	comment, err = createComment(sess, opts)
	if err != nil {
		return nil, err
	}

	return comment, sess.Commit()
}
477678
func (s *CreateDeploymentInput) SetComment(v string) *CreateDeploymentInput {
	s.Comment = &v
	return s
}
1144734
func (g *Generator) PrintComments(path string) bool {
	if !g.writeOutput {
		return false
	}
	if loc, ok := g.file.comments[path]; ok {
		text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
		for _, line := range strings.Split(text, "\n") {
			g.P("// ", strings.TrimPrefix(line, " "))
		}
		return true
	}
	return false
}
65989
func loadCommentsAttributes(e Engine, comments []*Comment) (err error) {
	for i := range comments {
		if err = comments[i].loadAttributes(e); err != nil {
			return fmt.Errorf("loadAttributes [%d]: %v", comments[i].ID, err)
		}
	}

	return nil
}
1075911
func (i *Issue) GetComments() int {
	if i == nil || i.Comments == nil {
		return 0
	}
	return *i.Comments
}
407069
func NewComment(pos position, cs string, comment string) *Comment {
	return &Comment{
		pos: pos,

		cs:      cs,
		comment: comment,
	}
}
397222
func (s *UpdateTrafficPolicyCommentInput) SetComment(v string) *UpdateTrafficPolicyCommentInput {
	s.Comment = &v
	return s
}
846291
func (g *Generator) Comments(path string) string {
	loc, ok := g.file.comments[path]
	if !ok {
		return ""
	}
	text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
	return text
}