func CreateHandlerFromYAML(t *testing.T, content string) (handler http.Handler, clean func()) {
	path, clean := TempFile(t, content)
	config, err := Parse(path)
	if err != nil {
		t.Fatalf("Unable to parse %s: %v", path, err)
	}
	return CreateHandler(config), clean
}
CreateHandlerFromYAML builds the Sally handler from a yaml config string
package main
import (
	"io/ioutil"
	"net/http"
	"net/http/httptest"
	"os"
	"testing"
	"github.com/stretchr/testify/assert"
	"github.com/yosssi/gohtml"
)
func TempFile(t *testing.T, contents string) (path string, clean func()) {
	content := []byte(contents)
	tmpfile, err := ioutil.TempFile("", "sally-tmp")
	if err != nil {
		t.Fatal("Unable to create tmpfile", err)
	}
	if _, err := tmpfile.Write(content); err != nil {
		t.Fatal("Unable to write tmpfile", err)
	}
	if err := tmpfile.Close(); err != nil {
		t.Fatal("Unable to close tmpfile", err)
	}
	return tmpfile.Name(), func() {
		_ = os.Remove(tmpfile.Name())
	}
}