You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: output.go
    path of file: ./repos/jaeles/core
    
    the code of the file until where you have to start completion: package core

import (
	"fmt"
	"github.com/fatih/color"
	"github.com/jaeles-project/jaeles/libs"
	"github.com/jaeles-project/jaeles/utils"
	jsoniter "github.com/json-iterator/go"
	"github.com/logrusorgru/aurora/v3"
	"github.com/spf13/cast"
	"net/url"
	"os"
	"path"
	"strings"
)

func (r *Record) Output() string {
	if !r.IsVulnerable {
		return ""
	}
	utils.InforF("[Found] %v", color.MagentaString(r.DetectString))

	// do passive analyze if got called from detector
	if strings.Contains(strings.ToLower(r.DetectString), "dopassive") {
		r.Passives()
	}

	// @NOTE: Refactor
	//var outputName string
	outputName := ""
	if r.Opt.NoOutput == false && r.Sign.Noutput == false {
		r.StoreOutput()
		outputName = r.RawOutput

		// @NOTE: Disable viewing from UI from v0.14
		//if !r.Opt.NoDB {
		//	database.ImportRecord(*r)
		//}
	}

	vulnInfo := fmt.Sprintf("[%v][%v] %v", r.Sign.ID, r.Sign.Info.Risk, r.Request.URL)
	if r.Opt.Quiet {
		lTarget := make(map[string]string)
		lTarget["VulnURL"] = r.Request.URL
		lTarget["Payload"] = r.Request.Payload
		lTarget["payload"] = r.Request.Payload
		lTarget["Status"] = fmt.Sprintf("%v", r.Response.StatusCode)
		lTarget["Length"] = fmt.Sprintf("%v", r.Response.Length)
		lTarget["Words"] = fmt.Sprintf("%v", int64(len(strings.Split(r.Response.Beautify, " "))))
		lTarget["Time"] = fmt.Sprintf("%v", r.Response.ResponseTime)
		fmt.Printf("%v\n", ResolveVariable(r.Opt.QuietFormat, lTarget))
	} else {
		// use this libs because we still want to see color when use chunked mode
		au := aurora.NewAurora(true)
		colorSignID := fmt.Sprintf("%s", au.Cyan(r.Sign.ID))
		colorRisk := fmt.Sprintf("%s", au.BrightCyan(r.Sign.Info.Risk))
		risk := strings.ToLower(r.Sign.Info.Risk)
		switch risk {
		case "critical":
			colorRisk = fmt.Sprintf("%s", au.Red(r.Sign.Info.Risk))
		case "high":
			colorRisk = fmt.Sprintf("%s", au.BrightRed(r.Sign.Info.Risk))
		case "medium":
			colorRisk = fmt.Sprintf("%s", au.Yellow(r.Sign.Info.Risk))
		case "low":
			colorRisk = fmt.Sprintf("%s", au.BrightMagenta(r.Sign.Info.Risk))
		case "info":
			colorRisk = fmt.Sprintf("%s", au.Blue(r.Sign.Info.Risk))
		case "potential":
			colorRisk = fmt.Sprintf("%s", au.Magenta(r.Sign.Info.Risk))
		}
		info := fmt.Sprintf("[%s][%s][%s] %s %s", au.Green("Vulnerable"), colorSignID, colorRisk, au.Green(r.Request.URL), au.Green(outputName))
		fmt.Println(info)
	}
	if r.Opt.FoundCmd != "" {
		// add some more variables for notification
		r.Request.Target["vulnInfo"] = vulnInfo
		r.Request.Target["vulnOut"] = outputName
		r.Request.Target["notiText"] = vulnInfo
		r.Opt.FoundCmd = ResolveVariable(r.Opt.FoundCmd, r.Request.Target)
		Execution(r.Opt.FoundCmd)
	}

	if len(r.Request.PostRun) > 0 
    
func (r *Record) Output() string {
	if !r.IsVulnerable {
		return ""
	}
	utils.InforF("[Found] %v", color.MagentaString(r.DetectString))

	// do passive analyze if got called from detector
	if strings.Contains(strings.ToLower(r.DetectString), "dopassive") {
		r.Passives()
	}

	// @NOTE: Refactor
	//var outputName string
	outputName := ""
	if r.Opt.NoOutput == false && r.Sign.Noutput == false {
		r.StoreOutput()
		outputName = r.RawOutput

		// @NOTE: Disable viewing from UI from v0.14
		//if !r.Opt.NoDB {
		//	database.ImportRecord(*r)
		//}
	}

	vulnInfo := fmt.Sprintf("[%v][%v] %v", r.Sign.ID, r.Sign.Info.Risk, r.Request.URL)
	if r.Opt.Quiet {
		lTarget := make(map[string]string)
		lTarget["VulnURL"] = r.Request.URL
		lTarget["Payload"] = r.Request.Payload
		lTarget["payload"] = r.Request.Payload
		lTarget["Status"] = fmt.Sprintf("%v", r.Response.StatusCode)
		lTarget["Length"] = fmt.Sprintf("%v", r.Response.Length)
		lTarget["Words"] = fmt.Sprintf("%v", int64(len(strings.Split(r.Response.Beautify, " "))))
		lTarget["Time"] = fmt.Sprintf("%v", r.Response.ResponseTime)
		fmt.Printf("%v\n", ResolveVariable(r.Opt.QuietFormat, lTarget))
	} else {
		// use this libs because we still want to see color when use chunked mode
		au := aurora.NewAurora(true)
		colorSignID := fmt.Sprintf("%s", au.Cyan(r.Sign.ID))
		colorRisk := fmt.Sprintf("%s", au.BrightCyan(r.Sign.Info.Risk))
		risk := strings.ToLower(r.Sign.Info.Risk)
		switch risk {
		case "critical":
			colorRisk = fmt.Sprintf("%s", au.Red(r.Sign.Info.Risk))
		case "high":
			colorRisk = fmt.Sprintf("%s", au.BrightRed(r.Sign.Info.Risk))
		case "medium":
			colorRisk = fmt.Sprintf("%s", au.Yellow(r.Sign.Info.Risk))
		case "low":
			colorRisk = fmt.Sprintf("%s", au.BrightMagenta(r.Sign.Info.Risk))
		case "info":
			colorRisk = fmt.Sprintf("%s", au.Blue(r.Sign.Info.Risk))
		case "potential":
			colorRisk = fmt.Sprintf("%s", au.Magenta(r.Sign.Info.Risk))
		}
		info := fmt.Sprintf("[%s][%s][%s] %s %s", au.Green("Vulnerable"), colorSignID, colorRisk, au.Green(r.Request.URL), au.Green(outputName))
		fmt.Println(info)
	}
	if r.Opt.FoundCmd != "" {
		// add some more variables for notification
		r.Request.Target["vulnInfo"] = vulnInfo
		r.Request.Target["vulnOut"] = outputName
		r.Request.Target["notiText"] = vulnInfo
		r.Opt.FoundCmd = ResolveVariable(r.Opt.FoundCmd, r.Request.Target)
		Execution(r.Opt.FoundCmd)
	}

	if len(r.Request.PostRun) > 0 {
		r.Request.PostRun = ResolveDetection(r.Request.PostRun, r.Request.Target)
		for _, postrun := range r.Request.PostRun {
			Execution(postrun)
		}
	}

	//// do passive analyze if got called from detector
	//if strings.Contains(strings.ToLower(r.DetectString), "invokesign") {
	//	r.InvokeSign()
	// options.SignFolder/sign-name.yaml
	//}

	if r.Sign.Donce {
		return "stop"
	}
	return "continue"
}