{"action":"created","comment":{"url":"https://api.github.com/repos/google/go-cloud/pulls/comments/260079625","pull_request_review_id":207703339,"id":260079625,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MDA3OTYyNQ==","diff_hunk":"@@ -0,0 +1,701 @@\n+// Copyright 2019 The Go Cloud Development Kit Authors\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     https://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+// TODO(jba): support struct tags.\n+// TODO(jba): for efficiency, enable encoding of only a subset of field paths.\n+\n+package driver\n+\n+import (\n+\t\"encoding\"\n+\t\"fmt\"\n+\t\"reflect\"\n+\t\"strconv\"\n+\n+\t\"github.com/golang/protobuf/proto\"\n+\t\"gocloud.dev/internal/docstore/internal/fields\"\n+\t\"gocloud.dev/internal/gcerr\"\n+)\n+\n+var (\n+\tbinaryMarshalerType   = reflect.TypeOf((*encoding.BinaryMarshaler)(nil)).Elem()\n+\tbinaryUnmarshalerType = reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem()\n+\ttextMarshalerType     = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()\n+\ttextUnmarshalerType   = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()\n+\tprotoMessageType      = reflect.TypeOf((*proto.Message)(nil)).Elem()\n+)\n+\n+// An Encoder encodes Go values in some other form (e.g. JSON, protocol buffers).\n+// The encoding protocol is designed to avoid losing type information by passing\n+// values using interface{}. An Encoder is responsible for storing the value\n+// it is encoding.\n+//\n+// Because all providers must support the same set of values, the encoding methods\n+// (with the exception of EncodeStruct) do not return errors. EncodeStruct is special\n+// because it is an escape hatch for arbitrary structs, not all of which may be\n+// encodable.\n+type Encoder interface {\n+\t// These methods all encode and store a single Go value.\n+\tEncodeNull()\n+\tEncodeBool(bool)\n+\tEncodeString(string)\n+\tEncodeInt(int64)\n+\tEncodeUint(uint64)\n+\tEncodeFloat(float64)\n+\tEncodeComplex(complex128)\n+\tEncodeBytes([]byte)\n+\n+\t// EncodeList is called when a slice or array is encountered (except for a\n+\t// []byte, which is handled by EncodeBytes). Its argument is the length of the\n+\t// slice or array. The encoding algorithm will call the returned Encoder that\n+\t// many times to encode the successive values of the list. After each such call,\n+\t// ListIndex will be called with the index of the element just encoded.\n+\t//\n+\t// For example, []string{\"a\", \"b\"} will result in these calls:\n+\t//     enc2 := enc.EncodeList(2)\n+\t//     enc2.EncodeString(\"a\")\n+\t//     enc2.ListIndex(0)\n+\t//     enc2.EncodeString(\"b\")\n+\t//     enc2.ListIndex(1)\n+\tEncodeList(n int) Encoder\n+\tListIndex(i int)\n+\n+\t// EncodeMap is called when a map or struct is encountered. Its argument is the\n+\t// number of fields in the map or struct. The encoding algorithm will call the\n+\t// returned Encoder that many times to encode the successive values of the map or\n+\t// struct. After each such call, MapKey will be called with the key of the\n+\t// element just encoded.\n+\t//\n+\t// For example, map[string}int{\"A\": 1, \"B\": 2} will result in these calls:\n+\t//     enc2 := enc.EncodeMap(2)\n+\t//     enc2.EncodeInt(1)\n+\t//     enc2.MapKey(\"A\")\n+\t//     enc2.EncodeInt(2)\n+\t//     enc2.MapKey(\"B\")\n+\t// For struct{A, B int}{1, 2}, if EncodeStruct (see below) returns false, the same\n+\t// sequence of calls will occur.\n+\tEncodeMap(n int) Encoder\n+\tMapKey(string)\n+\n+\t// If the encoder wants to encode a struct in a special way (other than as a map\n+\t// from its exported fields to values), it should do so here and return true along\n+\t// with any error from the encoding.\n+\t// Otherwise, it should return false.\n+\t// s is the reflection of a struct.\n+\tEncodeStruct(s reflect.Value) (bool, error)\n+}\n+\n+// Encode encodes the value using the given Encoder. It traverses the value,\n+// iterating over arrays, slices, maps and the exported fields of structs. If it\n+// encounters a non-nil pointer, it encodes the value that it points to.\n+// Encode treats a few interfaces specially:\n+//\n+// If the value implements encoding.BinaryMarshaler, Encode invokes MarshalBinary\n+// on it and encodes the resulting byte slice.\n+//\n+// If the value implements encoding.TextMarshaler, Encode invokes MarshalText on it\n+// and encodes the resulting string.\n+//\n+// If the value implements proto.Message, Encode invokes proto.Marshal on it and encodes\n+// the resulting byte slice. Here proto is the package \"github.com/golang/protobuf/proto\".\n+//\n+// Not every map key type can be encoded. Only strings, integers (signed or\n+// unsigned), and types that implement encoding.TextMarshaler are permitted as map\n+// keys. These restrictions match exactly those of the encoding/json package.\n+func Encode(v reflect.Value, e Encoder) error {\n+\treturn wrap(encode(v, e), gcerr.InvalidArgument)\n+}\n+\n+func encode(v reflect.Value, enc Encoder) error {\n+\tif !v.IsValid() {\n+\t\tenc.EncodeNull()\n+\t\treturn nil\n+\t}\n+\tif v.Type().Implements(binaryMarshalerType) {\n+\t\tbytes, err := v.Interface().(encoding.BinaryMarshaler).MarshalBinary()\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tenc.EncodeBytes(bytes)\n+\t\treturn nil\n+\t}\n+\tif v.Type().Implements(protoMessageType) {\n+\t\tif v.IsNil() {\n+\t\t\tenc.EncodeNull()\n+\t\t} else {\n+\t\t\tbytes, err := proto.Marshal(v.Interface().(proto.Message))\n+\t\t\tif err != nil {\n+\t\t\t\treturn err\n+\t\t\t}\n+\t\t\tenc.EncodeBytes(bytes)\n+\t\t}\n+\t\treturn nil\n+\t}\n+\tif v.Type().Implements(textMarshalerType) {\n+\t\tbytes, err := v.Interface().(encoding.TextMarshaler).MarshalText()\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tenc.EncodeString(string(bytes))\n+\t\treturn nil\n+\t}\n+\tswitch v.Kind() {\n+\tcase reflect.Bool:\n+\t\tenc.EncodeBool(v.Bool())\n+\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n+\t\tenc.EncodeInt(v.Int())\n+\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n+\t\tenc.EncodeUint(v.Uint())\n+\tcase reflect.Float32, reflect.Float64:\n+\t\tenc.EncodeFloat(v.Float())\n+\tcase reflect.Complex64, reflect.Complex128:\n+\t\tenc.EncodeComplex(v.Complex())\n+\tcase reflect.String:\n+\t\tenc.EncodeString(v.String())\n+\tcase reflect.Slice:\n+\t\tif v.IsNil() {\n+\t\t\tenc.EncodeNull()\n+\t\t\treturn nil\n+\t\t}\n+\t\tfallthrough\n+\tcase reflect.Array:\n+\t\treturn encodeList(v, enc)\n+\tcase reflect.Map:\n+\t\treturn encodeMap(v, enc)\n+\tcase reflect.Ptr:\n+\t\tif v.IsNil() {\n+\t\t\tenc.EncodeNull()\n+\t\t\treturn nil\n+\t\t}\n+\t\treturn encode(v.Elem(), enc)\n+\tcase reflect.Interface:\n+\t\tif v.IsNil() {\n+\t\t\tenc.EncodeNull()\n+\t\t\treturn nil\n+\t\t}\n+\t\treturn encode(v.Elem(), enc)\n+\n+\tcase reflect.Struct:\n+\t\treturn encodeStruct(v, enc)\n+\n+\tdefault:\n+\t\treturn gcerr.Newf(gcerr.InvalidArgument, nil, \"cannot encode type %s\", v.Type())\n+\t}\n+\treturn nil\n+}\n+\n+// Encode an array or non-nil slice.\n+func encodeList(v reflect.Value, enc Encoder) error {\n+\t// Byte slices or byte arrays encode specially.\n+\tif v.Type().Elem().Kind() == reflect.Uint8 {\n+\t\tenc.EncodeBytes(v.Bytes())\n+\t\treturn nil\n+\t}\n+\tn := v.Len()\n+\tenc2 := enc.EncodeList(n)\n+\tfor i := 0; i < n; i++ {\n+\t\tif err := encode(v.Index(i), enc2); err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tenc2.ListIndex(i)\n+\t}\n+\treturn nil\n+}\n+\n+// Encode a map.\n+func encodeMap(v reflect.Value, enc Encoder) error {\n+\tif v.IsNil() {\n+\t\tenc.EncodeNull()\n+\t\treturn nil\n+\t}\n+\tkeys := v.MapKeys()\n+\tenc2 := enc.EncodeMap(len(keys))\n+\tfor _, k := range keys {\n+\t\tsk, err := stringifyMapKey(k)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tif err := encode(v.MapIndex(k), enc2); err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tenc2.MapKey(sk)\n+\t}\n+\treturn nil\n+}\n+\n+// k is the key of a map. Encode it as a string.\n+// Only strings, integers (signed or unsigned), and types that implement\n+// encoding.TextMarshaler are supported.\n+func stringifyMapKey(k reflect.Value) (string, error) {\n+\t// This is basically reflectWithString.resolve, from encoding/json/encode.go.\n+\tif k.Kind() == reflect.String {\n+\t\treturn k.String(), nil\n+\t}\n+\tif tm, ok := k.Interface().(encoding.TextMarshaler); ok {\n+\t\tb, err := tm.MarshalText()\n+\t\tif err != nil {\n+\t\t\treturn \"\", err\n+\t\t}\n+\t\treturn string(b), nil\n+\t}\n+\tswitch k.Kind() {\n+\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n+\t\treturn strconv.FormatInt(k.Int(), 10), nil\n+\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n+\t\treturn strconv.FormatUint(k.Uint(), 10), nil\n+\tdefault:\n+\t\treturn \"\", gcerr.Newf(gcerr.InvalidArgument, nil, \"cannot encode key %s of type %s\", k, k.Type())\n+\t}\n+}\n+\n+func encodeStruct(v reflect.Value, e Encoder) error {\n+\tdidIt, err := e.EncodeStruct(v)\n+\tif didIt {\n+\t\treturn err\n+\t}\n+\tfields, err := fieldCache.Fields(v.Type())\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\treturn encodeStructWithFields(v, fields, e)\n+}\n+\n+func encodeStructWithFields(v reflect.Value, fields fields.List, e Encoder) error {\n+\te2 := e.EncodeMap(len(fields))\n+\tfor _, f := range fields {\n+\t\tfv, ok := fieldByIndex(v, f.Index)\n+\t\tif ok {\n+\t\t\tif err := encode(fv, e2); err != nil {\n+\t\t\t\treturn err\n+\t\t\t}\n+\t\t\te2.MapKey(f.Name)\n+\t\t}","path":"internal/docstore/driver/codec.go","position":283,"original_position":283,"commit_id":"157e45d1dbba99cebaca7b94d364aa1a242e38fa","original_commit_id":"157e45d1dbba99cebaca7b94d364aa1a242e38fa","user":{"login":"vangent","id":22553934,"node_id":"MDQ6VXNlcjIyNTUzOTM0","avatar_url":"https://avatars3.githubusercontent.com/u/22553934?v=4","gravatar_id":"","url":"https://api.github.com/users/vangent","html_url":"https://github.com/vangent","followers_url":"https://api.github.com/users/vangent/followers","following_url":"https://api.github.com/users/vangent/following{/other_user}","gists_url":"https://api.github.com/users/vangent/gists{/gist_id}","starred_url":"https://api.github.com/users/vangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vangent/subscriptions","organizations_url":"https://api.github.com/users/vangent/orgs","repos_url":"https://api.github.com/users/vangent/repos","events_url":"https://api.github.com/users/vangent/events{/privacy}","received_events_url":"https://api.github.com/users/vangent/received_events","type":"User","site_admin":false},"body":"What if `!ok`?","created_at":"2019-02-26T00:30:32Z","updated_at":"2019-02-26T00:45:09Z","html_url":"https://github.com/google/go-cloud/pull/1354#discussion_r260079625","pull_request_url":"https://api.github.com/repos/google/go-cloud/pulls/1354","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/google/go-cloud/pulls/comments/260079625"},"html":{"href":"https://github.com/google/go-cloud/pull/1354#discussion_r260079625"},"pull_request":{"href":"https://api.github.com/repos/google/go-cloud/pulls/1354"}}},"pull_request":{"url":"https://api.github.com/repos/google/go-cloud/pulls/1354","id":253527735,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUzNTI3NzM1","html_url":"https://github.com/google/go-cloud/pull/1354","diff_url":"https://github.com/google/go-cloud/pull/1354.diff","patch_url":"https://github.com/google/go-cloud/pull/1354.patch","issue_url":"https://api.github.com/repos/google/go-cloud/issues/1354","number":1354,"state":"open","locked":false,"title":"internal/docstore: structs","user":{"login":"jba","id":18483045,"node_id":"MDQ6VXNlcjE4NDgzMDQ1","avatar_url":"https://avatars1.githubusercontent.com/u/18483045?v=4","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"body":"Support for structs:\n- Getting and setting struct fields (in driver/document.go)\n- Encoding an decoding values (including structs) into native representations.\n\nAdd struct support to memdocstore.","created_at":"2019-02-15T18:51:20Z","updated_at":"2019-02-26T00:45:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2310a429ea860b0d0eb1dec496db6cdce7ac5e8","assignee":{"login":"ijt","id":15530,"node_id":"MDQ6VXNlcjE1NTMw","avatar_url":"https://avatars0.githubusercontent.com/u/15530?v=4","gravatar_id":"","url":"https://api.github.com/users/ijt","html_url":"https://github.com/ijt","followers_url":"https://api.github.com/users/ijt/followers","following_url":"https://api.github.com/users/ijt/following{/other_user}","gists_url":"https://api.github.com/users/ijt/gists{/gist_id}","starred_url":"https://api.github.com/users/ijt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijt/subscriptions","organizations_url":"https://api.github.com/users/ijt/orgs","repos_url":"https://api.github.com/users/ijt/repos","events_url":"https://api.github.com/users/ijt/events{/privacy}","received_events_url":"https://api.github.com/users/ijt/received_events","type":"User","site_admin":false},"assignees":[{"login":"ijt","id":15530,"node_id":"MDQ6VXNlcjE1NTMw","avatar_url":"https://avatars0.githubusercontent.com/u/15530?v=4","gravatar_id":"","url":"https://api.github.com/users/ijt","html_url":"https://github.com/ijt","followers_url":"https://api.github.com/users/ijt/followers","following_url":"https://api.github.com/users/ijt/following{/other_user}","gists_url":"https://api.github.com/users/ijt/gists{/gist_id}","starred_url":"https://api.github.com/users/ijt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijt/subscriptions","organizations_url":"https://api.github.com/users/ijt/orgs","repos_url":"https://api.github.com/users/ijt/repos","events_url":"https://api.github.com/users/ijt/events{/privacy}","received_events_url":"https://api.github.com/users/ijt/received_events","type":"User","site_admin":false},{"login":"vangent","id":22553934,"node_id":"MDQ6VXNlcjIyNTUzOTM0","avatar_url":"https://avatars3.githubusercontent.com/u/22553934?v=4","gravatar_id":"","url":"https://api.github.com/users/vangent","html_url":"https://github.com/vangent","followers_url":"https://api.github.com/users/vangent/followers","following_url":"https://api.github.com/users/vangent/following{/other_user}","gists_url":"https://api.github.com/users/vangent/gists{/gist_id}","starred_url":"https://api.github.com/users/vangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vangent/subscriptions","organizations_url":"https://api.github.com/users/vangent/orgs","repos_url":"https://api.github.com/users/vangent/repos","events_url":"https://api.github.com/users/vangent/events{/privacy}","received_events_url":"https://api.github.com/users/vangent/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1016532751,"node_id":"MDU6TGFiZWwxMDE2NTMyNzUx","url":"https://api.github.com/repos/google/go-cloud/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/google/go-cloud/pulls/1354/commits","review_comments_url":"https://api.github.com/repos/google/go-cloud/pulls/1354/comments","review_comment_url":"https://api.github.com/repos/google/go-cloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/go-cloud/issues/1354/comments","statuses_url":"https://api.github.com/repos/google/go-cloud/statuses/157e45d1dbba99cebaca7b94d364aa1a242e38fa","head":{"label":"jba:docstore-2","ref":"docstore-2","sha":"157e45d1dbba99cebaca7b94d364aa1a242e38fa","user":{"login":"jba","id":18483045,"node_id":"MDQ6VXNlcjE4NDgzMDQ1","avatar_url":"https://avatars1.githubusercontent.com/u/18483045?v=4","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"repo":{"id":154330358,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQzMzAzNTg=","name":"go-cloud","full_name":"jba/go-cloud","private":false,"owner":{"login":"jba","id":18483045,"node_id":"MDQ6VXNlcjE4NDgzMDQ1","avatar_url":"https://avatars1.githubusercontent.com/u/18483045?v=4","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jba/go-cloud","description":"A library and tools for open cloud development in Go.","fork":true,"url":"https://api.github.com/repos/jba/go-cloud","forks_url":"https://api.github.com/repos/jba/go-cloud/forks","keys_url":"https://api.github.com/repos/jba/go-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jba/go-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jba/go-cloud/teams","hooks_url":"https://api.github.com/repos/jba/go-cloud/hooks","issue_events_url":"https://api.github.com/repos/jba/go-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/jba/go-cloud/events","assignees_url":"https://api.github.com/repos/jba/go-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/jba/go-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/jba/go-cloud/tags","blobs_url":"https://api.github.com/repos/jba/go-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jba/go-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jba/go-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/jba/go-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jba/go-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/jba/go-cloud/languages","stargazers_url":"https://api.github.com/repos/jba/go-cloud/stargazers","contributors_url":"https://api.github.com/repos/jba/go-cloud/contributors","subscribers_url":"https://api.github.com/repos/jba/go-cloud/subscribers","subscription_url":"https://api.github.com/repos/jba/go-cloud/subscription","commits_url":"https://api.github.com/repos/jba/go-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/jba/go-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/jba/go-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/jba/go-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/jba/go-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/jba/go-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jba/go-cloud/merges","archive_url":"https://api.github.com/repos/jba/go-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jba/go-cloud/downloads","issues_url":"https://api.github.com/repos/jba/go-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/jba/go-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/jba/go-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/jba/go-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jba/go-cloud/labels{/name}","releases_url":"https://api.github.com/repos/jba/go-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/jba/go-cloud/deployments","created_at":"2018-10-23T13:12:21Z","updated_at":"2018-10-23T13:12:24Z","pushed_at":"2019-02-19T15:32:34Z","git_url":"git://github.com/jba/go-cloud.git","ssh_url":"git@github.com:jba/go-cloud.git","clone_url":"https://github.com/jba/go-cloud.git","svn_url":"https://github.com/jba/go-cloud","homepage":"https://godoc.org/github.com/google/go-cloud","size":21025,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"9d89b5c1cb06c0061269eb0ddfbc35f45f6f810f","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":126250425,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYyNTA0MjU=","name":"go-cloud","full_name":"google/go-cloud","private":false,"owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/google/go-cloud","description":"The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.","fork":false,"url":"https://api.github.com/repos/google/go-cloud","forks_url":"https://api.github.com/repos/google/go-cloud/forks","keys_url":"https://api.github.com/repos/google/go-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/go-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/go-cloud/teams","hooks_url":"https://api.github.com/repos/google/go-cloud/hooks","issue_events_url":"https://api.github.com/repos/google/go-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/google/go-cloud/events","assignees_url":"https://api.github.com/repos/google/go-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/google/go-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/google/go-cloud/tags","blobs_url":"https://api.github.com/repos/google/go-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/go-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/go-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/go-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/go-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/google/go-cloud/languages","stargazers_url":"https://api.github.com/repos/google/go-cloud/stargazers","contributors_url":"https://api.github.com/repos/google/go-cloud/contributors","subscribers_url":"https://api.github.com/repos/google/go-cloud/subscribers","subscription_url":"https://api.github.com/repos/google/go-cloud/subscription","commits_url":"https://api.github.com/repos/google/go-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/go-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/go-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/go-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/go-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/google/go-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/go-cloud/merges","archive_url":"https://api.github.com/repos/google/go-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/go-cloud/downloads","issues_url":"https://api.github.com/repos/google/go-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/google/go-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/google/go-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/google/go-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/go-cloud/labels{/name}","releases_url":"https://api.github.com/repos/google/go-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/google/go-cloud/deployments","created_at":"2018-03-21T22:57:26Z","updated_at":"2019-02-26T00:12:49Z","pushed_at":"2019-02-26T00:12:46Z","git_url":"git://github.com/google/go-cloud.git","ssh_url":"git@github.com:google/go-cloud.git","clone_url":"https://github.com/google/go-cloud.git","svn_url":"https://github.com/google/go-cloud","homepage":"https://godoc.org/gocloud.dev","size":21457,"stargazers_count":5422,"watchers_count":5422,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":326,"mirror_url":null,"archived":false,"open_issues_count":105,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":326,"open_issues":105,"watchers":5422,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/go-cloud/pulls/1354"},"html":{"href":"https://github.com/google/go-cloud/pull/1354"},"issue":{"href":"https://api.github.com/repos/google/go-cloud/issues/1354"},"comments":{"href":"https://api.github.com/repos/google/go-cloud/issues/1354/comments"},"review_comments":{"href":"https://api.github.com/repos/google/go-cloud/pulls/1354/comments"},"review_comment":{"href":"https://api.github.com/repos/google/go-cloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/go-cloud/pulls/1354/commits"},"statuses":{"href":"https://api.github.com/repos/google/go-cloud/statuses/157e45d1dbba99cebaca7b94d364aa1a242e38fa"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vangent"}}