<commit_before><commit_msg>errorreporting: add quickstart (#290)<commit_after>// Copyright 2017 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.

// [START errorreporting_quickstart]

// Sample errorreporting_quickstart contains is a quickstart
// example for the Google Cloud Error Reporting API.
package errorreporting_quickstart

import (
	"log"

	"cloud.google.com/go/errors"
	"golang.org/x/net/context"
)

func main() {
	ctx := context.Background()

	// Sets your Google Cloud Platform project ID.
	projectID := "YOUR_PROJECT_ID"

	errorClient, err := errors.NewClient(ctx, projectID, "myservice", "v1.0", false)
	if err != nil {
		log.Fatal(err)
	}
	defer errorClient.Close()

	// Report panics.
	defer errorClient.Catch(ctx)

	// Your program here...
}

// [END errorreporting_quickstart]

{'fraction_non_alphanumeric': 0.11386696730552424, 'fraction_numerical': 0.012401352874859075, 'mean_word_length': 4.016949152542373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7313383', 'n_tokens_mistral': 298, 'n_tokens_neox': 272, 'n_words': 88}