Get subreddit by name

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-04-23 22:57:47 -04:00
parent 2f4d11ce55
commit 3c7aee142d
4 changed files with 292 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package geddit
import "fmt"
// Opt is a configuration option to initialize a client
type Opt func(*Client) error
// WithUserAgent sets the user agent for the client
func WithUserAgent(ua string) Opt {
return func(c *Client) error {
c.UserAgent = fmt.Sprintf("%s %s", ua, c.UserAgent)
return nil
}
}