Esempio n. 1
0
package main

import (
	"github.com/codegangsta/cli"
	"github.com/gi4nks/quant"
	"os"
)

var parrot = quant.NewParrot("decanter")

var settings = Settings{}
var repository = Repository{}

func initDB() {
	repository.InitDB(settings.RepositoryUrl())
}

func readSettings() {
	settings.LoadSettings()

	if settings.DebugMode() {
		parrot = quant.NewVerboseParrot("decanter")
	}

	parrot.Debug("Parrot is set to talk so much!")
}

func main() {
	readSettings()
	initDB()
Esempio n. 2
0
import (
	"bufio"
	"bytes"
	"errors"
	"fmt"
	"os"
	"os/exec"
	"strconv"
	"time"

	"github.com/gi4nks/quant"
	"gopkg.in/urfave/cli.v1"
)

var parrot = quant.NewParrot("ambros")

var settings = Settings{}
var repository = Repository{}

var pathUtils = quant.NewPathUtils()

func initDB() {
	repository.InitDB()
	repository.InitSchema()
}

func closeDB() {
	repository.CloseDB()
}