From a2876ea2923651f68434edcc0b4482b8973d8ef7 Mon Sep 17 00:00:00 2001 From: sfw Date: Sat, 18 Aug 2018 15:12:38 +0800 Subject: [PATCH 1/3] appendix a trap fix code --- appendix/appendix-a-trap.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appendix/appendix-a-trap.md b/appendix/appendix-a-trap.md index c3fe6c3..99fdeb2 100644 --- a/appendix/appendix-a-trap.md +++ b/appendix/appendix-a-trap.md @@ -192,7 +192,9 @@ func main() { } }() - select{} + select{ + default: + } } ``` From e3cf9d1e3ace8595ceb00e4d2c914c6e5c212bdd Mon Sep 17 00:00:00 2001 From: sfw Date: Sat, 18 Aug 2018 15:24:05 +0800 Subject: [PATCH 2/3] ch4-5-fix typos --- ch4-rpc/ch4-05-grpc-hack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch4-rpc/ch4-05-grpc-hack.md b/ch4-rpc/ch4-05-grpc-hack.md index 2bf8eff..0b6a73c 100644 --- a/ch4-rpc/ch4-05-grpc-hack.md +++ b/ch4-rpc/ch4-05-grpc-hack.md @@ -211,7 +211,7 @@ type Authentication struct { } func (a *Authentication) GetRequestMetadata(context.Context, ...string) (map[string]string, error) { - return map[string]string{"login": a.Login, "password": a.Password}, nil + return map[string]string{"user":a.User, "password": a.Password}, nil } func (a *Authentication) RequireTransportSecurity() bool { return false From 2632eddff995968744182af51caf3dd536457548 Mon Sep 17 00:00:00 2001 From: wahaha Date: Sat, 18 Aug 2018 17:03:58 +0800 Subject: [PATCH 3/3] Update appendix-a-trap.md --- appendix/appendix-a-trap.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/appendix/appendix-a-trap.md b/appendix/appendix-a-trap.md index 99fdeb2..c3fe6c3 100644 --- a/appendix/appendix-a-trap.md +++ b/appendix/appendix-a-trap.md @@ -192,9 +192,7 @@ func main() { } }() - select{ - default: - } + select{} } ```