inital commit
This commit is contained in:
4
user.go
4
user.go
@@ -33,7 +33,7 @@ type User struct {
|
||||
}
|
||||
|
||||
// GetUser fetches a user profile by URL-safe name (FA's lowercase login form).
|
||||
func (c *Client) GetUser(ctx context.Context, name string) (*User, error) {
|
||||
func (c *Client) GetUser(ctx context.Context, name string, opts ...Option) (*User, error) {
|
||||
name = strings.TrimSpace(name)
|
||||
if name == "" {
|
||||
return nil, fmt.Errorf("fa: GetUser: empty name")
|
||||
@@ -46,7 +46,7 @@ func (c *Client) GetUser(ctx context.Context, name string) (*User, error) {
|
||||
}
|
||||
out = u
|
||||
return nil
|
||||
})
|
||||
}, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user