code: func (ts *Store) check(id string) (string, error) {
  	treepath := ts.GetPath(id)
  	hash, err := ioutil.ReadFile(filepath.Join(treepath, hashfilename))
  	if err != nil {
  		return "", errwrap.Wrap(ErrReadHashfile, err)
  	}
  	curhash, err := ts.Hash(id)
  	if err != nil {
  		return "", errwrap.Wrap(errors.New("cannot calculate tree hash"), err)
  	}
  	if curhash != string(hash) {
  		return "", fmt.Errorf("wrong tree hash: %s, expected: %s", curhash, hash)
  	}
  	return curhash, nil
  }
docs: // check calculates the actual rendered ACI's hash and verifies that it matches
  // the saved value. Returns the calculated hash.