Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 50f33ab

Browse files
author
Mathieu Velten
committed
gofmt
1 parent 46b1c59 commit 50f33ab

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

openstack/identity/v3/extensions/trust/request.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,35 @@ import (
77
)
88

99
type AuthOptionsExt struct {
10-
token3.AuthOptions
11-
TrustID string
10+
token3.AuthOptions
11+
TrustID string
1212
}
1313

1414
func (ao AuthOptionsExt) ToAuthOptionsV3Map(c *gophercloud.ServiceClient, scope *token3.Scope) (map[string]interface{}, error) {
1515
//Passing scope value to nil to add scope later in this function.
1616
authMap, err := ao.AuthOptions.ToAuthOptionsV3Map(c, nil)
17-
if err != nil {
18-
return nil, err
19-
}
20-
authMap = authMap["auth"].(map[string]interface{})
17+
if err != nil {
18+
return nil, err
19+
}
20+
authMap = authMap["auth"].(map[string]interface{})
2121

2222
// Add a "scope" element if a Scope has been provided.
2323
if ao.TrustID != "" {
24-
// TrustID provided.
25-
authMap["scope"] = map[string]interface{}{
26-
"OS-TRUST:trust": map[string]interface{}{
27-
"id" : ao.TrustID,
28-
},
29-
}
30-
} else {
31-
return nil, token3.ErrScopeEmpty
24+
// TrustID provided.
25+
authMap["scope"] = map[string]interface{}{
26+
"OS-TRUST:trust": map[string]interface{}{
27+
"id": ao.TrustID,
28+
},
29+
}
30+
} else {
31+
return nil, token3.ErrScopeEmpty
3232
}
33-
return map[string]interface{}{"auth": authMap}, nil
33+
return map[string]interface{}{"auth": authMap}, nil
3434
}
3535

3636
// AuthenticateV3 explicitly authenticates against the identity v3 service.
3737
func AuthenticateV3Trust(client *gophercloud.ProviderClient, options AuthOptionsExt) error {
38-
return trustv3auth(client, "", options)
38+
return trustv3auth(client, "", options)
3939
}
4040

4141
func trustv3auth(client *gophercloud.ProviderClient, endpoint string, options AuthOptionsExt) error {

0 commit comments

Comments
 (0)