func (c Copyright) noticeTemplateByExtension(fileExtension string) (noticeTemplate string, ok bool) {
	if !strings.HasPrefix(fileExtension, ".") {
		fileExtension = "." + fileExtension
	}

	// check if there is a filetype specific notice template
	extensionNoticeTemplates := c.ExtensionNoticeTemplatesOrDefault()
	if noticeTemplate, ok = extensionNoticeTemplates[fileExtension]; ok {
		return
	}

	// check if we have a default notice template
	if c.NoticeTemplate != "" {
		noticeTemplate = c.NoticeTemplate
		ok = true
		return
	}

	// fail
	return
}
// noticeTemplateByExtension gets a notice template by extension or the default.
noticeTemplateByExtension gets a notice template by extension or the default.
// noticeTemplateByExtension gets a notice template by extension or the default .
func (c Copyright) noticeTemplateByExtension(fileExtension string) (noticeTemplate string, ok bool) {
	if !strings.HasPrefix(fileExtension, ".") {
		fileExtension = "." + fileExtension
	}
	extensionNoticeTemplates := c.ExtensionNoticeTemplatesOrDefault()
	if noticeTemplate, ok = extensionNoticeTemplates[fileExtension]; ok {
		return
	}
	if c.NoticeTemplate != "" {
		noticeTemplate = c.NoticeTemplate
		ok = true
		return
	}
	return
}
func ( c Copyright ) noticeTemplateByExtension ( fileExtension string ) ( noticeTemplate string , ok bool ) { if ! strings . HasPrefix ( fileExtension , " " ) { fileExtension = " " + fileExtension } extensionNoticeTemplates := c . ExtensionNoticeTemplatesOrDefault ( ) if noticeTemplate , ok = extensionNoticeTemplates [ fileExtension ] ; ok { return } if c . NoticeTemplate != " " { noticeTemplate = c . NoticeTemplate ok = true return } return }
noticeTemplateByExtension gets a notice template by extension or the default.
noticeTemplateByExtension gets a notice template by extension or the default .
// check if there is a filetype specific notice template // check if we have a default notice template // fail