// NewFileUnlikeCommentType returns a new FileUnlikeCommentType instance
198551
func NewFileUnlikeCommentType(Description string) *FileUnlikeCommentType {
	s := new(FileUnlikeCommentType)
	s.Description = Description
	return s
}
860127
func NewBytesTypeDef(init ...*BytesTypeDef) *BytesTypeDef {
	var o *BytesTypeDef
	if len(init) == 1 {
		o = init[0]
	} else {
		o = new(BytesTypeDef)
	}
	return o
}
562272
func (f *File) countComments() int {
	count := 0
	for k := range f.XLSX {
		if strings.Contains(k, "xl/comments") {
			count++
		}
	}
	return count
}
1108286
func NewPaperDocEditCommentDetails(EventUuid string) *PaperDocEditCommentDetails {
	s := new(PaperDocEditCommentDetails)
	s.EventUuid = EventUuid
	return s
}
215257
func NewFileAddType(Description string) *FileAddType {
	s := new(FileAddType)
	s.Description = Description
	return s
}
1277680
func NewFileOrFolderLogInfo(Path *PathLogInfo) *FileOrFolderLogInfo {
	s := new(FileOrFolderLogInfo)
	s.Path = Path
	return s
}
849977
func NewFileDeleteCommentType(Description string) *FileDeleteCommentType {
	s := new(FileDeleteCommentType)
	s.Description = Description
	return s
}
655579
func NewShowcasePostCommentType(Description string) *ShowcasePostCommentType {
	s := new(ShowcasePostCommentType)
	s.Description = Description
	return s
}
950496
func ParseComments(fd *descriptor.FileDescriptorProto) Comments {
	comments := make(Comments)

	for _, loc := range fd.GetSourceCodeInfo().GetLocation() {
		if loc.GetLeadingComments() == "" && loc.GetTrailingComments() == "" && len(loc.GetLeadingDetachedComments()) == 0 {
			continue
		}

		path := loc.GetPath()
		key := make([]string, len(path))
		for idx, p := range path {
			key[idx] = strconv.Itoa(int(p))
		}

		comments[strings.Join(key, ".")] = newComment(loc)
	}

	return comments
}
1274129
func (f *file) lintTypeDoc(t *ast.TypeSpec, doc *ast.CommentGroup) {
	if !ast.IsExported(t.Name.Name) {
		return
	}
	if doc == nil {
		f.errorf(t, 1, link(docCommentsLink), category("comments"), "exported type %v should have comment or be unexported", t.Name)
		return
	}

	s := doc.Text()
	articles := [...]string{"A", "An", "The"}
	for _, a := range articles {
		if strings.HasPrefix(s, a+" ") {
			s = s[len(a)+1:]
			break
		}
	}
	if !strings.HasPrefix(s, t.Name.Name+" ") {
		f.errorf(doc, 1, link(docCommentsLink), category("comments"), `comment on exported type %v should be of the form "%v ..." (with optional leading article)`, t.Name, t.Name)
	}
}
592519
func (f *File) CgoPreamble(comment string) {
	f.cgoPreamble = append(f.cgoPreamble, comment)
}
611822
func newFileCompare(filename string) func(string) bool {
	fstat, fstatErr := os.Stat(filename)
	return func(compare string) bool {
		if filename == compare {
			return true
		}
		if fstatErr != nil {
			return false
		}
		if s, err := os.Stat(compare); err == nil {
			return os.SameFile(fstat, s)
		}
		return false
	}
}
13662
func NewCommentNode(data string, p Pos) *CommentNode {
	return &CommentNode{NewTextNode(data, p), TrimmableNode{}}
}
232960
func NewAllowDownloadEnabledType(Description string) *AllowDownloadEnabledType {
	s := new(AllowDownloadEnabledType)
	s.Description = Description
	return s
}
1193572
func NewFileCopyType(Description string) *FileCopyType {
	s := new(FileCopyType)
	s.Description = Description
	return s
}
1060809
func NewUserPostCommentWhere(description *UserPostComment) (comment *UserPostComment, e error) {
	comment = new(UserPostComment)
	if e = Db().Model(UserPostComment{}).Where(description).Scan(comment); e != nil {
		return nil, e
	}
	if comment.Hcid == 0 {
		return nil, fmt.Errorf("Requested UserPostComment does not exist")
	}
	return
}
731759
func NewMediaTypesWriter(filename string) (*MediaTypesWriter, error) {
	file, err := codegen.SourceFileFor(filename)
	if err != nil {
		return nil, err
	}
	return &MediaTypesWriter{SourceFile: file, Validator: codegen.NewValidator()}, nil
}