{"action":"opened","issue":{"url":"https://api.github.com/repos/tyba/mongogen/issues/2","labels_url":"https://api.github.com/repos/tyba/mongogen/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/tyba/mongogen/issues/2/comments","events_url":"https://api.github.com/repos/tyba/mongogen/issues/2/events","html_url":"https://github.com/tyba/mongogen/issues/2","id":70665970,"number":2,"title":"Build Schema validation based on Schema structs ","user":{"login":"mcuadros","id":1573114,"avatar_url":"https://avatars.githubusercontent.com/u/1573114?v=3","gravatar_id":"","url":"https://api.github.com/users/mcuadros","html_url":"https://github.com/mcuadros","followers_url":"https://api.github.com/users/mcuadros/followers","following_url":"https://api.github.com/users/mcuadros/following{/other_user}","gists_url":"https://api.github.com/users/mcuadros/gists{/gist_id}","starred_url":"https://api.github.com/users/mcuadros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcuadros/subscriptions","organizations_url":"https://api.github.com/users/mcuadros/orgs","repos_url":"https://api.github.com/users/mcuadros/repos","events_url":"https://api.github.com/users/mcuadros/events{/privacy}","received_events_url":"https://api.github.com/users/mcuadros/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-24T11:29:24Z","updated_at":"2015-04-24T11:29:24Z","closed_at":null,"body":"```go\r\npackage main\r\n\r\nimport \"fmt\"\r\n\r\ntype Sort []FieldSort\r\n\r\ntype FieldSort struct {\r\n\tF Field\r\n\tD Dir\r\n}\r\n\r\ntype Field string\r\n\r\ntype Dir int\r\n\r\nconst (\r\n\tAsc  Dir = 1\r\n\tDesc Dir = -1\r\n)\r\n\r\nconst (\r\n\tFoo Field = \"foo\"\r\n)\r\n\r\n\r\ntype userSchema struct {\r\n\tFoo Field\r\n}\r\n\r\n\r\nvar UserSchema = userSchema{Foo:\"bar\"}\r\n\r\nfunc main() {\r\n\tfoo := Sort{{UserSchema.Foo, Asc}, {UserSchema.Foo, Desc}}\r\n\tfmt.Println(foo)\r\n}\r\n```"}}