<commit_before>package tutum

import (
	"net/url"
	"os"
	"reflect"

	"code.google.com/p/go.net/websocket"
)

type Event struct {
	Type         string   `json:"type"`
	Action       string   `json:"action"`
	Parents      []string `json:"parents"`
	Resource_uri string   `json:"resource_uri"`
	State        string   `json:"state"`
}

/*
	func dial()
	Returns : a websocket connection
*/
func dial() (*websocket.Conn, error) {

	if os.Getenv("TUTUM_STREAM_URL") != "" {
		u, err := url.Parse(os.Getenv("TUTUM_STREAM_URL"))
		if err != nil {
			panic(err)<commit_msg>fix error handling in dialing function<commit_after>package tutum

import (
	"net/url"
	"os"
	"reflect"

	"code.google.com/p/go.net/websocket"
)

type Event struct {
	Type         string   `json:"type"`
	Action       string   `json:"action"`
	Parents      []string `json:"parents"`
	Resource_uri string   `json:"resource_uri"`
	State        string   `json:"state"`
}

/*
	func dial()
	Returns : a websocket connection
*/
func dial() (*websocket.Conn, error) {

	if os.Getenv("TUTUM_STREAM_URL") != "" {
		u, err := url.Parse(os.Getenv("TUTUM_STREAM_URL"))
		if err != nil {
			return nil, err
{'fraction_non_alphanumeric': 0.15511265164644714, 'fraction_numerical': 0.0, 'mean_word_length': 3.375, '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': '756388', 'n_tokens_mistral': 433, 'n_tokens_neox': 415, 'n_words': 94}