<commit_before>package main

import (
	"fmt"
	"log"
	"net/http"
	"os"
	"time"

	"github.com/deoliveiraromain/task-rest-api/configuration"
	"github.com/deoliveiraromain/task-rest-api/db"
	"github.com/deoliveiraromain/task-rest-api/handlers"
	"github.com/deoliveiraromain/task-rest-api/routes"
	"gopkg.in/mgo.v2"
)

func main() {
	//get config
	conf, err := configuration.GetConfig()
	if err != nil {
		log.Printf("Error getting config [%s]", err)
		os.Exit(1)
	}
	// Connect to our local mongo
	log.Printf("Config port %d", conf.Port)
	log.Printf("Config MongoHost %s", conf.MongoHost)
	//s, err := mgo.Dial("mongodb://" + conf.MongoHost + ":27017")
	maxWait := time.Duration(5 * time.Second)
	s, err := mgo.DialWithTimeout("mongodb://"+conf.MongoHost+":27017", maxWait)
	defer s.Close()

	// Check if connection error, is mongo running?<commit_msg>fix again mongo<commit_after>package main

import (
	"fmt"
	"log"
	"net/http"
	"os"
	"time"

	"github.com/deoliveiraromain/task-rest-api/configuration"
	"github.com/deoliveiraromain/task-rest-api/db"
	"github.com/deoliveiraromain/task-rest-api/handlers"
	"github.com/deoliveiraromain/task-rest-api/routes"
	"gopkg.in/mgo.v2"
)

func main() {
	//get config
	conf, err := configuration.GetConfig()
	if err != nil {
		log.Printf("Error getting config [%s]", err)
		os.Exit(1)
	}
	// Connect to our local mongo
	log.Printf("Config port %s", conf.Port)
	log.Printf("Config MongoHost %s", conf.MongoHost)
	//s, err := mgo.Dial("mongodb://" + conf.MongoHost + ":27017")
	maxWait := time.Duration(5 * time.Second)
	s, err := mgo.DialWithTimeout(conf.MongoHost, maxWait)
	defer s.Close()

	// Check if connection error, is mongo running?
{'fraction_non_alphanumeric': 0.1718377088305489, 'fraction_numerical': 0.012529832935560859, 'mean_word_length': 4.191950464396285, 'pattern_counts': {'":': 3, '<': 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': '4161240', 'n_tokens_mistral': 702, 'n_tokens_neox': 687, 'n_words': 127}