{"action":"created","issue":{"url":"https://api.github.com/repos/adams-sarah/test2doc/issues/10","repository_url":"https://api.github.com/repos/adams-sarah/test2doc","labels_url":"https://api.github.com/repos/adams-sarah/test2doc/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/adams-sarah/test2doc/issues/10/comments","events_url":"https://api.github.com/repos/adams-sarah/test2doc/issues/10/events","html_url":"https://github.com/adams-sarah/test2doc/issues/10","id":251312126,"number":10,"title":"Invalid memory address or nil pointer dereference on server.Finish()","user":{"login":"Robinnnnn","id":12162433,"avatar_url":"https://avatars2.githubusercontent.com/u/12162433?v=4","gravatar_id":"","url":"https://api.github.com/users/Robinnnnn","html_url":"https://github.com/Robinnnnn","followers_url":"https://api.github.com/users/Robinnnnn/followers","following_url":"https://api.github.com/users/Robinnnnn/following{/other_user}","gists_url":"https://api.github.com/users/Robinnnnn/gists{/gist_id}","starred_url":"https://api.github.com/users/Robinnnnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robinnnnn/subscriptions","organizations_url":"https://api.github.com/users/Robinnnnn/orgs","repos_url":"https://api.github.com/users/Robinnnnn/repos","events_url":"https://api.github.com/users/Robinnnnn/events{/privacy}","received_events_url":"https://api.github.com/users/Robinnnnn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-18T17:38:30Z","updated_at":"2017-08-18T19:37:54Z","closed_at":"2017-08-18T18:23:28Z","body":"All of my tests in a single `main_test.go` file at the root of my project. They run cleanly until the very end, when I get this error:\r\n\r\n```go\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1a4cea]\r\n\r\ngoroutine 1 [running]:\r\npanic(0x5846e0, 0xc42000c0e0)\r\n        /usr/local/go/src/runtime/panic.go:500 +0x1a1\r\ngithub.com/adams-sarah/test2doc/test.(*Server).Finish(0x0)\r\n        /Users/robinkim/irisvr/irisvr_go/src/github.com/adams-sarah/test2doc/test/server.go:42 +0x3a\r\nirv_orgs.TestMain(0xc42637fee8)\r\n        /Users/robinkim/irisvr/irisvr_go/src/irv_orgs/main_test.go:31 +0x4f\r\nmain.main()\r\n```\r\n\r\nI'm using gorilla mux and have set up my tests as follows:\r\n\r\n```go\r\nvar server *test.Server\r\n\r\nfunc TestMain(m *testing.M) {\r\n\tsetup()\r\n\ttests := m.Run()\r\n\tDropDatabase()\r\n\tserver.Finish()  // <--- fails here\r\n\tos.Exit(tests)\r\n}\r\n\r\nfunc setup() {\r\n\t...\r\n\ttest.RegisterURLVarExtractor(mux.Vars)\r\n\tserver, err := test.NewServer(routes)\r\n\tif err != nil {\r\n\t\tpanic(err.Error())\r\n\t}\r\n\t...\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/adams-sarah/test2doc/issues/comments/323443237","html_url":"https://github.com/adams-sarah/test2doc/issues/10#issuecomment-323443237","issue_url":"https://api.github.com/repos/adams-sarah/test2doc/issues/10","id":323443237,"user":{"login":"Robinnnnn","id":12162433,"avatar_url":"https://avatars2.githubusercontent.com/u/12162433?v=4","gravatar_id":"","url":"https://api.github.com/users/Robinnnnn","html_url":"https://github.com/Robinnnnn","followers_url":"https://api.github.com/users/Robinnnnn/followers","following_url":"https://api.github.com/users/Robinnnnn/following{/other_user}","gists_url":"https://api.github.com/users/Robinnnnn/gists{/gist_id}","starred_url":"https://api.github.com/users/Robinnnnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robinnnnn/subscriptions","organizations_url":"https://api.github.com/users/Robinnnnn/orgs","repos_url":"https://api.github.com/users/Robinnnnn/repos","events_url":"https://api.github.com/users/Robinnnnn/events{/privacy}","received_events_url":"https://api.github.com/users/Robinnnnn/received_events","type":"User","site_admin":false},"created_at":"2017-08-18T19:37:54Z","updated_at":"2017-08-18T19:37:54Z","body":"You're right, my bad about that"}}
{"actor":{"display_login":"Robinnnnn"}}