func main() { var configFile string flag.StringVar(&configFile, "c", "./examples/config.yml", "Config file") flag.Parse() err := config.ReadConfigFile(configFile) if err != nil { log.Fatal(err) } authentication := auth.NewFileAuthentication() db, err := mongo.New() if err != nil { log.Fatalf("[mongodb] %s", err) } s := server.New(authentication, db) s.Run() }
func (s *S) SetUpSuite(c *check.C) { err := config.ReadConfigFile("../examples/config.yml") c.Assert(err, check.IsNil) s.authenticaton = NewFileAuthentication() }