func (t positiveTest) DeleteActual() {
	_ = os.Remove(t.ActualFile())
}
DeleteActual deletes the actual test output, if it exists
package goose_test
import (
	"bytes"
	"flag"
	"fmt"
	"go/ast"
	"go/parser"
	"go/token"
	"io/ioutil"
	"os"
	"path"
	"regexp"
	"strings"
	"testing"
	"github.com/stretchr/testify/assert"
	"github.com/tchajed/goose"
)
var updateGold = flag.Bool("update-gold",
	false,
	"update *.gold.v files in internal/examples/ with current output")
type test struct {
	name string
	path string
}
func newTest(dir string, name string) test {
	return test{name: name, path: path.Join(dir, name)}
}
func loadTests(dir string) []test {
	f, err := os.Open(dir)
	if err != nil {
		panic(err)
	}
	defer f.Close()
	names, err := f.Readdirnames(0)
	if err != nil {
		panic(err)
	}
	var tests []test
	for _, n := range names {
		tests = append(tests, newTest(dir, n))
	}
	return tests
}
func (t test) isDir() bool {
	info, _ := os.Stat(t.path)
	return info.IsDir()
}
type positiveTest struct {
	test
}
func (t positiveTest) GoldFile() string {
	return path.Join(t.path, t.name+".gold.v")
}
func (t positiveTest) ActualFile() string {
	return path.Join(t.path, t.name+".actual.v")
}
func (t positiveTest) Gold() string {
	expected, err := ioutil.ReadFile(t.GoldFile())
	if err != nil {
		return ""
	}
	return string(expected)
}
func (t positiveTest) UpdateGold(actual string) {
	err := ioutil.WriteFile(t.GoldFile(), []byte(actual), 0644)
	if err != nil {
		panic(err)
	}
}
func (t positiveTest) PutActual(actual string) {
	err := ioutil.WriteFile(t.ActualFile(), []byte(actual), 0644)
	if err != nil {
		panic(err)
	}
}