MCPcopy Create free account
hub / github.com/dropbox/dbxcli / newGetResult

Function newGetResult

cmd/get.go:165–182  ·  view source on GitHub ↗
(status, kind, source, target string, metadata files.IsMetadata)

Source from the content-addressed store, hash-verified

163}
164
165func newGetResult(status, kind, source, target string, metadata files.IsMetadata) (getResult, error) {
166 result := getResult{
167 Status: status,
168 Kind: kind,
169 Input: getResultInput{
170 Source: source,
171 Target: target,
172 },
173 }
174 if metadata != nil {
175 jsonResult, err := jsonMetadataFromDropbox(metadata)
176 if err != nil {
177 return getResult{}, err
178 }
179 result.Result = &jsonResult
180 }
181 return result, nil
182}
183
184func renderGetResults(cmd *cobra.Command, input getCommandInput, results []getResult) error {
185 return renderJSONOperationOutput(cmd, input, getOperationResults(results))

Callers 2

downloadFileWithResultFunction · 0.85

Calls 1

jsonMetadataFromDropboxFunction · 0.85

Tested by

no test coverage detected