func (c *Config) takeSnapshot(i ...interface{}) string {
	snapshot := &bytes.Buffer{}
	for _, v := range i {
		switch vt := v.(type) {
		case string:
			snapshot.WriteString(vt)
			snapshot.WriteString("\n")
		case []byte:
			snapshot.Write(vt)
			snapshot.WriteString("\n")
		default:
			c.getSpewConfig().Fdump(snapshot, v)
		}
	}
	return snapshot.String()
}
New snapshot format where some types are written out raw to the file
package cupaloy
import (
	"bytes"
	"errors"
	"io/ioutil"
	"os"
	"path/filepath"
	"runtime"
	"strings"
	"github.com/bradleyjkemp/cupaloy/v2/internal"
	"github.com/davecgh/go-spew/spew"
	"github.com/pmezard/go-difflib/difflib"
)
type TestingT interface {
	Helper()
	Failed() bool
	Error(args ...interface{})
	Fatal(args ...interface{})
	Name() string
}
func getNameOfCaller() string {
	pc, _, _, _ := runtime.Caller(2)  
	fullPath := runtime.FuncForPC(pc).Name()
	packageFunctionName := filepath.Base(fullPath)
	return strings.Replace(packageFunctionName, ".", "-", -1)
}
func envVariableSet(envVariable string) bool {
	_, varSet := os.LookupEnv(envVariable)
	return varSet
}
func (c *Config) getSpewConfig() *spew.ConfigState {
	return &spew.ConfigState{
		Indent:                  "  ",
		SortKeys:                true,  
		DisablePointerAddresses: true,  
		DisableCapacities:       true,  
		SpewKeys:                true,  
		DisableMethods:          !c.useStringerMethods,
	}
}
func (c *Config) snapshotFilePath(testName string) string {
	return filepath.Join(c.subDirName, testName+c.snapshotFileExtension)
}
func (c *Config) takeV1Snapshot(i ...interface{}) string {
	return c.getSpewConfig().Sdump(i...)
}