// Helper function for TestInitConfig due to Golang limitations.
// Turns out you can't pass a function as an argument that has no return value.
// (i.e. testify's assert subpackage didn't work with initConfig() as a param)
Helper function for TestInitConfig due to Golang limitations.
Turns out you can't pass a function as an argument that has no return value.
as a param)
// Helper function for TestInitConfig due to Golang limitations . // Turns out you can ' t pass a function as an argument that has no return value . // ( i . e . testify ' s assert subpackage didn ' t work with initConfig () as a param )
func tryConfigPanic(t *testing.T, p []string, id string, secret string, url string) {
	defer func() {
		r := recover()
		if r == nil {
			t.Errorf("Program should have panicked")
		}
	}()
	api.InitConfig(p, id, secret, url)
}
func tryConfigPanic ( t * testing . T , p [ ] string , id string , secret string , url string ) { defer func ( ) { r := recover ( ) if r == nil { t . Errorf ( " " ) } } ( ) api . InitConfig ( p , id , secret , url ) }
Helper function for TestInitConfig due to Golang limitations.
Helper function for TestInitConfig due to Golang limitations .