{"action":"created","comment":{"url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/comments/48372583","id":48372583,"diff_hunk":"@@ -0,0 +1,51 @@\n+package service\n+\n+import (\n+\t\"io/ioutil\"\n+\t\"os\"\n+\t\"path\"\n+\t\"testing\"\n+\n+\t\"github.com/stretchr/testify/assert\"\n+)\n+\n+func TestIsRunning(t *testing.T) {\n+\tassert := assert.New(t)\n+\n+\tsvcs := []struct {\n+\t\tname        string\n+\t\tsysInitType string\n+\t}{\n+\t\t{\"docker\", \"upstart\"},\n+\t\t{\"docker\", \"systemd\"},\n+\t}\n+\n+\tstatuses := []string{\"running\", \"stopped\"}\n+\tfor _, status := range statuses {\n+\t\tfor _, svc := range svcs {\n+\t\t\tcurrentDir, err := os.Getwd()\n+\t\t\tassert.NoError(err)\n+\t\t\tfixturesPath := path.Join(currentDir, \"test-fixtures\",","path":"service/matchers_test.go","position":28,"original_position":28,"commit_id":"443a0e6665bc782a4087b531c6354f51225c3ae5","original_commit_id":"443a0e6665bc782a4087b531c6354f51225c3ae5","user":{"login":"milosgajdos83","id":1392526,"avatar_url":"https://avatars.githubusercontent.com/u/1392526?v=3","gravatar_id":"","url":"https://api.github.com/users/milosgajdos83","html_url":"https://github.com/milosgajdos83","followers_url":"https://api.github.com/users/milosgajdos83/followers","following_url":"https://api.github.com/users/milosgajdos83/following{/other_user}","gists_url":"https://api.github.com/users/milosgajdos83/gists{/gist_id}","starred_url":"https://api.github.com/users/milosgajdos83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosgajdos83/subscriptions","organizations_url":"https://api.github.com/users/milosgajdos83/orgs","repos_url":"https://api.github.com/users/milosgajdos83/repos","events_url":"https://api.github.com/users/milosgajdos83/events{/privacy}","received_events_url":"https://api.github.com/users/milosgajdos83/received_events","type":"User","site_admin":false},"body":"Excellent point! :+1: ","created_at":"2015-12-23T19:24:11Z","updated_at":"2015-12-23T19:24:11Z","html_url":"https://github.com/milosgajdos83/servpeek/pull/10#discussion_r48372583","pull_request_url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/comments/48372583"},"html":{"href":"https://github.com/milosgajdos83/servpeek/pull/10#discussion_r48372583"},"pull_request":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10","id":54476917,"html_url":"https://github.com/milosgajdos83/servpeek/pull/10","diff_url":"https://github.com/milosgajdos83/servpeek/pull/10.diff","patch_url":"https://github.com/milosgajdos83/servpeek/pull/10.patch","issue_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues/10","number":10,"state":"open","locked":false,"title":"command package changes, service unit tests, example program modified","user":{"login":"milosgajdos83","id":1392526,"avatar_url":"https://avatars.githubusercontent.com/u/1392526?v=3","gravatar_id":"","url":"https://api.github.com/users/milosgajdos83","html_url":"https://github.com/milosgajdos83","followers_url":"https://api.github.com/users/milosgajdos83/followers","following_url":"https://api.github.com/users/milosgajdos83/following{/other_user}","gists_url":"https://api.github.com/users/milosgajdos83/gists{/gist_id}","starred_url":"https://api.github.com/users/milosgajdos83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosgajdos83/subscriptions","organizations_url":"https://api.github.com/users/milosgajdos83/orgs","repos_url":"https://api.github.com/users/milosgajdos83/repos","events_url":"https://api.github.com/users/milosgajdos83/events{/privacy}","received_events_url":"https://api.github.com/users/milosgajdos83/received_events","type":"User","site_admin":false},"body":"This PR introduces some basic service package tests. They still need\r\nsome refactoring, but this is a good start.\r\n\r\nSome data structures (`command.Commander` and `command.Outer`\r\ninterfaces) in `command` package have been renamed to make them more\r\ndigestible and imo more semantically correct and consistent with other\r\nsimilar data structures in the project. The same has been done for\r\n`service.OsService`.\r\n\r\nExample program now shows how to build a simple `go` binary using\r\n`servpeek` packages. Getting rid of `_test.go` files in examples dir\r\nalso allows for running `go test ./...` in the project root which is the\r\nfirst step to integration with Circle/Travis.","created_at":"2015-12-23T15:01:32Z","updated_at":"2015-12-23T19:24:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e334da7c0bec71339f6ed31953ea6b2d18a8812e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10/commits","review_comments_url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10/comments","review_comment_url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/comments{/number}","comments_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues/10/comments","statuses_url":"https://api.github.com/repos/milosgajdos83/servpeek/statuses/443a0e6665bc782a4087b531c6354f51225c3ae5","head":{"label":"milosgajdos83:service-test","ref":"service-test","sha":"443a0e6665bc782a4087b531c6354f51225c3ae5","user":{"login":"milosgajdos83","id":1392526,"avatar_url":"https://avatars.githubusercontent.com/u/1392526?v=3","gravatar_id":"","url":"https://api.github.com/users/milosgajdos83","html_url":"https://github.com/milosgajdos83","followers_url":"https://api.github.com/users/milosgajdos83/followers","following_url":"https://api.github.com/users/milosgajdos83/following{/other_user}","gists_url":"https://api.github.com/users/milosgajdos83/gists{/gist_id}","starred_url":"https://api.github.com/users/milosgajdos83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosgajdos83/subscriptions","organizations_url":"https://api.github.com/users/milosgajdos83/orgs","repos_url":"https://api.github.com/users/milosgajdos83/repos","events_url":"https://api.github.com/users/milosgajdos83/events{/privacy}","received_events_url":"https://api.github.com/users/milosgajdos83/received_events","type":"User","site_admin":false},"repo":{"id":41961203,"name":"servpeek","full_name":"milosgajdos83/servpeek","owner":{"login":"milosgajdos83","id":1392526,"avatar_url":"https://avatars.githubusercontent.com/u/1392526?v=3","gravatar_id":"","url":"https://api.github.com/users/milosgajdos83","html_url":"https://github.com/milosgajdos83","followers_url":"https://api.github.com/users/milosgajdos83/followers","following_url":"https://api.github.com/users/milosgajdos83/following{/other_user}","gists_url":"https://api.github.com/users/milosgajdos83/gists{/gist_id}","starred_url":"https://api.github.com/users/milosgajdos83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosgajdos83/subscriptions","organizations_url":"https://api.github.com/users/milosgajdos83/orgs","repos_url":"https://api.github.com/users/milosgajdos83/repos","events_url":"https://api.github.com/users/milosgajdos83/events{/privacy}","received_events_url":"https://api.github.com/users/milosgajdos83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/milosgajdos83/servpeek","description":"Introspective peek into your server guts","fork":false,"url":"https://api.github.com/repos/milosgajdos83/servpeek","forks_url":"https://api.github.com/repos/milosgajdos83/servpeek/forks","keys_url":"https://api.github.com/repos/milosgajdos83/servpeek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/milosgajdos83/servpeek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/milosgajdos83/servpeek/teams","hooks_url":"https://api.github.com/repos/milosgajdos83/servpeek/hooks","issue_events_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues/events{/number}","events_url":"https://api.github.com/repos/milosgajdos83/servpeek/events","assignees_url":"https://api.github.com/repos/milosgajdos83/servpeek/assignees{/user}","branches_url":"https://api.github.com/repos/milosgajdos83/servpeek/branches{/branch}","tags_url":"https://api.github.com/repos/milosgajdos83/servpeek/tags","blobs_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/refs{/sha}","trees_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/milosgajdos83/servpeek/statuses/{sha}","languages_url":"https://api.github.com/repos/milosgajdos83/servpeek/languages","stargazers_url":"https://api.github.com/repos/milosgajdos83/servpeek/stargazers","contributors_url":"https://api.github.com/repos/milosgajdos83/servpeek/contributors","subscribers_url":"https://api.github.com/repos/milosgajdos83/servpeek/subscribers","subscription_url":"https://api.github.com/repos/milosgajdos83/servpeek/subscription","commits_url":"https://api.github.com/repos/milosgajdos83/servpeek/commits{/sha}","git_commits_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/commits{/sha}","comments_url":"https://api.github.com/repos/milosgajdos83/servpeek/comments{/number}","issue_comment_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues/comments{/number}","contents_url":"https://api.github.com/repos/milosgajdos83/servpeek/contents/{+path}","compare_url":"https://api.github.com/repos/milosgajdos83/servpeek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/milosgajdos83/servpeek/merges","archive_url":"https://api.github.com/repos/milosgajdos83/servpeek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/milosgajdos83/servpeek/downloads","issues_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues{/number}","pulls_url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls{/number}","milestones_url":"https://api.github.com/repos/milosgajdos83/servpeek/milestones{/number}","notifications_url":"https://api.github.com/repos/milosgajdos83/servpeek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/milosgajdos83/servpeek/labels{/name}","releases_url":"https://api.github.com/repos/milosgajdos83/servpeek/releases{/id}","created_at":"2015-09-05T13:09:02Z","updated_at":"2015-11-27T23:55:31Z","pushed_at":"2015-12-23T15:01:33Z","git_url":"git://github.com/milosgajdos83/servpeek.git","ssh_url":"git@github.com:milosgajdos83/servpeek.git","clone_url":"https://github.com/milosgajdos83/servpeek.git","svn_url":"https://github.com/milosgajdos83/servpeek","homepage":null,"size":180,"stargazers_count":13,"watchers_count":13,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":13,"default_branch":"master"}},"base":{"label":"milosgajdos83:master","ref":"master","sha":"ce72a7cffa164372fb5e76303446bc408172a5f3","user":{"login":"milosgajdos83","id":1392526,"avatar_url":"https://avatars.githubusercontent.com/u/1392526?v=3","gravatar_id":"","url":"https://api.github.com/users/milosgajdos83","html_url":"https://github.com/milosgajdos83","followers_url":"https://api.github.com/users/milosgajdos83/followers","following_url":"https://api.github.com/users/milosgajdos83/following{/other_user}","gists_url":"https://api.github.com/users/milosgajdos83/gists{/gist_id}","starred_url":"https://api.github.com/users/milosgajdos83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosgajdos83/subscriptions","organizations_url":"https://api.github.com/users/milosgajdos83/orgs","repos_url":"https://api.github.com/users/milosgajdos83/repos","events_url":"https://api.github.com/users/milosgajdos83/events{/privacy}","received_events_url":"https://api.github.com/users/milosgajdos83/received_events","type":"User","site_admin":false},"repo":{"id":41961203,"name":"servpeek","full_name":"milosgajdos83/servpeek","owner":{"login":"milosgajdos83","id":1392526,"avatar_url":"https://avatars.githubusercontent.com/u/1392526?v=3","gravatar_id":"","url":"https://api.github.com/users/milosgajdos83","html_url":"https://github.com/milosgajdos83","followers_url":"https://api.github.com/users/milosgajdos83/followers","following_url":"https://api.github.com/users/milosgajdos83/following{/other_user}","gists_url":"https://api.github.com/users/milosgajdos83/gists{/gist_id}","starred_url":"https://api.github.com/users/milosgajdos83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosgajdos83/subscriptions","organizations_url":"https://api.github.com/users/milosgajdos83/orgs","repos_url":"https://api.github.com/users/milosgajdos83/repos","events_url":"https://api.github.com/users/milosgajdos83/events{/privacy}","received_events_url":"https://api.github.com/users/milosgajdos83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/milosgajdos83/servpeek","description":"Introspective peek into your server guts","fork":false,"url":"https://api.github.com/repos/milosgajdos83/servpeek","forks_url":"https://api.github.com/repos/milosgajdos83/servpeek/forks","keys_url":"https://api.github.com/repos/milosgajdos83/servpeek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/milosgajdos83/servpeek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/milosgajdos83/servpeek/teams","hooks_url":"https://api.github.com/repos/milosgajdos83/servpeek/hooks","issue_events_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues/events{/number}","events_url":"https://api.github.com/repos/milosgajdos83/servpeek/events","assignees_url":"https://api.github.com/repos/milosgajdos83/servpeek/assignees{/user}","branches_url":"https://api.github.com/repos/milosgajdos83/servpeek/branches{/branch}","tags_url":"https://api.github.com/repos/milosgajdos83/servpeek/tags","blobs_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/refs{/sha}","trees_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/milosgajdos83/servpeek/statuses/{sha}","languages_url":"https://api.github.com/repos/milosgajdos83/servpeek/languages","stargazers_url":"https://api.github.com/repos/milosgajdos83/servpeek/stargazers","contributors_url":"https://api.github.com/repos/milosgajdos83/servpeek/contributors","subscribers_url":"https://api.github.com/repos/milosgajdos83/servpeek/subscribers","subscription_url":"https://api.github.com/repos/milosgajdos83/servpeek/subscription","commits_url":"https://api.github.com/repos/milosgajdos83/servpeek/commits{/sha}","git_commits_url":"https://api.github.com/repos/milosgajdos83/servpeek/git/commits{/sha}","comments_url":"https://api.github.com/repos/milosgajdos83/servpeek/comments{/number}","issue_comment_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues/comments{/number}","contents_url":"https://api.github.com/repos/milosgajdos83/servpeek/contents/{+path}","compare_url":"https://api.github.com/repos/milosgajdos83/servpeek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/milosgajdos83/servpeek/merges","archive_url":"https://api.github.com/repos/milosgajdos83/servpeek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/milosgajdos83/servpeek/downloads","issues_url":"https://api.github.com/repos/milosgajdos83/servpeek/issues{/number}","pulls_url":"https://api.github.com/repos/milosgajdos83/servpeek/pulls{/number}","milestones_url":"https://api.github.com/repos/milosgajdos83/servpeek/milestones{/number}","notifications_url":"https://api.github.com/repos/milosgajdos83/servpeek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/milosgajdos83/servpeek/labels{/name}","releases_url":"https://api.github.com/repos/milosgajdos83/servpeek/releases{/id}","created_at":"2015-09-05T13:09:02Z","updated_at":"2015-11-27T23:55:31Z","pushed_at":"2015-12-23T15:01:33Z","git_url":"git://github.com/milosgajdos83/servpeek.git","ssh_url":"git@github.com:milosgajdos83/servpeek.git","clone_url":"https://github.com/milosgajdos83/servpeek.git","svn_url":"https://github.com/milosgajdos83/servpeek","homepage":null,"size":180,"stargazers_count":13,"watchers_count":13,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10"},"html":{"href":"https://github.com/milosgajdos83/servpeek/pull/10"},"issue":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/issues/10"},"comments":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/milosgajdos83/servpeek/statuses/443a0e6665bc782a4087b531c6354f51225c3ae5"}}}}