Example #1
0
func New(runMode, srcPath string) *Application {
	appServer := gogo.New(runMode, srcPath)

	err := NewAppConfig(appServer.Config())
	if err != nil {
		panic(err.Error())
	}

	return &Application{appServer}
}
Example #2
0
func TestMain(m *testing.M) {
	var (
		runMode = "test"
		srcPath = path.Clean("../../")
	)

	testApp = gogo.New(runMode, srcPath)
	testServer = httptest.NewServer(testApp)
	testClient = httptesting.New(testServer.URL, false)

	code := m.Run()

	testServer.Close()

	os.Exit(code)
}