func getTestFoomo() *foomo.Foomo { if testFoomo == nil { f, _ := foomo.NewFoomo("/Users/jan/vagrant/schild/www/schild", "test", "http://schild-local-test.bestbytes.net") testFoomo = f } return testFoomo }
func NewProxyServer(config *Config) (p *ProxyServer, err error) { proxyServer := new(ProxyServer) proxyServer.Config = config f, err := foomo.NewFoomo(config.Foomo.Dir, config.Foomo.RunMode, config.Foomo.Address) if err != nil { return nil, err } proxyServer.Foomo = f proxyServer.Proxy = NewProxy(proxyServer.Foomo) proxyServer.Proxy.auth = config.Server.Auth return proxyServer, nil }