main.go 588 Bytes
Newer Older
Ronny Bangsund's avatar
Ronny Bangsund committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
// Syncer project main.go

package main

import (
	"code.google.com/p/gcfg"
	"flag"
)

const PROGVERSION string = "0.1.0"

type Config struct {
	Main struct {
		Address  string
		Port     int
		Sitename string
	}
}

var cfg Config
var cfgfile *string = flag.String("config", "scraps.conf", "Name of the configuration file to use.")

// Update settings
var interval int = 900
var server_id string = "Syncer"

func main() {
	flag.Parse()

	err := gcfg.ReadFileInto(&cfg, *cfgfile)
	if err != nil {
		fatal(err.Error())
	}

	info("Scraps starting up.")
	loadScraps()

	initWeb()
	endWeb()
}