Skip to content

Instantly share code, notes, and snippets.

@yangzh
yangzh / gist:57c08bc8bde18a32286024d112348bb0
Last active February 25, 2020 23:56
typical diff example
'$ diff a.proto b.proto -y
syntax = "proto3"; syntax = "proto3";
package some.package; package some.package;
option java_package = "some.package"; option java_package = "some.package";
option go_package = "some/package"; option go_package = "some/package";
message EchoRequest { message EchoRequest {
string user = 1; string user = 1;

Keybase proof

I hereby claim:

  • I am yangzh on github.
  • I am yangzh (https://keybase.io/yangzh) on keybase.
  • I have a public key whose fingerprint is 7FB9 AC0B C116 C3FC 15A9 CDCF 845B AE87 0F28 3C0B

To claim this, I am signing this object:

watchChan := make(chan *etcd.Response)
stopChan := make(chan bool)
go onConfigChange(watchChan, stopChan)
c.Watch("/test", 0, false, watchChan, stopChan)
func onConfigChange(watchChan chan *etcd.Response, stopChan chan bool) {
for {
select {
case response, ok := <-watchChan: