mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-14 11:14:21 -04:00
cleanup: Avoid nested if statment
Co-authored-by: Andre Duffeck <aduffeck@users.noreply.github.com>
This commit is contained in:
@@ -34,10 +34,10 @@ func collectExpandPaths(item *godata.ExpandItem, prefix string) ([]string, error
|
||||
|
||||
// Build the current path
|
||||
currentPath := prefix
|
||||
if len(item.Path) > 0 {
|
||||
if len(item.Path) > 1 {
|
||||
return nil, godata.NotImplementedError("multiple segments in $expand not supported")
|
||||
}
|
||||
if len(item.Path) > 1 {
|
||||
return nil, godata.NotImplementedError("multiple segments in $expand not supported")
|
||||
}
|
||||
if len(item.Path) == 1 {
|
||||
if currentPath == "" {
|
||||
currentPath = item.Path[0].Value
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user