MCPcopy
hub / github.com/perkeep/perkeep / setClient

Method setClient

cmd/pk/list.go:156–167  ·  view source on GitHub ↗

setClient configures a client for c, for the describe requests.

()

Source from the content-addressed store, hash-verified

154
155// setClient configures a client for c, for the describe requests.
156func (c *listCmd) setClient() error {
157 ss, err := c.syncCmd.storageFromParam("src", c.syncCmd.src)
158 if err != nil {
159 return fmt.Errorf("Could not set client for describe requests: %v", err)
160 }
161 var ok bool
162 c.cl, ok = ss.(*client.Client)
163 if !ok {
164 return fmt.Errorf("storageFromParam returned a %T, was expecting a *client.Client", ss)
165 }
166 return nil
167}
168
169func detail(blob *search.DescribedBlob) string {
170 // TODO(mpl): attrType, value for claim. but I don't think they're accessible just with a describe req.

Callers 1

RunCommandMethod · 0.95

Calls 1

storageFromParamMethod · 0.80

Tested by

no test coverage detected