Remove FromEnv option, a few todos

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-08-27 18:15:45 -04:00
parent c4faa00b94
commit a14cb3a3c8
7 changed files with 8 additions and 64 deletions
-22
View File
@@ -20,28 +20,6 @@ func WithHTTPClient(httpClient *http.Client) Opt {
}
}
// FromEnv configures the client with values from environment variables.
// Supported environment variables:
// GO_REDDIT_CLIENT_ID to set the client's id.
// GO_REDDIT_CLIENT_SECRET to set the client's secret.
// GO_REDDIT_CLIENT_USERNAME to set the client's username.
// GO_REDDIT_CLIENT_PASSWORD to set the client's password.
// func FromEnv(c *Client) error {
// if v := os.Getenv("GO_REDDIT_CLIENT_ID"); v != "" {
// c.ID = v
// }
// if v := os.Getenv("GO_REDDIT_CLIENT_SECRET"); v != "" {
// c.Secret = v
// }
// if v := os.Getenv("GO_REDDIT_CLIENT_USERNAME"); v != "" {
// c.Username = v
// }
// if v := os.Getenv("GO_REDDIT_CLIENT_PASSWORD"); v != "" {
// c.Password = v
// }
// return nil
// }
// WithBaseURL sets the base URL for the client to make requests to.
func WithBaseURL(u string) Opt {
return func(c *Client) error {