SearchRoot returns the server's search handler. If the server isn't running an index and search handler, the error will be ErrNoSearchRoot.
()
| 576 | // If the server isn't running an index and search handler, the error |
| 577 | // will be ErrNoSearchRoot. |
| 578 | func (c *Client) SearchRoot() (string, error) { |
| 579 | if err := c.condDiscovery(); err != nil { |
| 580 | return "", err |
| 581 | } |
| 582 | if c.searchRoot == "" { |
| 583 | return "", ErrNoSearchRoot |
| 584 | } |
| 585 | return c.searchRoot, nil |
| 586 | } |
| 587 | |
| 588 | // HelpRoot returns the server's help handler. |
| 589 | // If the server isn't running a help handler, the error will be |
no test coverage detected