func GetMatchedTemplate(event *output.ResultEvent) string {
	builder := &strings.Builder{}
	builder.WriteString(event.TemplateID)
	if event.MatcherName != "" {
		builder.WriteString(":")
		builder.WriteString(event.MatcherName)
	}
	if event.ExtractorName != "" {
		builder.WriteString(":")
		builder.WriteString(event.ExtractorName)
	}
	template := builder.String()
	return template
}
GetMatchedTemplate returns the matched template from a result event
package format
import (
	"bytes"
	"fmt"
	"strconv"
	"strings"
	"github.com/projectdiscovery/nuclei/v2/pkg/catalog/config"
	"github.com/projectdiscovery/nuclei/v2/pkg/utils"
	"github.com/projectdiscovery/nuclei/v2/pkg/model"
	"github.com/projectdiscovery/nuclei/v2/pkg/output"
	"github.com/projectdiscovery/nuclei/v2/pkg/types"
)
func Summary(event *output.ResultEvent) string {
	template := GetMatchedTemplate(event)
	builder := &strings.Builder{}
	builder.WriteString(types.ToString(event.Info.Name))
	builder.WriteString(" (")
	builder.WriteString(template)
	builder.WriteString(") found on ")
	builder.WriteString(event.Host)
	data := builder.String()
	return data
}
func MarkdownDescription(event *output.ResultEvent) string {  
	template := GetMatchedTemplate(event)
	builder := &bytes.Buffer{}
	builder.WriteString("**Details**: **")
	builder.WriteString(template)
	builder.WriteString("** ")
	builder.WriteString(" matched at ")
	builder.WriteString(event.Host)
	builder.WriteString("\n\n**Protocol**: ")
	builder.WriteString(strings.ToUpper(event.Type))
	builder.WriteString("\n\n**Full URL**: ")
	builder.WriteString(event.Matched)
	builder.WriteString("\n\n**Timestamp**: ")
	builder.WriteString(event.Timestamp.Format("Mon Jan 2 15:04:05 -0700 MST 2006"))
	builder.WriteString("\n\n**Template Information**\n\n| Key | Value |\n|---|---|\n")
	builder.WriteString(ToMarkdownTableString(&event.Info))
	if event.Request != "" {
		builder.WriteString("\n**Request**\n\n```http\n")
		builder.WriteString(event.Request)
		builder.WriteString("\n```\n")
	}
	if event.Response != "" {
		builder.WriteString("\n**Response**\n\n```http\n")
		if len(event.Response) > 5*1024 {
			builder.WriteString(event.Response[:5*1024])
			builder.WriteString(".... Truncated ....")
		} else {
			builder.WriteString(event.Response)
		}
		builder.WriteString("\n```\n")
	}
	if len(event.ExtractedResults) > 0 || len(event.Metadata) > 0 {
		builder.WriteString("\n**Extra Information**\n\n")
		if len(event.ExtractedResults) > 0 {
			builder.WriteString("**Extracted results**:\n\n")
			for _, v := range event.ExtractedResults {
				builder.WriteString("- ")
				builder.WriteString(v)
				builder.WriteString("\n")
			}
			builder.WriteString("\n")
		}
		if len(event.Metadata) > 0 {
			builder.WriteString("**Metadata**:\n\n")
			for k, v := range event.Metadata {
				builder.WriteString("- ")
				builder.WriteString(k)
				builder.WriteString(": ")
				builder.WriteString(types.ToString(v))
				builder.WriteString("\n")
			}
			builder.WriteString("\n")
		}
	}
	if event.Interaction != nil {
		builder.WriteString("**Interaction Data**\n---\n")
		builder.WriteString(event.Interaction.Protocol)
		if event.Interaction.QType != "" {
			builder.WriteString(" (")
			builder.WriteString(event.Interaction.QType)
			builder.WriteString(")")
		}
		builder.WriteString(" Interaction from ")
		builder.WriteString(event.Interaction.RemoteAddress)
		builder.WriteString(" at ")
		builder.WriteString(event.Interaction.UniqueID)
		if event.Interaction.RawRequest != "" {
			builder.WriteString("\n\n**Interaction Request**\n\n```\n")
			builder.WriteString(event.Interaction.RawRequest)
			builder.WriteString("\n```\n")
		}
		if event.Interaction.RawResponse != "" {
			builder.WriteString("\n**Interaction Response**\n\n```\n")
			builder.WriteString(event.Interaction.RawResponse)
			builder.WriteString("\n```\n")
		}
	}
	reference := event.Info.Reference
	if !reference.IsEmpty() {
		builder.WriteString("\nReferences: \n")
		referenceSlice := reference.ToSlice()
		for i, item := range referenceSlice {
			builder.WriteString("- ")
			builder.WriteString(item)
			if len(referenceSlice)-1 != i {
				builder.WriteString("\n")
			}
		}
	}
	builder.WriteString("\n")
	if event.CURLCommand != "" {
		builder.WriteString("\n**CURL Command**\n```\n")
		builder.WriteString(event.CURLCommand)
		builder.WriteString("\n```")
	}
	builder.WriteString(fmt.Sprintf("\n---\nGenerated by [Nuclei %s](https://github.com/projectdiscovery/nuclei)", config.Version))
	data := builder.String()
	return data
}