inital commit

This commit is contained in:
2026-05-26 20:21:55 +02:00
parent 965f9d6ad4
commit 0ae20aa68d
21 changed files with 651 additions and 111 deletions

View File

@@ -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
}