{"action":"created","issue":{"url":"https://api.github.com/repos/bobziuchkovski/writ/issues/2","repository_url":"https://api.github.com/repos/bobziuchkovski/writ","labels_url":"https://api.github.com/repos/bobziuchkovski/writ/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/bobziuchkovski/writ/issues/2/comments","events_url":"https://api.github.com/repos/bobziuchkovski/writ/issues/2/events","html_url":"https://github.com/bobziuchkovski/writ/issues/2","id":128894948,"number":2,"title":"Option.Default field?","user":{"login":"elithrar","id":18544,"avatar_url":"https://avatars.githubusercontent.com/u/18544?v=3","gravatar_id":"","url":"https://api.github.com/users/elithrar","html_url":"https://github.com/elithrar","followers_url":"https://api.github.com/users/elithrar/followers","following_url":"https://api.github.com/users/elithrar/following{/other_user}","gists_url":"https://api.github.com/users/elithrar/gists{/gist_id}","starred_url":"https://api.github.com/users/elithrar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elithrar/subscriptions","organizations_url":"https://api.github.com/users/elithrar/orgs","repos_url":"https://api.github.com/users/elithrar/repos","events_url":"https://api.github.com/users/elithrar/events{/privacy}","received_events_url":"https://api.github.com/users/elithrar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-26T18:01:31Z","updated_at":"2016-02-07T16:11:04Z","closed_at":null,"body":"Has an `Option.Default` field been considered? I prefer to write options without struct tags (since struct tags aren't checked by the compiler, leading to my issue yesterday), but right now you need to write the following:\r\n\r\n```go\r\n\t{\r\n\t\tNames:       []string{\"count\"},\r\n\t\tDescription: \"The (maximum) number of logs to request.\",\r\n\t\tPlaceholder: \"<num>\",\r\n\t\tDecoder:     writ.NewDefaulter(writ.NewOptionDecoder(config.Count), \"1\"),\r\n\t},\r\n```\r\n\r\nThis isn't bad, but it:\r\n\r\n* Limits you to strings - if the field is an `int64` or other time (say, for Unix timestamps) then you can't set a default.\r\n*  A `Default` field would be more explicit and would better map against the existing struct tag names."},"comment":{"url":"https://api.github.com/repos/bobziuchkovski/writ/issues/comments/181040467","html_url":"https://github.com/bobziuchkovski/writ/issues/2#issuecomment-181040467","issue_url":"https://api.github.com/repos/bobziuchkovski/writ/issues/2","id":181040467,"user":{"login":"bobziuchkovski","id":675443,"avatar_url":"https://avatars.githubusercontent.com/u/675443?v=3","gravatar_id":"","url":"https://api.github.com/users/bobziuchkovski","html_url":"https://github.com/bobziuchkovski","followers_url":"https://api.github.com/users/bobziuchkovski/followers","following_url":"https://api.github.com/users/bobziuchkovski/following{/other_user}","gists_url":"https://api.github.com/users/bobziuchkovski/gists{/gist_id}","starred_url":"https://api.github.com/users/bobziuchkovski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobziuchkovski/subscriptions","organizations_url":"https://api.github.com/users/bobziuchkovski/orgs","repos_url":"https://api.github.com/users/bobziuchkovski/repos","events_url":"https://api.github.com/users/bobziuchkovski/events{/privacy}","received_events_url":"https://api.github.com/users/bobziuchkovski/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T16:11:04Z","updated_at":"2016-02-07T16:11:04Z","body":"Yep, I don't plan to remove the explicit Command/Option support.  While I like the struct tags personally, I'm definitely aware there's value in having the compiler statically type-check everything.\r\n\r\nJust to confirm, the main issues you're facing are:\r\n\r\n1. You'd like an a more streamlines mechanism for explicit Command/Option construction, so that there's less work involved using those APIs?\r\n2. You'd like a different way to specify default values for Options?"}}