Skip to content

Commit 034c203

Browse files
committed
Update main.go
1 parent c1842ae commit 034c203

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/deleteRedditHistory/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
"fmt"
1111
"log"
1212
"os"
13+
14+
"github.com/vartanbeno/go-reddit/v2/reddit"
1315
)
1416

1517
type envVars struct {
@@ -40,4 +42,11 @@ func main() {
4042
if !arrayHasNoEmptyStrings([]string{e.appID, e.appSecret, e.userName, e.userPassword}) {
4143
log.Fatal(fmt.Errorf("one of the last.fm environment variables is not present in your system"))
4244
}
45+
46+
credentials := reddit.Credentials{ID: e.appID, Secret: e.appSecret, Username: e.userName, Password: e.userPassword}
47+
_, clientErr := reddit.NewClient(credentials)
48+
49+
if clientErr != nil {
50+
log.Fatal(clientErr)
51+
}
4352
}

0 commit comments

Comments
 (0)