{"action":"opened","number":797,"pull_request":{"url":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/797","id":61405438,"html_url":"https://github.com/SnabbCo/snabbswitch/pull/797","diff_url":"https://github.com/SnabbCo/snabbswitch/pull/797.diff","patch_url":"https://github.com/SnabbCo/snabbswitch/pull/797.patch","issue_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/797","number":797,"state":"open","locked":false,"title":"[sketch] Prevent typos in option tables","user":{"login":"wingo","id":1745903,"avatar_url":"https://avatars.githubusercontent.com/u/1745903?v=3","gravatar_id":"","url":"https://api.github.com/users/wingo","html_url":"https://github.com/wingo","followers_url":"https://api.github.com/users/wingo/followers","following_url":"https://api.github.com/users/wingo/following{/other_user}","gists_url":"https://api.github.com/users/wingo/gists{/gist_id}","starred_url":"https://api.github.com/users/wingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingo/subscriptions","organizations_url":"https://api.github.com/users/wingo/orgs","repos_url":"https://api.github.com/users/wingo/repos","events_url":"https://api.github.com/users/wingo/events{/privacy}","received_events_url":"https://api.github.com/users/wingo/received_events","type":"User","site_admin":false},"body":"Oftentimes we pass around tables of options.  Some of those options are required, some are optional.  Thing is, it becomes hard to add required options over time, as old code might not detect that it needs to change; it's also hard to let old code know when options go away; and most importantly it's easy to make typos.  It's also a bit of irritating effort to provide for optional values which default to false; the idiom `conf.foo = conf.foo or bar` is just too easy to type.\r\n\r\nIn the lwaftr and in pflua we use helpers to parse options that solve all these problems.  Maybe they're good for snabb itself?  Feedback welcome @lukego @eugeneia :)\r\n\r\nI note that @kbara once thought this sort of thing was too much machinery, then it caught a nice bug and she became a believer :)","created_at":"2016-03-02T14:13:13Z","updated_at":"2016-03-02T14:13:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/797/commits","review_comments_url":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/797/comments","review_comment_url":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/797/comments","statuses_url":"https://api.github.com/repos/SnabbCo/snabbswitch/statuses/823fcb9efdc3e230d6c922e08e93b6d789d626e7","head":{"label":"wingo:prevent-typos-in-option-tables","ref":"prevent-typos-in-option-tables","sha":"823fcb9efdc3e230d6c922e08e93b6d789d626e7","user":{"login":"wingo","id":1745903,"avatar_url":"https://avatars.githubusercontent.com/u/1745903?v=3","gravatar_id":"","url":"https://api.github.com/users/wingo","html_url":"https://github.com/wingo","followers_url":"https://api.github.com/users/wingo/followers","following_url":"https://api.github.com/users/wingo/following{/other_user}","gists_url":"https://api.github.com/users/wingo/gists{/gist_id}","starred_url":"https://api.github.com/users/wingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingo/subscriptions","organizations_url":"https://api.github.com/users/wingo/orgs","repos_url":"https://api.github.com/users/wingo/repos","events_url":"https://api.github.com/users/wingo/events{/privacy}","received_events_url":"https://api.github.com/users/wingo/received_events","type":"User","site_admin":false},"repo":{"id":24632540,"name":"snabbswitch","full_name":"wingo/snabbswitch","owner":{"login":"wingo","id":1745903,"avatar_url":"https://avatars.githubusercontent.com/u/1745903?v=3","gravatar_id":"","url":"https://api.github.com/users/wingo","html_url":"https://github.com/wingo","followers_url":"https://api.github.com/users/wingo/followers","following_url":"https://api.github.com/users/wingo/following{/other_user}","gists_url":"https://api.github.com/users/wingo/gists{/gist_id}","starred_url":"https://api.github.com/users/wingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingo/subscriptions","organizations_url":"https://api.github.com/users/wingo/orgs","repos_url":"https://api.github.com/users/wingo/repos","events_url":"https://api.github.com/users/wingo/events{/privacy}","received_events_url":"https://api.github.com/users/wingo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wingo/snabbswitch","description":"Snabb Switch: Fast open source packet processing","fork":true,"url":"https://api.github.com/repos/wingo/snabbswitch","forks_url":"https://api.github.com/repos/wingo/snabbswitch/forks","keys_url":"https://api.github.com/repos/wingo/snabbswitch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wingo/snabbswitch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wingo/snabbswitch/teams","hooks_url":"https://api.github.com/repos/wingo/snabbswitch/hooks","issue_events_url":"https://api.github.com/repos/wingo/snabbswitch/issues/events{/number}","events_url":"https://api.github.com/repos/wingo/snabbswitch/events","assignees_url":"https://api.github.com/repos/wingo/snabbswitch/assignees{/user}","branches_url":"https://api.github.com/repos/wingo/snabbswitch/branches{/branch}","tags_url":"https://api.github.com/repos/wingo/snabbswitch/tags","blobs_url":"https://api.github.com/repos/wingo/snabbswitch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wingo/snabbswitch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wingo/snabbswitch/git/refs{/sha}","trees_url":"https://api.github.com/repos/wingo/snabbswitch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wingo/snabbswitch/statuses/{sha}","languages_url":"https://api.github.com/repos/wingo/snabbswitch/languages","stargazers_url":"https://api.github.com/repos/wingo/snabbswitch/stargazers","contributors_url":"https://api.github.com/repos/wingo/snabbswitch/contributors","subscribers_url":"https://api.github.com/repos/wingo/snabbswitch/subscribers","subscription_url":"https://api.github.com/repos/wingo/snabbswitch/subscription","commits_url":"https://api.github.com/repos/wingo/snabbswitch/commits{/sha}","git_commits_url":"https://api.github.com/repos/wingo/snabbswitch/git/commits{/sha}","comments_url":"https://api.github.com/repos/wingo/snabbswitch/comments{/number}","issue_comment_url":"https://api.github.com/repos/wingo/snabbswitch/issues/comments{/number}","contents_url":"https://api.github.com/repos/wingo/snabbswitch/contents/{+path}","compare_url":"https://api.github.com/repos/wingo/snabbswitch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wingo/snabbswitch/merges","archive_url":"https://api.github.com/repos/wingo/snabbswitch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wingo/snabbswitch/downloads","issues_url":"https://api.github.com/repos/wingo/snabbswitch/issues{/number}","pulls_url":"https://api.github.com/repos/wingo/snabbswitch/pulls{/number}","milestones_url":"https://api.github.com/repos/wingo/snabbswitch/milestones{/number}","notifications_url":"https://api.github.com/repos/wingo/snabbswitch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wingo/snabbswitch/labels{/name}","releases_url":"https://api.github.com/repos/wingo/snabbswitch/releases{/id}","deployments_url":"https://api.github.com/repos/wingo/snabbswitch/deployments","created_at":"2014-09-30T09:31:35Z","updated_at":"2016-02-02T14:46:52Z","pushed_at":"2016-03-02T14:03:22Z","git_url":"git://github.com/wingo/snabbswitch.git","ssh_url":"git@github.com:wingo/snabbswitch.git","clone_url":"https://github.com/wingo/snabbswitch.git","svn_url":"https://github.com/wingo/snabbswitch","homepage":"","size":6039,"stargazers_count":3,"watchers_count":3,"language":"Lua","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":3,"default_branch":"wingo-next"}},"base":{"label":"SnabbCo:master","ref":"master","sha":"ed346d593a991fb14e8284797cfc6d8b16f2c7ac","user":{"login":"SnabbCo","id":1913310,"avatar_url":"https://avatars.githubusercontent.com/u/1913310?v=3","gravatar_id":"","url":"https://api.github.com/users/SnabbCo","html_url":"https://github.com/SnabbCo","followers_url":"https://api.github.com/users/SnabbCo/followers","following_url":"https://api.github.com/users/SnabbCo/following{/other_user}","gists_url":"https://api.github.com/users/SnabbCo/gists{/gist_id}","starred_url":"https://api.github.com/users/SnabbCo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnabbCo/subscriptions","organizations_url":"https://api.github.com/users/SnabbCo/orgs","repos_url":"https://api.github.com/users/SnabbCo/repos","events_url":"https://api.github.com/users/SnabbCo/events{/privacy}","received_events_url":"https://api.github.com/users/SnabbCo/received_events","type":"Organization","site_admin":false},"repo":{"id":4857740,"name":"snabbswitch","full_name":"SnabbCo/snabbswitch","owner":{"login":"SnabbCo","id":1913310,"avatar_url":"https://avatars.githubusercontent.com/u/1913310?v=3","gravatar_id":"","url":"https://api.github.com/users/SnabbCo","html_url":"https://github.com/SnabbCo","followers_url":"https://api.github.com/users/SnabbCo/followers","following_url":"https://api.github.com/users/SnabbCo/following{/other_user}","gists_url":"https://api.github.com/users/SnabbCo/gists{/gist_id}","starred_url":"https://api.github.com/users/SnabbCo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnabbCo/subscriptions","organizations_url":"https://api.github.com/users/SnabbCo/orgs","repos_url":"https://api.github.com/users/SnabbCo/repos","events_url":"https://api.github.com/users/SnabbCo/events{/privacy}","received_events_url":"https://api.github.com/users/SnabbCo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SnabbCo/snabbswitch","description":"Snabb Switch: Simple and fast packet networking","fork":false,"url":"https://api.github.com/repos/SnabbCo/snabbswitch","forks_url":"https://api.github.com/repos/SnabbCo/snabbswitch/forks","keys_url":"https://api.github.com/repos/SnabbCo/snabbswitch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SnabbCo/snabbswitch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SnabbCo/snabbswitch/teams","hooks_url":"https://api.github.com/repos/SnabbCo/snabbswitch/hooks","issue_events_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/events{/number}","events_url":"https://api.github.com/repos/SnabbCo/snabbswitch/events","assignees_url":"https://api.github.com/repos/SnabbCo/snabbswitch/assignees{/user}","branches_url":"https://api.github.com/repos/SnabbCo/snabbswitch/branches{/branch}","tags_url":"https://api.github.com/repos/SnabbCo/snabbswitch/tags","blobs_url":"https://api.github.com/repos/SnabbCo/snabbswitch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SnabbCo/snabbswitch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SnabbCo/snabbswitch/git/refs{/sha}","trees_url":"https://api.github.com/repos/SnabbCo/snabbswitch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SnabbCo/snabbswitch/statuses/{sha}","languages_url":"https://api.github.com/repos/SnabbCo/snabbswitch/languages","stargazers_url":"https://api.github.com/repos/SnabbCo/snabbswitch/stargazers","contributors_url":"https://api.github.com/repos/SnabbCo/snabbswitch/contributors","subscribers_url":"https://api.github.com/repos/SnabbCo/snabbswitch/subscribers","subscription_url":"https://api.github.com/repos/SnabbCo/snabbswitch/subscription","commits_url":"https://api.github.com/repos/SnabbCo/snabbswitch/commits{/sha}","git_commits_url":"https://api.github.com/repos/SnabbCo/snabbswitch/git/commits{/sha}","comments_url":"https://api.github.com/repos/SnabbCo/snabbswitch/comments{/number}","issue_comment_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/comments{/number}","contents_url":"https://api.github.com/repos/SnabbCo/snabbswitch/contents/{+path}","compare_url":"https://api.github.com/repos/SnabbCo/snabbswitch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SnabbCo/snabbswitch/merges","archive_url":"https://api.github.com/repos/SnabbCo/snabbswitch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SnabbCo/snabbswitch/downloads","issues_url":"https://api.github.com/repos/SnabbCo/snabbswitch/issues{/number}","pulls_url":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls{/number}","milestones_url":"https://api.github.com/repos/SnabbCo/snabbswitch/milestones{/number}","notifications_url":"https://api.github.com/repos/SnabbCo/snabbswitch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SnabbCo/snabbswitch/labels{/name}","releases_url":"https://api.github.com/repos/SnabbCo/snabbswitch/releases{/id}","deployments_url":"https://api.github.com/repos/SnabbCo/snabbswitch/deployments","created_at":"2012-07-02T09:06:38Z","updated_at":"2016-03-01T00:50:40Z","pushed_at":"2016-03-02T14:13:14Z","git_url":"git://github.com/SnabbCo/snabbswitch.git","ssh_url":"git@github.com:SnabbCo/snabbswitch.git","clone_url":"https://github.com/SnabbCo/snabbswitch.git","svn_url":"https://github.com/SnabbCo/snabbswitch","homepage":"","size":9220,"stargazers_count":1256,"watchers_count":1256,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":94,"forks":158,"open_issues":94,"watchers":1256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/797"},"html":{"href":"https://github.com/SnabbCo/snabbswitch/pull/797"},"issue":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/797"},"comments":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/issues/797/comments"},"review_comments":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/797/comments"},"review_comment":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/pulls/797/commits"},"statuses":{"href":"https://api.github.com/repos/SnabbCo/snabbswitch/statuses/823fcb9efdc3e230d6c922e08e93b6d789d626e7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":77,"deletions":3,"changed_files":2}}