code: func walkTree(c *Client, key string, branches map[string]bool) error {
  	log.Debug("listing %s from vault", key)
  
  	// strip trailing slash as long as it's not the only character
  	if last := len(key) - 1; last > 0 && key[last] == '/' {
  		key = key[:last]
  	}
  	if branches[key] {
  		// already processed this branch
  		return nil
  	}
  	branches[key] = true
  
  	resp, err := c.client.Logical().List(key)
  
  	if err != nil {
  		log.Debug("there was an error extracting %s", key)
  		return err
  	}
  	if resp == nil || resp.Data == nil || resp.Data["keys"] == nil {
  		return nil
  	}
  
  	switch resp.Data["keys"].(type) {
  	case []interface{}:
  		// expected
  	default:
  		log.Warning("key list type of '%s' is not supported (%T)", key, resp.Data["keys"])
  		return nil
  	}
  
  	keyList := resp.Data["keys"].([]interface{})
  	for _, innerKey := range keyList {
  		switch innerKey.(type) {
  
  		case string:
  			innerKey = path.Join(key, "/", innerKey.(string))
  			walkTree(c, innerKey.(string), branches)
  
  		default: // we don't know how to handle other data types
  			log.Warning("type of '%s' is not supported (%T)", key, keyList)
  		}
  	}
  	return nil
  }
docs: // recursively walk the branches in the Vault, adding to branches map