gitextract_23g4on1p/ ├── .editorconfig ├── .github/ │ ├── ISSUE_TEMPLATE.md │ └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .nojekyll ├── LICENSE ├── Makefile ├── README.md ├── SUMMARY.md ├── appendix/ │ ├── appendix-a-trap.md │ ├── appendix-b-gems.md │ ├── appendix-c-author.md │ └── readme.md ├── book.ini ├── ch1-basic/ │ ├── ch1-01-genesis.md │ ├── ch1-02-hello-revolution.md │ ├── ch1-03-array-string-and-slice.md │ ├── ch1-04-func-method-interface.md │ ├── ch1-05-mem.md │ ├── ch1-06-goroutine.md │ ├── ch1-07-error-and-panic.md │ ├── ch1-08-ext.md │ └── readme.md ├── ch2-cgo/ │ ├── ch2-01-hello-cgo.md │ ├── ch2-02-basic.md │ ├── ch2-03-cgo-types.md │ ├── ch2-04-func.md │ ├── ch2-05-internal.md │ ├── ch2-06-qsort.md │ ├── ch2-07-memory.md │ ├── ch2-08-class.md │ ├── ch2-09-static-shared-lib.md │ ├── ch2-10-link.md │ ├── ch2-11-ext.md │ └── readme.md ├── ch3-asm/ │ ├── ch3-01-basic.md │ ├── ch3-02-arch.md │ ├── ch3-03-const-and-var.md │ ├── ch3-04-func.md │ ├── ch3-05-control-flow.md │ ├── ch3-06-func-again.md │ ├── ch3-07-hack-asm.md │ ├── ch3-08-goroutine-id.md │ ├── ch3-09-debug.md │ ├── ch3-10-ext.md │ └── readme.md ├── ch4-rpc/ │ ├── ch4-01-rpc-intro.md │ ├── ch4-02-pb-intro.md │ ├── ch4-03-netrpc-hack.md │ ├── ch4-04-grpc.md │ ├── ch4-05-grpc-hack.md │ ├── ch4-06-grpc-ext.md │ ├── ch4-07-pbgo.md │ ├── ch4-08-grpcurl.md │ ├── ch4-09-ext.md │ └── readme.md ├── ch5-web/ │ ├── ch5-01-introduction.md │ ├── ch5-02-router.md │ ├── ch5-03-middleware.md │ ├── ch5-04-validator.md │ ├── ch5-05-database.md │ ├── ch5-06-ratelimit.md │ ├── ch5-07-layout-of-web-project.md │ ├── ch5-08-interface-and-web.md │ ├── ch5-09-gated-launch.md │ ├── ch5-10-ext.md │ └── readme.md ├── ch6-cloud/ │ ├── ch6-01-dist-id.md │ ├── ch6-02-lock.md │ ├── ch6-03-delay-job.md │ ├── ch6-04-search-engine.md │ ├── ch6-05-load-balance.md │ ├── ch6-06-config.md │ ├── ch6-07-crawler.md │ ├── ch6-08-ext.md │ └── readme.md ├── chaoxi/ │ ├── .gitignore │ └── .keep ├── contributors.json ├── doc.go ├── docs/ │ └── .gitignore ├── errata/ │ ├── README.md │ ├── a.go │ └── a_amd64.s ├── examples/ │ ├── README.md │ ├── ch1.1/ │ │ └── 1-hello/ │ │ └── main.go │ ├── ch1.2/ │ │ ├── 1-hello-b-1972/ │ │ │ └── main.b │ │ ├── 10-hello-go-200806/ │ │ │ └── hello.go.txt │ │ ├── 11-hello-go-20080627/ │ │ │ └── hello.go.txt │ │ ├── 12-hello-go-20080811/ │ │ │ └── hello.go.txt │ │ ├── 13-hello-go-20081024/ │ │ │ └── hello.go.txt │ │ ├── 14-hello-go-20090115/ │ │ │ └── hello.go.txt │ │ ├── 15-hello-go-20091211/ │ │ │ └── hello.go │ │ ├── 16-hello-go-v2/ │ │ │ └── hello.go │ │ ├── 2-hello-c-1974/ │ │ │ └── hello-c-01.c │ │ ├── 3-hello-c-1978/ │ │ │ └── hello-c-02.c │ │ ├── 4-hello-c-1988/ │ │ │ └── hello-c-03.c │ │ ├── 5-hello-c-1989/ │ │ │ └── hello-c-04.c │ │ ├── 6-hello-newsqueak-1989/ │ │ │ └── hello.newsqueak │ │ ├── 7-prime-newsqueak/ │ │ │ └── prime.newsqueak │ │ ├── 8-hello-alef-1993/ │ │ │ └── hello.alef │ │ ├── 9-hello-limbo-1995/ │ │ │ └── hello.limbo │ │ ├── xx-hello-go-asm/ │ │ │ ├── hello.go │ │ │ └── hello_amd64.s │ │ ├── xx-hello-go-cgo/ │ │ │ └── hello.go │ │ └── xx-hello-go-swig/ │ │ ├── hello.cc │ │ ├── hello.go │ │ └── hello.swigcxx │ ├── ch2.1/ │ │ ├── hello-01/ │ │ │ └── main.go │ │ ├── hello-02/ │ │ │ └── main.go │ │ ├── hello-03/ │ │ │ ├── hello.c │ │ │ └── main.go │ │ ├── hello-04/ │ │ │ └── main.go │ │ ├── hello-05/ │ │ │ └── main.go │ │ └── hello-06/ │ │ └── main.go │ ├── ch2.10/ │ │ ├── hello-py/ │ │ │ ├── Makefile │ │ │ ├── gopkg.h │ │ │ ├── main.go │ │ │ └── py3-config.go │ │ └── hello-so/ │ │ ├── Makefile │ │ ├── _test_so.c │ │ ├── hello.py │ │ ├── main.go │ │ └── say-hello.h │ ├── ch2.4/ │ │ └── return-go-ptr/ │ │ └── main.go │ ├── ch2.5/ │ │ ├── 01-cgo-gen-files/ │ │ │ ├── Makefile │ │ │ ├── _obj/ │ │ │ │ ├── _cgo_export.c │ │ │ │ ├── _cgo_export.h │ │ │ │ ├── _cgo_flags │ │ │ │ ├── _cgo_gotypes.go │ │ │ │ ├── _cgo_main.c │ │ │ │ ├── hello.cgo1.go │ │ │ │ ├── hello.cgo2.c │ │ │ │ ├── main.cgo1.go │ │ │ │ └── main.cgo2.c │ │ │ ├── hello.go │ │ │ ├── main.go │ │ │ ├── nocgo_1.go │ │ │ └── nocgo_x.go │ │ ├── 02-go-call-c-func/ │ │ │ ├── Makefile │ │ │ ├── _obj/ │ │ │ │ ├── _cgo_export.c │ │ │ │ ├── _cgo_export.h │ │ │ │ ├── _cgo_flags │ │ │ │ ├── _cgo_gotypes.go │ │ │ │ ├── _cgo_main.c │ │ │ │ ├── main.cgo1.go │ │ │ │ └── main.cgo2.c │ │ │ └── main.go │ │ └── 03-c-call-go-func/ │ │ ├── Makefile │ │ ├── _obj/ │ │ │ ├── _cgo_export.c │ │ │ ├── _cgo_export.h │ │ │ ├── _cgo_flags │ │ │ ├── _cgo_gotypes.go │ │ │ ├── _cgo_main.c │ │ │ ├── sum.cgo1.go │ │ │ └── sum.cgo2.c │ │ ├── main.c │ │ ├── sum.go │ │ └── sum.h │ ├── ch2.6/ │ │ ├── 01-qsort-v1/ │ │ │ ├── Makefile │ │ │ └── main.c │ │ ├── 02-qsort-v2/ │ │ │ ├── main.go │ │ │ ├── qsort.go │ │ │ ├── qsort_test.go │ │ │ └── test_helper.go │ │ ├── 03-qsort-v3/ │ │ │ ├── main.go │ │ │ ├── sort.go │ │ │ └── sort_test.go │ │ └── 04-qsort-v4/ │ │ ├── main.go │ │ ├── sort.go │ │ └── sort_test.go │ ├── ch2.8/ │ │ ├── class-cc2go/ │ │ │ ├── main.go │ │ │ ├── my_buffer.cc │ │ │ ├── my_buffer.go │ │ │ ├── my_buffer.h │ │ │ ├── my_buffer_capi.cc │ │ │ ├── my_buffer_capi.go │ │ │ └── my_buffer_capi.h │ │ └── class-go2cc/ │ │ ├── goobj.go │ │ ├── main.cc │ │ ├── main.go │ │ ├── persion.go │ │ ├── person.cc │ │ ├── person.h │ │ ├── person_capi.go │ │ └── person_capi.h │ ├── ch2.9/ │ │ ├── incorrect-dll-api/ │ │ │ ├── Makefile │ │ │ ├── main.go │ │ │ └── mystring/ │ │ │ ├── Makefile │ │ │ ├── mystring.c │ │ │ └── mystring.h │ │ ├── make-clib-dll/ │ │ │ ├── Makefile │ │ │ ├── _test_main.c │ │ │ ├── main.go │ │ │ ├── number-win64.def │ │ │ └── number.h │ │ ├── make-clib-from-multi-pkg/ │ │ │ ├── Makefile │ │ │ ├── _test_main.c │ │ │ ├── main.go │ │ │ ├── main.h │ │ │ └── number/ │ │ │ ├── number.go │ │ │ └── number.h │ │ ├── make-clib-shared/ │ │ │ ├── Makefile │ │ │ ├── _test_main.c │ │ │ ├── main.go │ │ │ └── number.h │ │ ├── make-clib-static/ │ │ │ ├── Makefile │ │ │ ├── _test_main.c │ │ │ ├── main.go │ │ │ └── number.h │ │ ├── plugin/ │ │ │ ├── Makefile │ │ │ ├── main.go │ │ │ └── plugin.go │ │ ├── use-clib-shared/ │ │ │ ├── Makefile │ │ │ ├── main.go │ │ │ └── number/ │ │ │ ├── Makefile │ │ │ ├── number.c │ │ │ └── number.h │ │ ├── use-clib-static-v1/ │ │ │ ├── Makefile │ │ │ ├── main.go │ │ │ └── number/ │ │ │ ├── Makefile │ │ │ ├── number.c │ │ │ └── number.h │ │ └── use-clib-static-v2/ │ │ ├── Makefile │ │ ├── main.go │ │ ├── number/ │ │ │ ├── Makefile │ │ │ ├── number.c │ │ │ └── number.h │ │ └── z_link_number_c.c │ ├── ch2.x/ │ │ ├── hello/ │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── _obj/ │ │ │ │ ├── _cgo_export.c │ │ │ │ ├── _cgo_export.h │ │ │ │ ├── _cgo_flags │ │ │ │ ├── _cgo_gotypes.go │ │ │ │ ├── _cgo_main.c │ │ │ │ ├── hello.cgo1.go │ │ │ │ └── hello.cgo2.c │ │ │ └── hello.go │ │ ├── hello-swig-v1/ │ │ │ ├── Makefile │ │ │ ├── hello.cc │ │ │ ├── hello.swigcxx │ │ │ ├── hello_test.go │ │ │ └── runme.go │ │ └── hello-swig-v2/ │ │ ├── Makefile │ │ ├── hello.cc │ │ ├── hello.go │ │ ├── hello.i │ │ ├── runme.go │ │ └── swig_wrap.cc │ ├── ch3.1/ │ │ ├── id-01/ │ │ │ ├── pkg.go │ │ │ └── runme.go │ │ ├── id-02/ │ │ │ ├── pkg.go │ │ │ ├── pkg_amd64.s │ │ │ └── runme.go │ │ ├── main-01/ │ │ │ ├── Makefile │ │ │ ├── main.go │ │ │ └── main_amd64.s │ │ ├── str-01/ │ │ │ └── pkg.go │ │ ├── str-02/ │ │ │ ├── pkg.go │ │ │ ├── pkg_amd64.s │ │ │ └── runme.go │ │ └── str-03/ │ │ ├── pkg.go │ │ ├── pkg_amd64.s │ │ └── runme.go │ ├── ch3.6/ │ │ ├── asm-split/ │ │ │ ├── main.go │ │ │ └── main_amd64.s │ │ ├── closure-01/ │ │ │ └── main.go │ │ └── closure-02/ │ │ ├── main.go │ │ └── main_amd64.s │ ├── ch3.8/ │ │ ├── ch3.8-1/ │ │ │ └── main.go │ │ ├── ch3.8-2/ │ │ │ └── main.go │ │ ├── ch3.8-3/ │ │ │ └── main.go │ │ ├── ch3.8-4/ │ │ │ ├── main.go │ │ │ └── main_amd64.s │ │ ├── ch3.8-5/ │ │ │ ├── main.go │ │ │ └── main_amd64.s │ │ ├── ch3.8-6/ │ │ │ ├── gls/ │ │ │ │ ├── gls.go │ │ │ │ ├── goid.go │ │ │ │ └── goid_amd64.s │ │ │ ├── go.mod │ │ │ └── main.go │ │ ├── hello/ │ │ │ └── main.go │ │ └── hello-asm/ │ │ ├── main.go │ │ └── main_amd64.s │ ├── ch3.x/ │ │ ├── add/ │ │ │ ├── add.go │ │ │ ├── add_asm.go │ │ │ ├── add_asm_amd64.s │ │ │ ├── add_asm_generic.go │ │ │ ├── add_test.go │ │ │ └── runme.go │ │ ├── binary_search/ │ │ │ ├── binary_search.go │ │ │ ├── binary_search_amd64.s │ │ │ └── binary_search_test.go │ │ ├── cfun/ │ │ │ ├── main.go │ │ │ └── vendor/ │ │ │ └── asmpkg/ │ │ │ ├── asmpkg.go │ │ │ └── asmpkg_amd64.s │ │ ├── globalvar/ │ │ │ ├── asm_amd64.s │ │ │ ├── globalvar.go │ │ │ └── runme.go │ │ ├── hello/ │ │ │ ├── hello.go │ │ │ ├── hello_amd64.s │ │ │ └── runme.go │ │ ├── ifelse/ │ │ │ ├── ifelse.go │ │ │ ├── ifelse_ams_amd64.s │ │ │ ├── ifelse_test.go │ │ │ └── runme.go │ │ ├── instr/ │ │ │ ├── bench_test.go │ │ │ ├── instr.go │ │ │ └── instr_amd64.s │ │ ├── loop/ │ │ │ ├── loop.go │ │ │ ├── loop_asm_amd64.s │ │ │ ├── loop_test.go │ │ │ └── runme.go │ │ ├── min/ │ │ │ ├── min.go │ │ │ ├── min_asm_amd64.s │ │ │ ├── min_test.go │ │ │ └── runme.go │ │ ├── slice/ │ │ │ ├── runme.go │ │ │ ├── slice.go │ │ │ ├── slice_asm_amd64.s │ │ │ └── slice_test.go │ │ ├── stackmap/ │ │ │ ├── stackmap.go │ │ │ ├── stackmap_amd64.s │ │ │ └── stackmap_test.go │ │ ├── sum/ │ │ │ ├── sum.go │ │ │ ├── sum_amd64.s │ │ │ └── sum_test.go │ │ └── vector/ │ │ ├── sum_amd64.s │ │ ├── vector.go │ │ ├── vector_amd64.s │ │ └── vector_test.go │ ├── ch4.1/ │ │ ├── hello-client-v1/ │ │ │ └── main.go │ │ ├── hello-server-v1/ │ │ │ └── main.go │ │ ├── hello-service-v2/ │ │ │ ├── api/ │ │ │ │ └── hello.go │ │ │ ├── client/ │ │ │ │ └── main.go │ │ │ └── server/ │ │ │ └── main.go │ │ └── hello-service-v3/ │ │ ├── client/ │ │ │ └── main.go │ │ ├── server/ │ │ │ └── main.go │ │ └── server-on-http/ │ │ └── main.go │ ├── ch4.2/ │ │ ├── hello-server/ │ │ │ └── main.go │ │ ├── hello.pb/ │ │ │ ├── Makefile │ │ │ ├── hello.pb.go │ │ │ └── hello.proto │ │ └── protoc-gen-go-netrpc/ │ │ ├── main.go │ │ └── netprpc.go │ ├── ch4.3/ │ │ ├── rpc-auth/ │ │ │ ├── client/ │ │ │ │ └── main.go │ │ │ ├── main.go │ │ │ └── server/ │ │ │ └── main.go │ │ ├── rpc-context/ │ │ │ ├── client/ │ │ │ │ └── main.go │ │ │ └── server/ │ │ │ └── main.go │ │ └── rpc-reverse/ │ │ ├── client/ │ │ │ └── main.go │ │ └── server/ │ │ └── main.go │ ├── ch4.4/ │ │ ├── 1/ │ │ │ ├── client/ │ │ │ │ └── main.go │ │ │ ├── helloservice/ │ │ │ │ ├── hello.pb.go │ │ │ │ └── hello.proto │ │ │ └── server/ │ │ │ └── main.go │ │ ├── 2/ │ │ │ ├── HelloService/ │ │ │ │ ├── hello.pb.go │ │ │ │ └── hello.proto │ │ │ ├── client/ │ │ │ │ └── main.go │ │ │ └── server/ │ │ │ └── main.go │ │ ├── 3/ │ │ │ ├── clientpub/ │ │ │ │ └── main.go │ │ │ ├── clientsub/ │ │ │ │ └── main.go │ │ │ ├── pubsubservice/ │ │ │ │ ├── pubsubservice.pb.go │ │ │ │ └── pubsubservice.proto │ │ │ └── server/ │ │ │ └── main.go │ │ ├── basic/ │ │ │ └── client/ │ │ │ ├── Makefile │ │ │ ├── hello.pb.go │ │ │ ├── hello.proto │ │ │ └── main.go │ │ └── grpc-pubsub/ │ │ ├── clientPub/ │ │ │ └── clientPub.go │ │ ├── clientSub/ │ │ │ └── clientSub.go │ │ ├── pubsubservice/ │ │ │ ├── pubsubservice.pb.go │ │ │ └── pubsubservice.proto │ │ └── server/ │ │ └── server.go │ ├── ch4.5/ │ │ ├── on-web/ │ │ │ ├── Makefile │ │ │ ├── helloworld.pb.go │ │ │ ├── helloworld.proto │ │ │ ├── main.go │ │ │ └── tls-config/ │ │ │ ├── Makefile │ │ │ ├── server.crt │ │ │ └── server.key │ │ ├── panic-and-log/ │ │ │ ├── Makefile │ │ │ ├── helloworld.pb.go │ │ │ ├── helloworld.proto │ │ │ └── main.go │ │ ├── rest-and-swagger/ │ │ │ └── dummy.txt │ │ ├── tls/ │ │ │ ├── Makefile │ │ │ ├── helloworld.pb.go │ │ │ ├── helloworld.proto │ │ │ ├── main.go │ │ │ └── tls-config/ │ │ │ ├── Makefile │ │ │ ├── ca.crt │ │ │ ├── ca.key │ │ │ ├── ca.srl │ │ │ ├── client.crt │ │ │ ├── client.csr │ │ │ ├── client.key │ │ │ ├── server.crt │ │ │ ├── server.csr │ │ │ └── server.key │ │ └── tok/ │ │ ├── Makefile │ │ ├── helloworld.pb.go │ │ ├── helloworld.proto │ │ └── main.go │ ├── ch4.6/ │ │ ├── pb2-default-value/ │ │ │ ├── Makefile │ │ │ ├── helloworld.pb.go │ │ │ └── helloworld.proto │ │ ├── rest/ │ │ │ ├── Makefile │ │ │ ├── helloworld.pb.go │ │ │ ├── helloworld.pb.gw.go │ │ │ ├── helloworld.proto │ │ │ ├── helloworld.swagger.json │ │ │ └── main.go │ │ └── validators/ │ │ ├── Makefile │ │ ├── helloworld.pb.go │ │ ├── helloworld.proto │ │ └── helloworld.validator.pb.go │ └── ch4.7/ │ ├── http-router/ │ │ └── dummy.txt │ ├── pb-option/ │ │ ├── Makefile │ │ ├── dummy.txt │ │ ├── helloworld.pb.go │ │ ├── helloworld.proto │ │ └── main/ │ │ └── helloworld.pb.go │ ├── pb-web-frameswork/ │ │ └── dummy.txt │ └── plugin-framework/ │ └── dummy.txt ├── gen_contributors.go ├── go.mod ├── go.sum ├── images/ │ ├── Makefile │ ├── ch1-10-slice-1.ditaa.txt │ ├── ch1-11-init.ditaa.txt │ ├── ch1-12-init.ditaa.txt │ ├── ch1-7-array-4int.ditaa.txt │ ├── ch1-8-string-1.ditaa.txt │ ├── ch1-9-string-2.ditaa.txt │ ├── ch2-1-x-ptr-to-y-ptr.plantuml │ ├── ch2-2-int32-to-char-ptr.plantuml │ ├── ch2-3-x-slice-to-y-slice.plantuml │ ├── ch2-4-cgo-generated-files.dot │ ├── ch2-5-call-c-sum-v1.plantuml │ ├── ch2-6-call-c-sum-v2.plantuml │ ├── ch3-10-func-arg-01.ditaa.txt │ ├── ch3-11-func-local-var-01.ditaa.txt │ ├── ch3-12-func-call-frame-01.ditaa.txt │ ├── ch3-13-func-stack-frame-layout-01.ditaa.txt │ ├── ch3-2-arch-amd64-01.ditaa.txt │ ├── ch3-3-arch-amd64-02.ditaa.txt │ ├── ch3-4-pkg-var-decl-01.ditaa.txt │ ├── ch3-6-pkg-var-decl-02.ditaa.txt │ ├── ch3-7-pkg-var-decl-03.ditaa.txt │ ├── ch3-8-func-decl-01.ditaa.txt │ ├── ch3-9-func-decl-02.ditaa.txt │ ├── ch6-controller-logic-dao-storage.plantuml │ ├── ch6-interface-impl.plantuml │ └── github-social.drawio ├── index.md ├── preface-pdf.md └── preface.md