{"action":"created","comment":{"url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/comments/63783352","id":63783352,"diff_hunk":"@@ -20,17 +20,222 @@\n \n package gen\n \n-import \"github.com/thriftrw/thriftrw-go/compile\"\n+import (\n+\t\"fmt\"\n+\t\"strconv\"\n \n-// Constant TODO\n+\t\"github.com/thriftrw/thriftrw-go/compile\"\n+)\n+\n+// Constant generates code for `const` expressions in Thrift files.\n func Constant(g Generator, c *compile.Constant) error {\n \terr := g.DeclareFromTemplate(\n-\t\t`\n-\t\tconst <goCase .Name> <typeReference .Type> = nil // TODO\n-\t\t`,\n+\t\t`<if canBeConstant .Type>const<else>var<end> <goCase .Name> <typeReference .Type> = <constantValue .Value .Type>`,\n \t\tc,\n+\t\tTemplateFunc(\"constantValue\", ConstantValue),\n+\t\tTemplateFunc(\"canBeConstant\", canBeConstant),\n \t)\n-\t// TODO(abg): Implement constantValue\n-\t// TODO(abg): Complex types will need to use var rather than const\n \treturn wrapGenerateError(c.Name, err)\n }\n+\n+// ConstantValue generates an expression containing the given constant value of\n+// the given type.\n+//\n+// The constant must already have been linked to the given type.\n+func ConstantValue(g Generator, c compile.ConstantValue, t compile.TypeSpec) (string, error) {\n+\tswitch v := c.(type) {\n+\tcase compile.ConstantBool:\n+\t\tif v {\n+\t\t\treturn \"true\", nil\n+\t\t}\n+\t\treturn \"false\", nil\n+\tcase compile.ConstantDouble:\n+\t\treturn fmt.Sprint(float64(v)), nil\n+\tcase compile.ConstantInt:\n+\t\treturn fmt.Sprint(int(v)), nil\n+\tcase compile.ConstantList:\n+\t\tl, ok := t.(*compile.ListSpec)\n+\t\tif !ok {\n+\t\t\treturn \"\", fmt.Errorf(\n+\t\t\t\t\"cannot cast list %v to %v\", v, t.ThriftName())\n+\t\t}\n+\t\treturn g.TextTemplate(\n+\t\t\t`\n+\t\t\t<$valueType := .Spec.ValueSpec>\n+\t\t\t<typeReference .Spec>{\n+\t\t\t\t<range .Value>\n+\t\t\t\t\t<constantValue . $valueType>,\n+\t\t\t\t<end>\n+\t\t\t}`, struct {\n+\t\t\t\tSpec  *compile.ListSpec\n+\t\t\t\tValue compile.ConstantList\n+\t\t\t}{Spec: l, Value: v},\n+\t\t\tTemplateFunc(\"constantValue\", ConstantValue))\n+\tcase compile.ConstantMap:\n+\t\tm, ok := t.(*compile.MapSpec)\n+\t\tif !ok {\n+\t\t\treturn \"\", fmt.Errorf(\n+\t\t\t\t\"cannot cast map %v to %v\", v, t.ThriftName())\n+\t\t}\n+\t\treturn g.TextTemplate(\n+\t\t\t`\n+\t\t\t<$keyType := .Spec.KeySpec>\n+\t\t\t<$valueType := .Spec.ValueSpec>\n+\t\t\t<typeReference .Spec>{\n+\t\t\t\t<range .Value>\n+\t\t\t\t\t<if isHashable $keyType>\n+\t\t\t\t\t\t<constantValue .Key $keyType>:\n+\t\t\t\t\t\t\t<constantValue .Value $valueType>,\n+\t\t\t\t\t<else>\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tKey: <constantValue .Key $keyType>,\n+\t\t\t\t\t\t\tValue: <constantValue .Value $valueType>,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t<end>\n+\t\t\t\t<end>\n+\t\t\t}`, struct {\n+\t\t\t\tSpec  *compile.MapSpec\n+\t\t\t\tValue compile.ConstantMap\n+\t\t\t}{Spec: m, Value: v},\n+\t\t\tTemplateFunc(\"constantValue\", ConstantValue))\n+\tcase compile.ConstantSet:\n+\t\ts, ok := t.(*compile.SetSpec)\n+\t\tif !ok {\n+\t\t\treturn \"\", fmt.Errorf(\n+\t\t\t\t\"cannot cast set %v to %v\", v, t.ThriftName())\n+\t\t}\n+\t\treturn g.TextTemplate(\n+\t\t\t`\n+\t\t\t<$valueType := .Spec.ValueSpec>\n+\t\t\t<typeReference .Spec>{\n+\t\t\t\t<range .Value>\n+\t\t\t\t\t<if isHashable $valueType>\n+\t\t\t\t\t\t<constantValue . $valueType>: struct{}{},\n+\t\t\t\t\t<else>\n+\t\t\t\t\t\t<constantValue . $valueType>,\n+\t\t\t\t\t<end>\n+\t\t\t\t<end>\n+\t\t\t}`, struct {\n+\t\t\t\tSpec  *compile.SetSpec\n+\t\t\t\tValue compile.ConstantSet\n+\t\t\t}{Spec: s, Value: v},\n+\t\t\tTemplateFunc(\"constantValue\", ConstantValue))\n+\tcase compile.ConstantString:\n+\t\treturn strconv.Quote(string(v)), nil\n+\tcase *compile.ConstantStruct:\n+\t\ts, ok := t.(*compile.StructSpec)\n+\t\tif !ok {\n+\t\t\treturn \"\", fmt.Errorf(\n+\t\t\t\t\"cannot cast struct %v to %v\", v, t.ThriftName())\n+\t\t}\n+\t\treturn g.TextTemplate(\n+\t\t\t`\n+\t\t\t<$fields := .Spec.Fields>\n+\t\t\t&<typeName .Spec>{\n+\t\t\t\t<range $name, $value := .Value.Fields>\n+\t\t\t\t\t<$field := $fields.FindByName $name>\n+\t\t\t\t\t<if and (not $field.Required) (isPrimitiveType $field.Type)>\n+\t\t\t\t\t\t<goCase $field.Name>: <primitiveValueRef $value $field.Type>,\n+\t\t\t\t\t<else>\n+\t\t\t\t\t\t<goCase $field.Name>: <constantValue $value $field.Type>,\n+\t\t\t\t\t<end>\n+\t\t\t\t<end>\n+\t\t\t}`, struct {\n+\t\t\t\tSpec  *compile.StructSpec\n+\t\t\t\tValue *compile.ConstantStruct\n+\t\t\t}{Spec: s, Value: v},\n+\t\t\tTemplateFunc(\"constantValue\", ConstantValue),\n+\t\t\tTemplateFunc(\"primitiveValueRef\", primitiveValueRef),\n+\t\t)\n+\tcase compile.EnumItemReference:\n+\t\treturn g.TextTemplate(`<typeName .Enum><goCase .Item.Name>`, v)\n+\tcase compile.ConstReference:\n+\t\treturn g.LookupConstantName(v.Target)\n+\tdefault:\n+\t\tpanic(fmt.Sprintf(\"Unknown constant value %v (%T)\", c, c))\n+\t}\n+}\n+\n+// helper to generate pointers to primitives\n+func primitiveValueRef(g Generator, c compile.ConstantValue, t compile.TypeSpec) (string, error) {\n+\tvar toptr string\n+\tswitch t {\n+\tcase compile.BoolSpec:\n+\t\ttoptr = \"_boolptr\"\n+\t\terr := g.EnsureDeclared(\n+\t\t\t`func _boolptr(v bool) *bool { return &v }`, nil)\n+\t\tif err != nil {\n+\t\t\treturn \"\", err\n+\t\t}\n+\tcase compile.I8Spec:\n+\t\ttoptr = \"_i8ptr\"","path":"gen/constant.go","position":159,"original_position":159,"commit_id":"46ff17960aefdcc1d061fd3105c9a16390ddc6bd","original_commit_id":"46ff17960aefdcc1d061fd3105c9a16390ddc6bd","user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"body":"optional: since we parse the template and get the function declaration we find, should `EnsureDeclared` just return the name rather than duplicating it?","created_at":"2016-05-18T21:13:24Z","updated_at":"2016-05-18T21:13:24Z","html_url":"https://github.com/thriftrw/thriftrw-go/pull/121#discussion_r63783352","pull_request_url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121","_links":{"self":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/comments/63783352"},"html":{"href":"https://github.com/thriftrw/thriftrw-go/pull/121#discussion_r63783352"},"pull_request":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121"}}},"pull_request":{"url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121","id":70455575,"html_url":"https://github.com/thriftrw/thriftrw-go/pull/121","diff_url":"https://github.com/thriftrw/thriftrw-go/pull/121.diff","patch_url":"https://github.com/thriftrw/thriftrw-go/pull/121.patch","issue_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/121","number":121,"state":"open","locked":false,"title":"Generate code for consts","user":{"login":"abhinav","id":41730,"avatar_url":"https://avatars.githubusercontent.com/u/41730?v=3","gravatar_id":"","url":"https://api.github.com/users/abhinav","html_url":"https://github.com/abhinav","followers_url":"https://api.github.com/users/abhinav/followers","following_url":"https://api.github.com/users/abhinav/following{/other_user}","gists_url":"https://api.github.com/users/abhinav/gists{/gist_id}","starred_url":"https://api.github.com/users/abhinav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhinav/subscriptions","organizations_url":"https://api.github.com/users/abhinav/orgs","repos_url":"https://api.github.com/users/abhinav/repos","events_url":"https://api.github.com/users/abhinav/events{/privacy}","received_events_url":"https://api.github.com/users/abhinav/received_events","type":"User","site_admin":false},"body":"This adds support for generating code for `const` declarations in Thrift files.\r\n\r\nResolves #70\r\n","created_at":"2016-05-18T01:08:59Z","updated_at":"2016-05-18T21:13:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30a650283dac9a897ac095360852de8a32084a48","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121/commits","review_comments_url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121/comments","review_comment_url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/121/comments","statuses_url":"https://api.github.com/repos/thriftrw/thriftrw-go/statuses/46ff17960aefdcc1d061fd3105c9a16390ddc6bd","head":{"label":"thriftrw:constant-value-generation","ref":"constant-value-generation","sha":"46ff17960aefdcc1d061fd3105c9a16390ddc6bd","user":{"login":"thriftrw","id":16569516,"avatar_url":"https://avatars.githubusercontent.com/u/16569516?v=3","gravatar_id":"","url":"https://api.github.com/users/thriftrw","html_url":"https://github.com/thriftrw","followers_url":"https://api.github.com/users/thriftrw/followers","following_url":"https://api.github.com/users/thriftrw/following{/other_user}","gists_url":"https://api.github.com/users/thriftrw/gists{/gist_id}","starred_url":"https://api.github.com/users/thriftrw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thriftrw/subscriptions","organizations_url":"https://api.github.com/users/thriftrw/orgs","repos_url":"https://api.github.com/users/thriftrw/repos","events_url":"https://api.github.com/users/thriftrw/events{/privacy}","received_events_url":"https://api.github.com/users/thriftrw/received_events","type":"Organization","site_admin":false},"repo":{"id":45574831,"name":"thriftrw-go","full_name":"thriftrw/thriftrw-go","owner":{"login":"thriftrw","id":16569516,"avatar_url":"https://avatars.githubusercontent.com/u/16569516?v=3","gravatar_id":"","url":"https://api.github.com/users/thriftrw","html_url":"https://github.com/thriftrw","followers_url":"https://api.github.com/users/thriftrw/followers","following_url":"https://api.github.com/users/thriftrw/following{/other_user}","gists_url":"https://api.github.com/users/thriftrw/gists{/gist_id}","starred_url":"https://api.github.com/users/thriftrw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thriftrw/subscriptions","organizations_url":"https://api.github.com/users/thriftrw/orgs","repos_url":"https://api.github.com/users/thriftrw/repos","events_url":"https://api.github.com/users/thriftrw/events{/privacy}","received_events_url":"https://api.github.com/users/thriftrw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thriftrw/thriftrw-go","description":"A Thrift encoding code generator and library for Go","fork":false,"url":"https://api.github.com/repos/thriftrw/thriftrw-go","forks_url":"https://api.github.com/repos/thriftrw/thriftrw-go/forks","keys_url":"https://api.github.com/repos/thriftrw/thriftrw-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thriftrw/thriftrw-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thriftrw/thriftrw-go/teams","hooks_url":"https://api.github.com/repos/thriftrw/thriftrw-go/hooks","issue_events_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/events{/number}","events_url":"https://api.github.com/repos/thriftrw/thriftrw-go/events","assignees_url":"https://api.github.com/repos/thriftrw/thriftrw-go/assignees{/user}","branches_url":"https://api.github.com/repos/thriftrw/thriftrw-go/branches{/branch}","tags_url":"https://api.github.com/repos/thriftrw/thriftrw-go/tags","blobs_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thriftrw/thriftrw-go/statuses/{sha}","languages_url":"https://api.github.com/repos/thriftrw/thriftrw-go/languages","stargazers_url":"https://api.github.com/repos/thriftrw/thriftrw-go/stargazers","contributors_url":"https://api.github.com/repos/thriftrw/thriftrw-go/contributors","subscribers_url":"https://api.github.com/repos/thriftrw/thriftrw-go/subscribers","subscription_url":"https://api.github.com/repos/thriftrw/thriftrw-go/subscription","commits_url":"https://api.github.com/repos/thriftrw/thriftrw-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/thriftrw/thriftrw-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/thriftrw/thriftrw-go/contents/{+path}","compare_url":"https://api.github.com/repos/thriftrw/thriftrw-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thriftrw/thriftrw-go/merges","archive_url":"https://api.github.com/repos/thriftrw/thriftrw-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thriftrw/thriftrw-go/downloads","issues_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues{/number}","pulls_url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls{/number}","milestones_url":"https://api.github.com/repos/thriftrw/thriftrw-go/milestones{/number}","notifications_url":"https://api.github.com/repos/thriftrw/thriftrw-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thriftrw/thriftrw-go/labels{/name}","releases_url":"https://api.github.com/repos/thriftrw/thriftrw-go/releases{/id}","deployments_url":"https://api.github.com/repos/thriftrw/thriftrw-go/deployments","created_at":"2015-11-04T23:43:00Z","updated_at":"2016-05-13T04:57:52Z","pushed_at":"2016-05-18T18:37:49Z","git_url":"git://github.com/thriftrw/thriftrw-go.git","ssh_url":"git@github.com:thriftrw/thriftrw-go.git","clone_url":"https://github.com/thriftrw/thriftrw-go.git","svn_url":"https://github.com/thriftrw/thriftrw-go","homepage":"","size":573,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":3,"default_branch":"master"}},"base":{"label":"thriftrw:master","ref":"master","sha":"a67c129dfd257774a012c22c12cf5228a586ab4a","user":{"login":"thriftrw","id":16569516,"avatar_url":"https://avatars.githubusercontent.com/u/16569516?v=3","gravatar_id":"","url":"https://api.github.com/users/thriftrw","html_url":"https://github.com/thriftrw","followers_url":"https://api.github.com/users/thriftrw/followers","following_url":"https://api.github.com/users/thriftrw/following{/other_user}","gists_url":"https://api.github.com/users/thriftrw/gists{/gist_id}","starred_url":"https://api.github.com/users/thriftrw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thriftrw/subscriptions","organizations_url":"https://api.github.com/users/thriftrw/orgs","repos_url":"https://api.github.com/users/thriftrw/repos","events_url":"https://api.github.com/users/thriftrw/events{/privacy}","received_events_url":"https://api.github.com/users/thriftrw/received_events","type":"Organization","site_admin":false},"repo":{"id":45574831,"name":"thriftrw-go","full_name":"thriftrw/thriftrw-go","owner":{"login":"thriftrw","id":16569516,"avatar_url":"https://avatars.githubusercontent.com/u/16569516?v=3","gravatar_id":"","url":"https://api.github.com/users/thriftrw","html_url":"https://github.com/thriftrw","followers_url":"https://api.github.com/users/thriftrw/followers","following_url":"https://api.github.com/users/thriftrw/following{/other_user}","gists_url":"https://api.github.com/users/thriftrw/gists{/gist_id}","starred_url":"https://api.github.com/users/thriftrw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thriftrw/subscriptions","organizations_url":"https://api.github.com/users/thriftrw/orgs","repos_url":"https://api.github.com/users/thriftrw/repos","events_url":"https://api.github.com/users/thriftrw/events{/privacy}","received_events_url":"https://api.github.com/users/thriftrw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thriftrw/thriftrw-go","description":"A Thrift encoding code generator and library for Go","fork":false,"url":"https://api.github.com/repos/thriftrw/thriftrw-go","forks_url":"https://api.github.com/repos/thriftrw/thriftrw-go/forks","keys_url":"https://api.github.com/repos/thriftrw/thriftrw-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thriftrw/thriftrw-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thriftrw/thriftrw-go/teams","hooks_url":"https://api.github.com/repos/thriftrw/thriftrw-go/hooks","issue_events_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/events{/number}","events_url":"https://api.github.com/repos/thriftrw/thriftrw-go/events","assignees_url":"https://api.github.com/repos/thriftrw/thriftrw-go/assignees{/user}","branches_url":"https://api.github.com/repos/thriftrw/thriftrw-go/branches{/branch}","tags_url":"https://api.github.com/repos/thriftrw/thriftrw-go/tags","blobs_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thriftrw/thriftrw-go/statuses/{sha}","languages_url":"https://api.github.com/repos/thriftrw/thriftrw-go/languages","stargazers_url":"https://api.github.com/repos/thriftrw/thriftrw-go/stargazers","contributors_url":"https://api.github.com/repos/thriftrw/thriftrw-go/contributors","subscribers_url":"https://api.github.com/repos/thriftrw/thriftrw-go/subscribers","subscription_url":"https://api.github.com/repos/thriftrw/thriftrw-go/subscription","commits_url":"https://api.github.com/repos/thriftrw/thriftrw-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/thriftrw/thriftrw-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/thriftrw/thriftrw-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/thriftrw/thriftrw-go/contents/{+path}","compare_url":"https://api.github.com/repos/thriftrw/thriftrw-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thriftrw/thriftrw-go/merges","archive_url":"https://api.github.com/repos/thriftrw/thriftrw-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thriftrw/thriftrw-go/downloads","issues_url":"https://api.github.com/repos/thriftrw/thriftrw-go/issues{/number}","pulls_url":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls{/number}","milestones_url":"https://api.github.com/repos/thriftrw/thriftrw-go/milestones{/number}","notifications_url":"https://api.github.com/repos/thriftrw/thriftrw-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thriftrw/thriftrw-go/labels{/name}","releases_url":"https://api.github.com/repos/thriftrw/thriftrw-go/releases{/id}","deployments_url":"https://api.github.com/repos/thriftrw/thriftrw-go/deployments","created_at":"2015-11-04T23:43:00Z","updated_at":"2016-05-13T04:57:52Z","pushed_at":"2016-05-18T18:37:49Z","git_url":"git://github.com/thriftrw/thriftrw-go.git","ssh_url":"git@github.com:thriftrw/thriftrw-go.git","clone_url":"https://github.com/thriftrw/thriftrw-go.git","svn_url":"https://github.com/thriftrw/thriftrw-go","homepage":"","size":573,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121"},"html":{"href":"https://github.com/thriftrw/thriftrw-go/pull/121"},"issue":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/121"},"comments":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/thriftrw/thriftrw-go/statuses/46ff17960aefdcc1d061fd3105c9a16390ddc6bd"}}}}