code: func AssertWithTemplate(t *testing.T, name string, data interface{}, actualData []byte) {
  	if *update {
  		err := Update(name, actualData)
  		if err != nil {
  			t.Error(err)
  			t.FailNow()
  		}
  	}
  
  	err := compare(name, data, actualData)
  	if err != nil {
  		switch err.(type) {
  		case errFixtureNotFound:
  			t.Error(err)
  			t.FailNow()
  		case errFixtureMismatch:
  			t.Error(err)
  		default:
  			t.Error(err)
  		}
  	}
  }
docs: // Assert compares the actual data received with the expected data in the
  // golden files after executing it as a template with data parameter.
  // If the update flag is set, it will also update the golden file.
  // `name` refers to the name of the test and it should typically be unique
  // within the package. Also it should be a valid file name (so keeping to
  // `a-z0-9\-\_` is a good idea).