Skip to content

Commit 12a5f16

Browse files
author
Marcel Corso
committed
new lookup endpoints: small cosmetic fixes
1 parent 1973e2c commit 12a5f16

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

client.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ func (c *Client) Lookup(phoneNumber string, params *LookupParams) (*Lookup, erro
282282
}
283283

284284
// NewHLRLookup creates a new HLR lookup for the specified number.
285-
func (c *Client) NewHLRLookup(phoneNumber string, lookupParams *LookupParams) (*HLR, error) {
286-
params := paramsForLookup(lookupParams)
285+
func (c *Client) NewHLRLookup(phoneNumber string, params *LookupParams) (*HLR, error) {
286+
urlParams := paramsForLookup(params)
287+
path := "lookup/" + phoneNumber + "/hlr"
287288

288289
hlr := &HLR{}
289-
path := "lookup/" + phoneNumber + "/hlr"
290-
if err := c.request(hlr, path, params); err != nil {
290+
if err := c.request(hlr, path, urlParams); err != nil {
291291
if err == ErrResponse {
292292
return hlr, err
293293
}
@@ -301,7 +301,6 @@ func (c *Client) NewHLRLookup(phoneNumber string, lookupParams *LookupParams) (*
301301
// HLRLookup performs a HLR lookup for the specified number.
302302
func (c *Client) HLRLookup(phoneNumber string, params *LookupParams) (*HLR, error) {
303303
urlParams := paramsForLookup(params)
304-
305304
path := "lookup/" + phoneNumber + "/hlr?" + urlParams.Encode()
306305

307306
hlr := &HLR{}

0 commit comments

Comments
 (0)