// GetTree returns an org tree
329757
func (o *OrgsClient) GetTree(ctx context.Context, orgID identity.ID) ([]OrgTreeSegment, error) {
	v := &url.Values{}
	v.Set("org_id", orgID.String())

	var segments []OrgTreeSegment
	err := o.client.RoundTrip(ctx, "GET", "/orgtree", v, nil, &segments)
	return segments, err
}
532964
func (o *Organizations) Get(ctx context.Context, query chronograf.OrganizationQuery) (*chronograf.Organization, error) {
	org, _, err := o.findOrg(query)
	return org, err
}
794846
func (c *ClaimTreeClient) Get(ctx context.Context, orgID *identity.ID,
	ownerID *identity.ID) (*ClaimTree, error) {

	if orgID == nil {
		return nil, errors.New("An org id must be provided")
	}

	cts, err := c.List(ctx, orgID, ownerID)
	if err != nil {
		return nil, err
	}

	if len(cts) != 1 {
		return nil, ErrClaimTreeNotFound
	}

	return &cts[0], nil
}
782684
func (t *TreeEntry) GetURL() string {
	if t == nil || t.URL == nil {
		return ""
	}
	return *t.URL
}
1208489
func readTree(base string, dest *[]Path) error {
	files, err := ioutil.ReadDir(base)
	if err != nil {
		return err
	}
	for _, f := range files {
		p := path.Join(base, f.Name())
		if f.IsDir() {
			err = readTree(p, dest)
			if err != nil {
				return err
			}
		} else {
			*dest = append(*dest, NewFSPath(p))
		}
	}
	return nil
}
1283718
func (r *Repository) Worktree() (*Worktree, error) {
	if r.wt == nil {
		return nil, ErrIsBareRepository
	}

	return &Worktree{r: r, Filesystem: r.wt}, nil
}
145965
func (p *ProjectsClient) GetTree(ctx context.Context, orgID *identity.ID) ([]ProjectTreeSegment, error) {
	v := &url.Values{}
	v.Set("org_id", orgID.String())

	var segments []ProjectTreeSegment
	err := p.client.RoundTrip(ctx, "GET", "/projecttree", v, nil, &segments)
	return segments, err
}
1160182
func (s *OrganizationsService) Get(ctx context.Context, org string) (*Organization, *Response, error) {
	u := fmt.Sprintf("orgs/%v", org)
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	organization := new(Organization)
	resp, err := s.client.Do(ctx, req, organization)
	if err != nil {
		return nil, resp, err
	}

	return organization, resp, nil
}
210204
func (d *Dir) GetNode(nodeName string) (os.FileInfo, error) {
	for _, node := range d.nodes {
		if nodeName == node.Name() {
			return node, nil
		}
	}
	return nil, fmt.Errorf("No find node with name " + nodeName)
}
89230
func (s *Server) GetNode(w http.ResponseWriter, req *http.Request) {
	node := req.Context().Value("node").(*Node)

	s.JSON(w, http.StatusOK, node.NodeInfo())
}
353016
func (c *Client) GetNodes() ([]*p2p.NodeInfo, error) {
	var nodes []*p2p.NodeInfo
	return nodes, c.Get("/nodes", &nodes)
}
1113798
func (res *Resource) RouteTree() string {
	var routes string

	for _, route := range res.Routes {
		routes = strings.Join([]string{routes, route}, "\n")
	}

	return routes
}
541410
func (t *TreeEntry) GetMode() string {
	if t == nil || t.Mode == nil {
		return ""
	}
	return *t.Mode
}
581930
func (t *Tree) Get(topic string) []interface{} {
	t.mutex.Lock()
	defer t.mutex.Unlock()

	return t.get(0, strings.Split(topic, t.Separator), t.root)
}
705068
func (tree *btree) Get(keys ...Key) Keys {
	results := make(Keys, 0, len(keys))
	for _, k := range keys {
		results = append(results, tree.get(k))
	}

	return results
}
1230062
func (m *NodeManager) GetFullTree() ([]byte, error) {
	m.mu.Lock()
	defer m.mu.Unlock()
	return m.toJSON(0)
}
664531
func (t *TreeEntry) GetSize() int {
	if t == nil || t.Size == nil {
		return 0
	}
	return *t.Size
}