<commit_before>package main

import (
	"flag"
	"fmt"

	"github.com/ttacon/box"
	"github.com/ttacon/pretty"
	"golang.org/x/oauth2"
)

var (
	clientId     = flag.String("cid", "", "OAuth Client ID")
	clientSecret = flag.String("csec", "", "OAuth Client Secret")

	accessToken  = flag.String("atok", "", "Access Token")
	refreshToken = flag.String("rtok", "", "Refresh Token")
)

func main() {
	flag.Parse()

	if len(*clientId) == 0 || len(*clientSecret) == 0 ||
		len(*accessToken) == 0 || len(*refreshToken) == 0 {
		fmt.Println("unfortunately all flags must be provided")
		return
	}

	// Set our OAuth2 configuration up
	var (
		configSource = box.NewConfigSource(
			&oauth2.Config{
				ClientID:     *clientId,
				ClientSecret: *clientSecret,
				Scopes:       nil,
				Endpoint: oauth2.Endpoint{
					AuthURL:  "https://app.box.com/api/oauth2/authorize",
					TokenURL: "https://app.box.com/api/oauth2/token",
				},
				RedirectURL: "http://localhost:8080/handle",
			},
		)
		tok = &oauth2.Token{
			TokenType:    "Bearer",
			AccessToken:  *accessToken,
			RefreshToken: *refreshToken,
		}
		c = configSource.NewClient(tok)
	)

	resp, longPollInfo, err := c.EventService().LongPollURL()
	fmt.Println("resp: ", resp)
	fmt.Println("err: ", err)
	pretty.Print(longPollInfo)

	// Print out the new tokens for next time
	fmt.Printf("\n%#v\n", tok)

	connInfo := longPollInfo.Entries[0]
	resp, event, _, err := c.EventService().ListenForEvent(connInfo, "")
	fmt.Println("resp: ", resp)
	fmt.Println("err: ", err)
	pretty.Println(event)
}<commit_msg>remove non-removed return value from example<commit_after>package main

import (
	"flag"
	"fmt"

	"github.com/ttacon/box"
	"github.com/ttacon/pretty"
	"golang.org/x/oauth2"
)

var (
	clientId     = flag.String("cid", "", "OAuth Client ID")
	clientSecret = flag.String("csec", "", "OAuth Client Secret")

	accessToken  = flag.String("atok", "", "Access Token")
	refreshToken = flag.String("rtok", "", "Refresh Token")
)

func main() {
	flag.Parse()

	if len(*clientId) == 0 || len(*clientSecret) == 0 ||
		len(*accessToken) == 0 || len(*refreshToken) == 0 {
		fmt.Println("unfortunately all flags must be provided")
		return
	}

	// Set our OAuth2 configuration up
	var (
		configSource = box.NewConfigSource(
			&oauth2.Config{
				ClientID:     *clientId,
				ClientSecret: *clientSecret,
				Scopes:       nil,
				Endpoint: oauth2.Endpoint{
					AuthURL:  "https://app.box.com/api/oauth2/authorize",
					TokenURL: "https://app.box.com/api/oauth2/token",
				},
				RedirectURL: "http://localhost:8080/handle",
			},
		)
		tok = &oauth2.Token{
			TokenType:    "Bearer",
			AccessToken:  *accessToken,
			RefreshToken: *refreshToken,
		}
		c = configSource.NewClient(tok)
	)

	resp, longPollInfo, err := c.EventService().LongPollURL()
	fmt.Println("resp: ", resp)
	fmt.Println("err: ", err)
	pretty.Print(longPollInfo)

	// Print out the new tokens for next time
	fmt.Printf("\n%#v\n", tok)

	connInfo := longPollInfo.Entries[0]
	resp, event, err := c.EventService().ListenForEvent(connInfo, "")
	fmt.Println("resp: ", resp)
	fmt.Println("err: ", err)
	pretty.Println(event)
}
{'fraction_non_alphanumeric': 0.1706070287539936, 'fraction_numerical': 0.010223642172523962, 'mean_word_length': 3.743939393939394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3691334', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1136, 'n_words': 223}