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

Function dropboxAPIErrorFieldSummary

cmd/output.go:663–672  ·  view source on GitHub ↗
(field reflect.Value)

Source from the content-addressed store, hash-verified

661}
662
663func dropboxAPIErrorFieldSummary(field reflect.Value) (string, bool) {
664 if !field.IsValid() || field.Type() != reflect.TypeOf(dropbox.APIError{}) {
665 return "", false
666 }
667 summary := field.FieldByName("ErrorSummary")
668 if !summary.IsValid() || summary.Kind() != reflect.String {
669 return "", false
670 }
671 return summary.String(), true
672}
673
674func dropboxAPISummaryFromMessage(message string) (string, bool) {
675 lower := strings.ToLower(message)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected