{"action":"created","comment":{"url":"https://api.github.com/repos/revel/revel/pulls/comments/31264991","id":31264991,"diff_hunk":"@@ -174,6 +195,10 @@ var startupHooks []func()\n // This can be useful when you need to establish connections to databases or third-party services,\n // setup app components, compile assets, or any thing you need to do between starting Revel and accepting connections.\n //\n-func OnAppStart(f func()) {\n-\tstartupHooks = append(startupHooks, f)\n+func OnAppStart(f func(), order ...int) {\n+\to := 1","path":"server.go","position":50,"original_position":50,"commit_id":"d12fafe6615eaa93e91de1a6e1dfefb9079bd03a","original_commit_id":"d12fafe6615eaa93e91de1a6e1dfefb9079bd03a","user":{"login":"notzippy","id":1387526,"avatar_url":"https://avatars.githubusercontent.com/u/1387526?v=3","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"body":"I think the default value should be 5 and we have some sort of guideline as to the range of values to be used.\r\nie  Default / normal is 5, high / first is 1, low / last is 10. \r\nSo people know that revel builtin startuphooks will run at 5, if they want something before or after it should be higher or lower.","created_at":"2015-05-28T18:45:58Z","updated_at":"2015-05-28T18:45:58Z","html_url":"https://github.com/revel/revel/pull/935#discussion_r31264991","pull_request_url":"https://api.github.com/repos/revel/revel/pulls/935","_links":{"self":{"href":"https://api.github.com/repos/revel/revel/pulls/comments/31264991"},"html":{"href":"https://github.com/revel/revel/pull/935#discussion_r31264991"},"pull_request":{"href":"https://api.github.com/repos/revel/revel/pulls/935"}}},"pull_request":{"url":"https://api.github.com/repos/revel/revel/pulls/935","id":35754128,"html_url":"https://github.com/revel/revel/pull/935","diff_url":"https://github.com/revel/revel/pull/935.diff","patch_url":"https://github.com/revel/revel/pull/935.patch","issue_url":"https://api.github.com/repos/revel/revel/issues/935","number":935,"state":"open","locked":false,"title":"Add Order to OnAppStart","user":{"login":"vahid-sohrabloo","id":297210,"avatar_url":"https://avatars.githubusercontent.com/u/297210?v=3","gravatar_id":"","url":"https://api.github.com/users/vahid-sohrabloo","html_url":"https://github.com/vahid-sohrabloo","followers_url":"https://api.github.com/users/vahid-sohrabloo/followers","following_url":"https://api.github.com/users/vahid-sohrabloo/following{/other_user}","gists_url":"https://api.github.com/users/vahid-sohrabloo/gists{/gist_id}","starred_url":"https://api.github.com/users/vahid-sohrabloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vahid-sohrabloo/subscriptions","organizations_url":"https://api.github.com/users/vahid-sohrabloo/orgs","repos_url":"https://api.github.com/users/vahid-sohrabloo/repos","events_url":"https://api.github.com/users/vahid-sohrabloo/events{/privacy}","received_events_url":"https://api.github.com/users/vahid-sohrabloo/received_events","type":"User","site_admin":false},"body":"Add Order To onAppStart.\r\nWith This change we can order to run function in runStartupHooks.","created_at":"2015-05-19T17:24:08Z","updated_at":"2015-05-28T18:45:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2537eac10e909ca3904f5ca25605d920150c498e","assignee":null,"milestone":{"url":"https://api.github.com/repos/revel/revel/milestones/7","html_url":"https://github.com/revel/revel/milestones/v0.13","labels_url":"https://api.github.com/repos/revel/revel/milestones/7/labels","id":808476,"number":7,"title":"v0.13","description":null,"creator":{"login":"brendensoares","id":905501,"avatar_url":"https://avatars.githubusercontent.com/u/905501?v=3","gravatar_id":"","url":"https://api.github.com/users/brendensoares","html_url":"https://github.com/brendensoares","followers_url":"https://api.github.com/users/brendensoares/followers","following_url":"https://api.github.com/users/brendensoares/following{/other_user}","gists_url":"https://api.github.com/users/brendensoares/gists{/gist_id}","starred_url":"https://api.github.com/users/brendensoares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendensoares/subscriptions","organizations_url":"https://api.github.com/users/brendensoares/orgs","repos_url":"https://api.github.com/users/brendensoares/repos","events_url":"https://api.github.com/users/brendensoares/events{/privacy}","received_events_url":"https://api.github.com/users/brendensoares/received_events","type":"User","site_admin":false},"open_issues":50,"closed_issues":17,"state":"open","created_at":"2014-09-30T16:02:08Z","updated_at":"2015-05-28T18:39:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/revel/revel/pulls/935/commits","review_comments_url":"https://api.github.com/repos/revel/revel/pulls/935/comments","review_comment_url":"https://api.github.com/repos/revel/revel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/revel/revel/issues/935/comments","statuses_url":"https://api.github.com/repos/revel/revel/statuses/d12fafe6615eaa93e91de1a6e1dfefb9079bd03a","head":{"label":"vahid-sohrabloo:feature/order-OnAppStart","ref":"feature/order-OnAppStart","sha":"d12fafe6615eaa93e91de1a6e1dfefb9079bd03a","user":{"login":"vahid-sohrabloo","id":297210,"avatar_url":"https://avatars.githubusercontent.com/u/297210?v=3","gravatar_id":"","url":"https://api.github.com/users/vahid-sohrabloo","html_url":"https://github.com/vahid-sohrabloo","followers_url":"https://api.github.com/users/vahid-sohrabloo/followers","following_url":"https://api.github.com/users/vahid-sohrabloo/following{/other_user}","gists_url":"https://api.github.com/users/vahid-sohrabloo/gists{/gist_id}","starred_url":"https://api.github.com/users/vahid-sohrabloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vahid-sohrabloo/subscriptions","organizations_url":"https://api.github.com/users/vahid-sohrabloo/orgs","repos_url":"https://api.github.com/users/vahid-sohrabloo/repos","events_url":"https://api.github.com/users/vahid-sohrabloo/events{/privacy}","received_events_url":"https://api.github.com/users/vahid-sohrabloo/received_events","type":"User","site_admin":false},"repo":{"id":35882731,"name":"revel","full_name":"vahid-sohrabloo/revel","owner":{"login":"vahid-sohrabloo","id":297210,"avatar_url":"https://avatars.githubusercontent.com/u/297210?v=3","gravatar_id":"","url":"https://api.github.com/users/vahid-sohrabloo","html_url":"https://github.com/vahid-sohrabloo","followers_url":"https://api.github.com/users/vahid-sohrabloo/followers","following_url":"https://api.github.com/users/vahid-sohrabloo/following{/other_user}","gists_url":"https://api.github.com/users/vahid-sohrabloo/gists{/gist_id}","starred_url":"https://api.github.com/users/vahid-sohrabloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vahid-sohrabloo/subscriptions","organizations_url":"https://api.github.com/users/vahid-sohrabloo/orgs","repos_url":"https://api.github.com/users/vahid-sohrabloo/repos","events_url":"https://api.github.com/users/vahid-sohrabloo/events{/privacy}","received_events_url":"https://api.github.com/users/vahid-sohrabloo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vahid-sohrabloo/revel","description":"A high productivity, full-stack web framework for the Go language.","fork":true,"url":"https://api.github.com/repos/vahid-sohrabloo/revel","forks_url":"https://api.github.com/repos/vahid-sohrabloo/revel/forks","keys_url":"https://api.github.com/repos/vahid-sohrabloo/revel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vahid-sohrabloo/revel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vahid-sohrabloo/revel/teams","hooks_url":"https://api.github.com/repos/vahid-sohrabloo/revel/hooks","issue_events_url":"https://api.github.com/repos/vahid-sohrabloo/revel/issues/events{/number}","events_url":"https://api.github.com/repos/vahid-sohrabloo/revel/events","assignees_url":"https://api.github.com/repos/vahid-sohrabloo/revel/assignees{/user}","branches_url":"https://api.github.com/repos/vahid-sohrabloo/revel/branches{/branch}","tags_url":"https://api.github.com/repos/vahid-sohrabloo/revel/tags","blobs_url":"https://api.github.com/repos/vahid-sohrabloo/revel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vahid-sohrabloo/revel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vahid-sohrabloo/revel/git/refs{/sha}","trees_url":"https://api.github.com/repos/vahid-sohrabloo/revel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vahid-sohrabloo/revel/statuses/{sha}","languages_url":"https://api.github.com/repos/vahid-sohrabloo/revel/languages","stargazers_url":"https://api.github.com/repos/vahid-sohrabloo/revel/stargazers","contributors_url":"https://api.github.com/repos/vahid-sohrabloo/revel/contributors","subscribers_url":"https://api.github.com/repos/vahid-sohrabloo/revel/subscribers","subscription_url":"https://api.github.com/repos/vahid-sohrabloo/revel/subscription","commits_url":"https://api.github.com/repos/vahid-sohrabloo/revel/commits{/sha}","git_commits_url":"https://api.github.com/repos/vahid-sohrabloo/revel/git/commits{/sha}","comments_url":"https://api.github.com/repos/vahid-sohrabloo/revel/comments{/number}","issue_comment_url":"https://api.github.com/repos/vahid-sohrabloo/revel/issues/comments{/number}","contents_url":"https://api.github.com/repos/vahid-sohrabloo/revel/contents/{+path}","compare_url":"https://api.github.com/repos/vahid-sohrabloo/revel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vahid-sohrabloo/revel/merges","archive_url":"https://api.github.com/repos/vahid-sohrabloo/revel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vahid-sohrabloo/revel/downloads","issues_url":"https://api.github.com/repos/vahid-sohrabloo/revel/issues{/number}","pulls_url":"https://api.github.com/repos/vahid-sohrabloo/revel/pulls{/number}","milestones_url":"https://api.github.com/repos/vahid-sohrabloo/revel/milestones{/number}","notifications_url":"https://api.github.com/repos/vahid-sohrabloo/revel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vahid-sohrabloo/revel/labels{/name}","releases_url":"https://api.github.com/repos/vahid-sohrabloo/revel/releases{/id}","created_at":"2015-05-19T13:10:13Z","updated_at":"2015-05-19T13:10:13Z","pushed_at":"2015-05-19T17:22:25Z","git_url":"git://github.com/vahid-sohrabloo/revel.git","ssh_url":"git@github.com:vahid-sohrabloo/revel.git","clone_url":"https://github.com/vahid-sohrabloo/revel.git","svn_url":"https://github.com/vahid-sohrabloo/revel","homepage":"http://revel.github.io","size":2459,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"revel:develop","ref":"develop","sha":"6d7a75757cc17526577af39a7ca71f173c3c123d","user":{"login":"revel","id":6631594,"avatar_url":"https://avatars.githubusercontent.com/u/6631594?v=3","gravatar_id":"","url":"https://api.github.com/users/revel","html_url":"https://github.com/revel","followers_url":"https://api.github.com/users/revel/followers","following_url":"https://api.github.com/users/revel/following{/other_user}","gists_url":"https://api.github.com/users/revel/gists{/gist_id}","starred_url":"https://api.github.com/users/revel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revel/subscriptions","organizations_url":"https://api.github.com/users/revel/orgs","repos_url":"https://api.github.com/users/revel/repos","events_url":"https://api.github.com/users/revel/events{/privacy}","received_events_url":"https://api.github.com/users/revel/received_events","type":"Organization","site_admin":false},"repo":{"id":2945088,"name":"revel","full_name":"revel/revel","owner":{"login":"revel","id":6631594,"avatar_url":"https://avatars.githubusercontent.com/u/6631594?v=3","gravatar_id":"","url":"https://api.github.com/users/revel","html_url":"https://github.com/revel","followers_url":"https://api.github.com/users/revel/followers","following_url":"https://api.github.com/users/revel/following{/other_user}","gists_url":"https://api.github.com/users/revel/gists{/gist_id}","starred_url":"https://api.github.com/users/revel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revel/subscriptions","organizations_url":"https://api.github.com/users/revel/orgs","repos_url":"https://api.github.com/users/revel/repos","events_url":"https://api.github.com/users/revel/events{/privacy}","received_events_url":"https://api.github.com/users/revel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/revel/revel","description":"A high productivity, full-stack web framework for the Go language.","fork":false,"url":"https://api.github.com/repos/revel/revel","forks_url":"https://api.github.com/repos/revel/revel/forks","keys_url":"https://api.github.com/repos/revel/revel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/revel/revel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/revel/revel/teams","hooks_url":"https://api.github.com/repos/revel/revel/hooks","issue_events_url":"https://api.github.com/repos/revel/revel/issues/events{/number}","events_url":"https://api.github.com/repos/revel/revel/events","assignees_url":"https://api.github.com/repos/revel/revel/assignees{/user}","branches_url":"https://api.github.com/repos/revel/revel/branches{/branch}","tags_url":"https://api.github.com/repos/revel/revel/tags","blobs_url":"https://api.github.com/repos/revel/revel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/revel/revel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/revel/revel/git/refs{/sha}","trees_url":"https://api.github.com/repos/revel/revel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/revel/revel/statuses/{sha}","languages_url":"https://api.github.com/repos/revel/revel/languages","stargazers_url":"https://api.github.com/repos/revel/revel/stargazers","contributors_url":"https://api.github.com/repos/revel/revel/contributors","subscribers_url":"https://api.github.com/repos/revel/revel/subscribers","subscription_url":"https://api.github.com/repos/revel/revel/subscription","commits_url":"https://api.github.com/repos/revel/revel/commits{/sha}","git_commits_url":"https://api.github.com/repos/revel/revel/git/commits{/sha}","comments_url":"https://api.github.com/repos/revel/revel/comments{/number}","issue_comment_url":"https://api.github.com/repos/revel/revel/issues/comments{/number}","contents_url":"https://api.github.com/repos/revel/revel/contents/{+path}","compare_url":"https://api.github.com/repos/revel/revel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/revel/revel/merges","archive_url":"https://api.github.com/repos/revel/revel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/revel/revel/downloads","issues_url":"https://api.github.com/repos/revel/revel/issues{/number}","pulls_url":"https://api.github.com/repos/revel/revel/pulls{/number}","milestones_url":"https://api.github.com/repos/revel/revel/milestones{/number}","notifications_url":"https://api.github.com/repos/revel/revel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/revel/revel/labels{/name}","releases_url":"https://api.github.com/repos/revel/revel/releases{/id}","created_at":"2011-12-09T04:10:26Z","updated_at":"2015-05-28T16:53:10Z","pushed_at":"2015-05-27T03:47:13Z","git_url":"git://github.com/revel/revel.git","ssh_url":"git@github.com:revel/revel.git","clone_url":"https://github.com/revel/revel.git","svn_url":"https://github.com/revel/revel","homepage":"http://revel.github.io","size":10281,"stargazers_count":5337,"watchers_count":5337,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":783,"mirror_url":null,"open_issues_count":145,"forks":783,"open_issues":145,"watchers":5337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/revel/revel/pulls/935"},"html":{"href":"https://github.com/revel/revel/pull/935"},"issue":{"href":"https://api.github.com/repos/revel/revel/issues/935"},"comments":{"href":"https://api.github.com/repos/revel/revel/issues/935/comments"},"review_comments":{"href":"https://api.github.com/repos/revel/revel/pulls/935/comments"},"review_comment":{"href":"https://api.github.com/repos/revel/revel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/revel/revel/pulls/935/commits"},"statuses":{"href":"https://api.github.com/repos/revel/revel/statuses/d12fafe6615eaa93e91de1a6e1dfefb9079bd03a"}}}}