├── .gitattributes
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── blog
└── zh_CN
│ ├── .gitattributes
│ ├── .gitignore
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── app.yaml
│ ├── blog
│ ├── appengine.go
│ ├── blog.go
│ ├── local.go
│ └── rewrite.go
│ ├── content
│ ├── 4years-gopher.png
│ ├── 4years-graph.png
│ ├── 4years.article
│ ├── 5years.article
│ ├── 5years
│ │ ├── conferences.jpg
│ │ └── gophers5th.jpg
│ ├── _tr
│ │ ├── div_begin_en.html
│ │ ├── div_begin_zh_CN.html
│ │ └── div_end.html
│ ├── a-conversation-with-the-go-team.article
│ ├── advanced-go-concurrency-patterns.article
│ ├── appengine-dec2013.article
│ ├── building-stathat-with-go.article
│ ├── building-stathat-with-go_stathat_architecture.png
│ ├── building-stathat-with-go_weather.png
│ ├── c-go-cgo.article
│ ├── concurrency-is-not-parallelism.article
│ ├── constants.article
│ ├── constants
│ │ ├── bool.go
│ │ ├── complex1.go
│ │ ├── complex2.go
│ │ ├── complex3.go
│ │ ├── default1.go
│ │ ├── default2.go
│ │ ├── default3.go
│ │ ├── exercise1.go
│ │ ├── exercise2.go
│ │ ├── exercise3.go
│ │ ├── exercise4.go
│ │ ├── exercise5.go
│ │ ├── exercise6.go
│ │ ├── float1.go
│ │ ├── float2.go
│ │ ├── float3.go
│ │ ├── float4.go
│ │ ├── float5.go
│ │ ├── int1.go
│ │ ├── int2.go
│ │ ├── int3.go
│ │ ├── int4.go
│ │ ├── numbers1.go
│ │ ├── numbers2.go
│ │ ├── string1.go
│ │ ├── string2.go
│ │ ├── string3.go
│ │ ├── string4.go
│ │ └── syntax.go
│ ├── context.article
│ ├── context
│ │ ├── google
│ │ │ └── google.go
│ │ ├── gorilla
│ │ │ └── gorilla.go
│ │ ├── interface.go
│ │ ├── server
│ │ │ └── server.go
│ │ ├── tomb
│ │ │ └── tomb.go
│ │ └── userip
│ │ │ └── userip.go
│ ├── cover.article
│ ├── cover
│ │ ├── count.png
│ │ ├── pkg.cover
│ │ ├── pkg.go
│ │ ├── pkg_test.go
│ │ └── set.png
│ ├── debugging-go-code-status-report.article
│ ├── debugging-go-programs-with-gnu-debugger.article
│ ├── defer-panic-and-recover.article
│ ├── docker-outyet.png
│ ├── docker.article
│ ├── error-handling-and-go.article
│ ├── errors-are-values.article
│ ├── examples.article
│ ├── examples
│ │ └── reverse.png
│ ├── first-class-functions-in-go-and-new-go.article
│ ├── first-go-program.article
│ ├── first-go-program
│ │ └── slist.go
│ ├── fosdem14.article
│ ├── from-zero-to-go-launching-on-google.article
│ ├── from-zero-to-go-launching-on-google_image00.png
│ ├── from-zero-to-go-launching-on-google_image01.jpg
│ ├── from-zero-to-go-launching-on-google_image02.png
│ ├── from-zero-to-go-launching-on-google_image03.png
│ ├── gccgo-in-gcc-471.article
│ ├── generate.article
│ ├── getthee-to-go-meetup.article
│ ├── getting-to-know-go-community.article
│ ├── gif-decoder-exercise-in-go-interfaces.article
│ ├── gif-decoder-exercise-in-go-interfaces_image00.jpg
│ ├── gif-decoder-exercise-in-go-interfaces_image01.gif
│ ├── gif-decoder-exercise-in-go-interfaces_image02.jpg
│ ├── gif-decoder-exercise-in-go-interfaces_image03.gif
│ ├── go-11-is-released.article
│ ├── go-11-is-released_gopherbiplane5.jpg
│ ├── go-and-google-app-engine.article
│ ├── go-and-google-cloud-platform.article
│ ├── go-app-engine-sdk-155-released.article
│ ├── go-at-google-io-2011-videos.article
│ ├── go-at-google-io-2011-videos_gopher.jpg
│ ├── go-at-heroku.article
│ ├── go-at-io-frequently-asked-questions.article
│ ├── go-becomes-more-stable.article
│ ├── go-concurrency-patterns-timing-out-and.article
│ ├── go-fmt-your-code.article
│ ├── go-for-app-engine-is-now-generally.article
│ ├── go-image-package.article
│ ├── go-image-package_image-package-01.png
│ ├── go-image-package_image-package-02.png
│ ├── go-image-package_image-package-03.png
│ ├── go-image-package_image-package-04.png
│ ├── go-image-package_image-package-05.png
│ ├── go-imagedraw-package.article
│ ├── go-imagedraw-package_20.png
│ ├── go-imagedraw-package_2a.png
│ ├── go-imagedraw-package_2b.png
│ ├── go-imagedraw-package_2c.png
│ ├── go-imagedraw-package_2d.png
│ ├── go-imagedraw-package_2e.png
│ ├── go-imagedraw-package_2f.png
│ ├── go-maps-in-action.article
│ ├── go-maps-in-action
│ │ ├── list.go
│ │ └── people.go
│ ├── go-one-year-ago-today.article
│ ├── go-programming-language-turns-two.article
│ ├── go-programming-language-turns-two_costume.jpg
│ ├── go-programming-language-turns-two_gophers.jpg
│ ├── go-programming-session-video-from.article
│ ├── go-slices-usage-and-internals.article
│ ├── go-slices-usage-and-internals_slice-1.png
│ ├── go-slices-usage-and-internals_slice-2.png
│ ├── go-slices-usage-and-internals_slice-3.png
│ ├── go-slices-usage-and-internals_slice-array.png
│ ├── go-slices-usage-and-internals_slice-struct.png
│ ├── go-turns-three.article
│ ├── go-updates-in-app-engine-171.article
│ ├── go-version-1-is-released.article
│ ├── go-version-1-is-released_gophermega.jpg
│ ├── go-videos-from-google-io-2012.article
│ ├── go-whats-new-in-march-2010.article
│ ├── go-wins-2010-bossie-award.article
│ ├── go1.3.article
│ ├── go1.4.article
│ ├── go12.article
│ ├── gobs-of-data.article
│ ├── godoc-documenting-go-code.article
│ ├── gopher.article
│ ├── gopher
│ │ ├── avatars.png
│ │ ├── glenda.png
│ │ ├── gopher.png
│ │ ├── header.jpg
│ │ ├── logo.png
│ │ ├── plush.jpg
│ │ ├── portrait.jpg
│ │ ├── prototype.jpg
│ │ ├── usergroups.png
│ │ ├── vinyl.jpg
│ │ └── wfmu.jpg
│ ├── gophercon.article
│ ├── gophercon
│ │ ├── image00.jpg
│ │ ├── image01.jpg
│ │ └── image02.jpg
│ ├── gophergala.article
│ ├── gophergala
│ │ └── fancygopher.jpg
│ ├── gos-declaration-syntax.article
│ ├── gothamgo.article
│ ├── gothamgo
│ │ └── gothamgo.jpg
│ ├── introducing-go-playground.article
│ ├── introducing-go-playground_Untitled.png
│ ├── introducing-gofix.article
│ ├── io2014.article
│ ├── io2014
│ │ ├── booth.jpg
│ │ ├── collage.jpg
│ │ ├── crowd.jpg
│ │ └── summerfest.jpg
│ ├── json-and-go.article
│ ├── json-rpc-tale-of-interfaces.article
│ ├── laws-of-reflection.article
│ ├── learn-go-from-your-browser.article
│ ├── new-talk-and-tutorials.article
│ ├── normalization.article
│ ├── normalization
│ │ ├── table1.html
│ │ └── table2.html
│ ├── organizing-go-code.article
│ ├── oscon.article
│ ├── osconreport.article
│ ├── osconreport
│ │ ├── meetup.png
│ │ ├── random.png
│ │ ├── talks.png
│ │ └── workshops.png
│ ├── package-names.article
│ ├── pipelines.article
│ ├── pipelines
│ │ ├── bounded.go
│ │ ├── parallel.go
│ │ ├── serial.go
│ │ ├── sqbuffer.go
│ │ ├── sqdone1.go
│ │ ├── sqdone2.go
│ │ ├── sqdone3.go
│ │ ├── sqfan.go
│ │ ├── sqleak.go
│ │ ├── square.go
│ │ └── square2.go
│ ├── playground.article
│ ├── playground
│ │ ├── net.go
│ │ ├── os.go
│ │ ├── overview.png
│ │ └── time.go
│ ├── preview-of-go-version-1.article
│ ├── profiling-go-programs.article
│ ├── profiling-go-programs_havlak1-hash_lookup-75.png
│ ├── profiling-go-programs_havlak1a-75.png
│ ├── profiling-go-programs_havlak4a-mallocgc-trim.png
│ ├── profiling-go-programs_havlak4a-mallocgc.png
│ ├── race-detector.article
│ ├── race-detector
│ │ ├── blackhole.go
│ │ ├── timer-fixed.go
│ │ └── timer.go
│ ├── real-go-projects-smarttwitter-and-webgo.article
│ ├── share-memory-by-communicating.article
│ ├── slices.article
│ ├── slices
│ │ ├── prog010.go
│ │ ├── prog020.go
│ │ ├── prog030.go
│ │ ├── prog040.go
│ │ ├── prog050.go
│ │ ├── prog060.go
│ │ ├── prog070.go
│ │ ├── prog080.go
│ │ ├── prog090.go
│ │ ├── prog100.go
│ │ ├── prog110.go
│ │ ├── prog120.go
│ │ ├── prog130.go
│ │ ├── prog140.go
│ │ └── prog150.go
│ ├── spotlight-on-external-go-libraries.article
│ ├── strings.article
│ ├── strings
│ │ ├── basic.go
│ │ ├── encoding.go
│ │ ├── range.go
│ │ └── utf8.go
│ ├── the-app-engine-sdk-and-workspaces-gopath.article
│ ├── the-path-to-go-1.article
│ ├── third-party-libraries-goprotobuf-and.article
│ ├── two-go-talks-lexical-scanning-in-go-and.article
│ ├── two-recent-go-articles.article
│ ├── two-recent-go-talks.article
│ ├── upcoming-google-io-go-events.article
│ └── writing-scalable-app-engine.article
│ ├── static
│ └── favicon.ico
│ ├── support
│ └── racy
│ │ └── racy.go
│ └── template
│ ├── article.tmpl
│ ├── doc.tmpl
│ ├── home.tmpl
│ ├── index.tmpl
│ └── root.tmpl
├── doc
└── zh_CN
│ ├── articles
│ ├── go_command.html
│ ├── index.html
│ ├── race_detector.html
│ └── wiki
│ │ ├── edit.html
│ │ ├── final-noclosure.go
│ │ ├── final-noerror.go
│ │ ├── final-parsetemplate.go
│ │ ├── final-template.go
│ │ ├── final.go
│ │ ├── get.go
│ │ ├── http-sample.go
│ │ ├── index.html
│ │ ├── notemplate.go
│ │ ├── part1-noerror.go
│ │ ├── part1.go
│ │ ├── part2.go
│ │ ├── part3-errorhandling.go
│ │ ├── part3.go
│ │ ├── test.bash
│ │ ├── test_Test.txt.good
│ │ ├── test_edit.good
│ │ ├── test_view.good
│ │ └── view.html
│ ├── asm.html
│ ├── cmd.html
│ ├── code.html
│ ├── codewalk
│ ├── codewalk.css
│ ├── codewalk.js
│ ├── codewalk.xml
│ ├── functions.xml
│ ├── markov.go
│ ├── markov.xml
│ ├── pig.go
│ ├── popout.png
│ ├── run
│ ├── sharemem.xml
│ └── urlpoll.go
│ ├── contrib.html
│ ├── contribute.html
│ ├── debugging_with_gdb.html
│ ├── devel
│ ├── release.html
│ └── weekly.html
│ ├── docs.html
│ ├── effective_go.html
│ ├── gccgo_contribute.html
│ ├── gccgo_install.html
│ ├── go-logo-black.png
│ ├── go-logo-blue.png
│ ├── go-logo-white.png
│ ├── go1.1.html
│ ├── go1.2.html
│ ├── go1.3.html
│ ├── go1.4.html
│ ├── go1.5.txt
│ ├── go1.html
│ ├── go1compat.html
│ ├── go_faq.html
│ ├── go_mem.html
│ ├── go_spec.html
│ ├── go_spec.old.html
│ ├── gopher
│ ├── README
│ ├── appenginegopher.jpg
│ ├── appenginegophercolor.jpg
│ ├── appenginelogo.gif
│ ├── biplane.jpg
│ ├── bumper.png
│ ├── bumper192x108.png
│ ├── bumper320x180.png
│ ├── bumper480x270.png
│ ├── bumper640x360.png
│ ├── doc.png
│ ├── fiveyears.jpg
│ ├── frontpage-china.png
│ ├── frontpage.png
│ ├── gopherbw.png
│ ├── gophercolor.png
│ ├── gophercolor16x16.png
│ ├── gopherconf.png
│ ├── help.png
│ ├── pencil
│ │ ├── gopherhat.jpg
│ │ ├── gopherhelmet.jpg
│ │ ├── gophermega.jpg
│ │ ├── gopherrunning.jpg
│ │ ├── gopherswim.jpg
│ │ └── gopherswrench.jpg
│ ├── pkg.png
│ ├── project.png
│ ├── ref.png
│ ├── run.png
│ └── talks.png
│ ├── help.html
│ ├── ie.css
│ ├── install-source.html
│ ├── install.html
│ ├── logo-153x55.png
│ ├── play
│ ├── fib.go
│ ├── hello.go
│ ├── life.go
│ ├── peano.go
│ ├── pi.go
│ ├── sieve.go
│ ├── solitaire.go
│ └── tree.go
│ ├── progs
│ ├── cgo1.go
│ ├── cgo2.go
│ ├── cgo3.go
│ ├── cgo4.go
│ ├── defer.go
│ ├── defer.out
│ ├── defer2.go
│ ├── defer2.out
│ ├── eff_bytesize.go
│ ├── eff_bytesize.out
│ ├── eff_qr.go
│ ├── eff_sequence.go
│ ├── eff_sequence.out
│ ├── eff_unused1.go
│ ├── eff_unused2.go
│ ├── error.go
│ ├── error2.go
│ ├── error3.go
│ ├── error4.go
│ ├── go1.go
│ ├── gobs1.go
│ ├── gobs2.go
│ ├── image_draw.go
│ ├── image_package1.go
│ ├── image_package1.out
│ ├── image_package2.go
│ ├── image_package2.out
│ ├── image_package3.go
│ ├── image_package3.out
│ ├── image_package4.go
│ ├── image_package4.out
│ ├── image_package5.go
│ ├── image_package5.out
│ ├── image_package6.go
│ ├── image_package6.out
│ ├── interface.go
│ ├── interface2.go
│ ├── interface2.out
│ ├── json1.go
│ ├── json2.go
│ ├── json2.out
│ ├── json3.go
│ ├── json4.go
│ ├── json5.go
│ ├── run
│ ├── slices.go
│ ├── timeout1.go
│ ├── timeout2.go
│ └── update.bash
│ ├── root.html
│ ├── share.png
│ ├── sieve.gif
│ └── tos.html
├── golang.org
└── x
│ ├── arch
│ ├── arm
│ │ └── armasm
│ │ │ └── doc_zh_CN.go
│ └── x86
│ │ └── x86asm
│ │ └── doc_zh_CN.go
│ ├── image
│ ├── bmp
│ │ └── doc_zh_CN.go
│ ├── draw
│ │ └── doc_zh_CN.go
│ ├── math
│ │ ├── f32
│ │ │ └── doc_zh_CN.go
│ │ └── f64
│ │ │ └── doc_zh_CN.go
│ ├── riff
│ │ └── doc_zh_CN.go
│ ├── tiff
│ │ ├── doc_zh_CN.go
│ │ └── lzw
│ │ │ └── doc_zh_CN.go
│ ├── vp8
│ │ └── doc_zh_CN.go
│ ├── vp8l
│ │ └── doc_zh_CN.go
│ └── webp
│ │ ├── doc_zh_CN.go
│ │ └── nycbcra
│ │ └── doc_zh_CN.go
│ ├── net
│ └── http2
│ │ └── hpack
│ │ └── doc_zh_CN.go
│ └── tools
│ ├── cmd
│ └── godoc
│ │ └── doc_zh_CN.go
│ └── go
│ └── ast
│ └── astutil
│ └── doc_zh_CN.go
├── golist.json
├── screenshot.png
├── src
├── archive
│ ├── tar
│ │ └── doc_zh_CN.go
│ └── zip
│ │ └── doc_zh_CN.go
├── bufio
│ └── doc_zh_CN.go
├── builtin
│ └── doc_zh_CN.go
├── bytes
│ └── doc_zh_CN.go
├── cmd
│ ├── asm
│ │ └── internal
│ │ │ ├── arch
│ │ │ └── doc_zh_CN.go
│ │ │ ├── asm
│ │ │ └── doc_zh_CN.go
│ │ │ ├── flags
│ │ │ └── doc_zh_CN.go
│ │ │ └── lex
│ │ │ └── doc_zh_CN.go
│ ├── compile
│ │ └── internal
│ │ │ ├── amd64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── arm
│ │ │ └── doc_zh_CN.go
│ │ │ ├── arm64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── big
│ │ │ └── doc_zh_CN.go
│ │ │ ├── gc
│ │ │ └── doc_zh_CN.go
│ │ │ ├── mips64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── ppc64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── s390x
│ │ │ └── doc_zh_CN.go
│ │ │ ├── ssa
│ │ │ └── doc_zh_CN.go
│ │ │ └── x86
│ │ │ └── doc_zh_CN.go
│ ├── internal
│ │ ├── bio
│ │ │ └── doc_zh_CN.go
│ │ ├── gcprog
│ │ │ └── doc_zh_CN.go
│ │ ├── goobj
│ │ │ └── doc_zh_CN.go
│ │ ├── obj
│ │ │ ├── arm
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── arm64
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── doc_zh_CN.go
│ │ │ ├── mips
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── ppc64
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── s390x
│ │ │ │ └── doc_zh_CN.go
│ │ │ └── x86
│ │ │ │ └── doc_zh_CN.go
│ │ ├── objfile
│ │ │ └── doc_zh_CN.go
│ │ ├── pprof
│ │ │ ├── commands
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── driver
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── fetch
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── plugin
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── profile
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── report
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── svg
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── symbolizer
│ │ │ │ └── doc_zh_CN.go
│ │ │ ├── symbolz
│ │ │ │ └── doc_zh_CN.go
│ │ │ └── tempfile
│ │ │ │ └── doc_zh_CN.go
│ │ └── sys
│ │ │ └── doc_zh_CN.go
│ ├── link
│ │ └── internal
│ │ │ ├── amd64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── arm
│ │ │ └── doc_zh_CN.go
│ │ │ ├── arm64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── ld
│ │ │ └── doc_zh_CN.go
│ │ │ ├── mips64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── ppc64
│ │ │ └── doc_zh_CN.go
│ │ │ ├── s390x
│ │ │ └── doc_zh_CN.go
│ │ │ └── x86
│ │ │ └── doc_zh_CN.go
│ └── vet
│ │ └── internal
│ │ └── whitelist
│ │ └── doc_zh_CN.go
├── compress
│ ├── bzip2
│ │ └── doc_zh_CN.go
│ ├── flate
│ │ └── doc_zh_CN.go
│ ├── gzip
│ │ └── doc_zh_CN.go
│ ├── lzw
│ │ └── doc_zh_CN.go
│ └── zlib
│ │ └── doc_zh_CN.go
├── container
│ ├── heap
│ │ └── doc_zh_CN.go
│ ├── list
│ │ └── doc_zh_CN.go
│ └── ring
│ │ └── doc_zh_CN.go
├── context
│ └── doc_zh_CN.go
├── crypto
│ ├── aes
│ │ └── doc_zh_CN.go
│ ├── cipher
│ │ └── doc_zh_CN.go
│ ├── des
│ │ └── doc_zh_CN.go
│ ├── doc_zh_CN.go
│ ├── dsa
│ │ └── doc_zh_CN.go
│ ├── ecdsa
│ │ └── doc_zh_CN.go
│ ├── elliptic
│ │ └── doc_zh_CN.go
│ ├── hmac
│ │ └── doc_zh_CN.go
│ ├── md5
│ │ └── doc_zh_CN.go
│ ├── rand
│ │ └── doc_zh_CN.go
│ ├── rc4
│ │ └── doc_zh_CN.go
│ ├── rsa
│ │ └── doc_zh_CN.go
│ ├── sha1
│ │ └── doc_zh_CN.go
│ ├── sha256
│ │ └── doc_zh_CN.go
│ ├── sha512
│ │ └── doc_zh_CN.go
│ ├── subtle
│ │ └── doc_zh_CN.go
│ ├── tls
│ │ └── doc_zh_CN.go
│ └── x509
│ │ ├── doc_zh_CN.go
│ │ └── pkix
│ │ └── doc_zh_CN.go
├── database
│ └── sql
│ │ ├── doc_zh_CN.go
│ │ └── driver
│ │ └── doc_zh_CN.go
├── debug
│ ├── dwarf
│ │ └── doc_zh_CN.go
│ ├── elf
│ │ └── doc_zh_CN.go
│ ├── gosym
│ │ └── doc_zh_CN.go
│ ├── macho
│ │ └── doc_zh_CN.go
│ ├── pe
│ │ └── doc_zh_CN.go
│ └── plan9obj
│ │ └── doc_zh_CN.go
├── encoding
│ ├── ascii85
│ │ └── doc_zh_CN.go
│ ├── asn1
│ │ └── doc_zh_CN.go
│ ├── base32
│ │ └── doc_zh_CN.go
│ ├── base64
│ │ └── doc_zh_CN.go
│ ├── binary
│ │ └── doc_zh_CN.go
│ ├── csv
│ │ └── doc_zh_CN.go
│ ├── doc_zh_CN.go
│ ├── gob
│ │ └── doc_zh_CN.go
│ ├── hex
│ │ └── doc_zh_CN.go
│ ├── json
│ │ └── doc_zh_CN.go
│ ├── pem
│ │ └── doc_zh_CN.go
│ └── xml
│ │ └── doc_zh_CN.go
├── errors
│ └── doc_zh_CN.go
├── expvar
│ └── doc_zh_CN.go
├── flag
│ └── doc_zh_CN.go
├── fmt
│ └── doc_zh_CN.go
├── go
│ ├── ast
│ │ └── doc_zh_CN.go
│ ├── build
│ │ └── doc_zh_CN.go
│ ├── constant
│ │ └── doc_zh_CN.go
│ ├── doc
│ │ └── doc_zh_CN.go
│ ├── format
│ │ └── doc_zh_CN.go
│ ├── importer
│ │ └── doc_zh_CN.go
│ ├── internal
│ │ ├── gccgoimporter
│ │ │ └── doc_zh_CN.go
│ │ └── gcimporter
│ │ │ └── doc_zh_CN.go
│ ├── parser
│ │ └── doc_zh_CN.go
│ ├── printer
│ │ └── doc_zh_CN.go
│ ├── scanner
│ │ └── doc_zh_CN.go
│ ├── token
│ │ └── doc_zh_CN.go
│ └── types
│ │ └── doc_zh_CN.go
├── hash
│ ├── adler32
│ │ └── doc_zh_CN.go
│ ├── crc32
│ │ └── doc_zh_CN.go
│ ├── crc64
│ │ └── doc_zh_CN.go
│ ├── doc_zh_CN.go
│ └── fnv
│ │ └── doc_zh_CN.go
├── html
│ ├── doc_zh_CN.go
│ └── template
│ │ └── doc_zh_CN.go
├── image
│ ├── color
│ │ ├── doc_zh_CN.go
│ │ └── palette
│ │ │ └── doc_zh_CN.go
│ ├── doc_zh_CN.go
│ ├── draw
│ │ └── doc_zh_CN.go
│ ├── gif
│ │ └── doc_zh_CN.go
│ ├── internal
│ │ └── imageutil
│ │ │ └── doc_zh_CN.go
│ ├── jpeg
│ │ └── doc_zh_CN.go
│ └── png
│ │ └── doc_zh_CN.go
├── index
│ └── suffixarray
│ │ └── doc_zh_CN.go
├── internal
│ ├── nettrace
│ │ └── doc_zh_CN.go
│ ├── race
│ │ └── doc_zh_CN.go
│ ├── singleflight
│ │ └── doc_zh_CN.go
│ ├── syscall
│ │ ├── unix
│ │ │ └── doc_zh_CN.go
│ │ └── windows
│ │ │ └── sysdll
│ │ │ └── doc_zh_CN.go
│ ├── testenv
│ │ └── doc_zh_CN.go
│ └── trace
│ │ └── doc_zh_CN.go
├── io
│ ├── doc_zh_CN.go
│ └── ioutil
│ │ └── doc_zh_CN.go
├── log
│ ├── doc_zh_CN.go
│ └── syslog
│ │ └── doc_zh_CN.go
├── math
│ ├── big
│ │ └── doc_zh_CN.go
│ ├── cmplx
│ │ └── doc_zh_CN.go
│ ├── doc_zh_CN.go
│ └── rand
│ │ └── doc_zh_CN.go
├── mime
│ ├── doc_zh_CN.go
│ ├── multipart
│ │ └── doc_zh_CN.go
│ └── quotedprintable
│ │ └── doc_zh_CN.go
├── net
│ ├── doc_zh_CN.go
│ ├── http
│ │ ├── cgi
│ │ │ └── doc_zh_CN.go
│ │ ├── cookiejar
│ │ │ └── doc_zh_CN.go
│ │ ├── doc_zh_CN.go
│ │ ├── fcgi
│ │ │ └── doc_zh_CN.go
│ │ ├── httptest
│ │ │ └── doc_zh_CN.go
│ │ ├── httptrace
│ │ │ └── doc_zh_CN.go
│ │ ├── httputil
│ │ │ └── doc_zh_CN.go
│ │ ├── internal
│ │ │ └── doc_zh_CN.go
│ │ └── pprof
│ │ │ └── doc_zh_CN.go
│ ├── internal
│ │ └── socktest
│ │ │ └── doc_zh_CN.go
│ ├── mail
│ │ └── doc_zh_CN.go
│ ├── rpc
│ │ ├── doc_zh_CN.go
│ │ └── jsonrpc
│ │ │ └── doc_zh_CN.go
│ ├── smtp
│ │ └── doc_zh_CN.go
│ ├── textproto
│ │ └── doc_zh_CN.go
│ └── url
│ │ └── doc_zh_CN.go
├── os
│ ├── doc_zh_CN.go
│ ├── exec
│ │ └── doc_zh_CN.go
│ ├── signal
│ │ └── doc_zh_CN.go
│ └── user
│ │ └── doc_zh_CN.go
├── path
│ ├── doc_zh_CN.go
│ └── filepath
│ │ └── doc_zh_CN.go
├── reflect
│ └── doc_zh_CN.go
├── regexp
│ ├── doc_zh_CN.go
│ └── syntax
│ │ └── doc_zh_CN.go
├── runtime
│ ├── cgo
│ │ └── doc_zh_CN.go
│ ├── debug
│ │ └── doc_zh_CN.go
│ ├── doc_zh_CN.go
│ ├── internal
│ │ ├── atomic
│ │ │ └── doc_zh_CN.go
│ │ └── sys
│ │ │ └── doc_zh_CN.go
│ ├── pprof
│ │ └── doc_zh_CN.go
│ ├── race
│ │ └── doc_zh_CN.go
│ └── trace
│ │ └── doc_zh_CN.go
├── sort
│ └── doc_zh_CN.go
├── strconv
│ └── doc_zh_CN.go
├── strings
│ └── doc_zh_CN.go
├── sync
│ ├── atomic
│ │ └── doc_zh_CN.go
│ └── doc_zh_CN.go
├── syscall
│ └── doc_zh_CN.go
├── testing
│ ├── doc_zh_CN.go
│ ├── iotest
│ │ └── doc_zh_CN.go
│ └── quick
│ │ └── doc_zh_CN.go
├── text
│ ├── scanner
│ │ └── doc_zh_CN.go
│ ├── tabwriter
│ │ └── doc_zh_CN.go
│ └── template
│ │ ├── doc_zh_CN.go
│ │ └── parse
│ │ └── doc_zh_CN.go
├── time
│ └── doc_zh_CN.go
├── unicode
│ ├── doc_zh_CN.go
│ ├── utf16
│ │ └── doc_zh_CN.go
│ └── utf8
│ │ └── doc_zh_CN.go
└── unsafe
│ └── doc_zh_CN.go
├── static
└── zh_CN
│ ├── analysis
│ ├── call-eg.png
│ ├── call3.png
│ ├── callers1.png
│ ├── callers2.png
│ ├── chan1.png
│ ├── chan2a.png
│ ├── chan2b.png
│ ├── error1.png
│ ├── help.html
│ ├── ident-def.png
│ ├── ident-field.png
│ ├── ident-func.png
│ ├── ipcg-func.png
│ ├── ipcg-pkg.png
│ ├── typeinfo-pkg.png
│ └── typeinfo-src.png
│ ├── callgraph.html
│ ├── codewalk.html
│ ├── codewalkdir.html
│ ├── dirlist.html
│ ├── error.html
│ ├── example.html
│ ├── godoc.html
│ ├── godocs.js
│ ├── images
│ ├── minus.gif
│ ├── plus.gif
│ ├── treeview-black-line.gif
│ ├── treeview-black.gif
│ ├── treeview-default-line.gif
│ ├── treeview-default.gif
│ ├── treeview-gray-line.gif
│ └── treeview-gray.gif
│ ├── implements.html
│ ├── jquery.js
│ ├── jquery.treeview.css
│ ├── jquery.treeview.edit.js
│ ├── jquery.treeview.js
│ ├── methodset.html
│ ├── opensearch.xml
│ ├── package.html
│ ├── package.txt
│ ├── play.js
│ ├── playground.js
│ ├── search.html
│ ├── search.txt
│ ├── searchcode.html
│ ├── searchdoc.html
│ ├── searchtxt.html
│ └── style.css
├── talks
├── README.md
└── zh_CN
│ ├── content
│ ├── 2009
│ │ └── go_talk-20091030.pdf
│ ├── 2010
│ │ ├── ExpressivenessOfGo-2010.pdf
│ │ ├── go_talk-20100112.html
│ │ ├── go_talk-20100121.html
│ │ ├── go_talk-20100323.html
│ │ ├── gofrontend-gcc-summit-2010.pdf
│ │ ├── io
│ │ │ ├── balance.go
│ │ │ ├── decrypt.go
│ │ │ ├── encrypt.go
│ │ │ ├── eval1.go
│ │ │ ├── eval2.go
│ │ │ └── talk.pdf
│ │ └── support
│ │ │ ├── bumper480x270.png
│ │ │ ├── bumper640x360.png
│ │ │ ├── go-logo-white.png
│ │ │ ├── java-typing.png
│ │ │ ├── slidy.css
│ │ │ └── slidy.js
│ ├── 2011
│ │ ├── Real_World_Go.pdf
│ │ └── Writing_Web_Apps_in_Go.pdf
│ ├── 2012
│ │ ├── 10things.slide
│ │ ├── 10things
│ │ │ ├── 10.go
│ │ │ ├── 8.go
│ │ │ ├── 9.go
│ │ │ ├── 9b.go
│ │ │ └── gopher.jpg
│ │ ├── README
│ │ ├── chat.slide
│ │ ├── chat
│ │ │ ├── both
│ │ │ │ ├── chat.go
│ │ │ │ ├── html.go
│ │ │ │ └── markov.go
│ │ │ ├── diagrams.png
│ │ │ ├── gophers.jpg
│ │ │ ├── http-noembed
│ │ │ │ ├── chat.go
│ │ │ │ └── html.go
│ │ │ ├── http
│ │ │ │ ├── chat.go
│ │ │ │ └── html.go
│ │ │ ├── markov
│ │ │ │ ├── chat.go
│ │ │ │ ├── html.go
│ │ │ │ └── markov.go
│ │ │ ├── support
│ │ │ │ ├── chan.go
│ │ │ │ ├── defs.go
│ │ │ │ ├── echo-no-concurrency.go
│ │ │ │ ├── echo.go
│ │ │ │ ├── embed.go
│ │ │ │ ├── goroutines.go
│ │ │ │ ├── hello-net.go
│ │ │ │ ├── hello-web.go
│ │ │ │ ├── hello.go
│ │ │ │ ├── markov.txt
│ │ │ │ ├── select.go
│ │ │ │ ├── websocket.go
│ │ │ │ └── websocket.js
│ │ │ ├── tcp-simple
│ │ │ │ └── chat.go
│ │ │ └── tcp
│ │ │ │ └── chat.go
│ │ ├── concurrency.slide
│ │ ├── concurrency
│ │ │ ├── images
│ │ │ │ ├── gophereartrumpet.jpg
│ │ │ │ └── gophermegaphones.jpg
│ │ │ └── support
│ │ │ │ ├── boring.go
│ │ │ │ ├── changoboring.go
│ │ │ │ ├── chat.go
│ │ │ │ ├── daisy.go
│ │ │ │ ├── faninboring.go
│ │ │ │ ├── generator2boring.go
│ │ │ │ ├── generatorboring.go
│ │ │ │ ├── goboring.go
│ │ │ │ ├── google.go
│ │ │ │ ├── google2.1.go
│ │ │ │ ├── google2.2.go
│ │ │ │ ├── google2.3.go
│ │ │ │ ├── google3.0.go
│ │ │ │ ├── helpers.go
│ │ │ │ ├── lessboring.go
│ │ │ │ ├── mainboring.go
│ │ │ │ ├── quit.go
│ │ │ │ ├── rcvquit.go
│ │ │ │ ├── select.go
│ │ │ │ ├── selectboring.go
│ │ │ │ ├── sequenceboring.go
│ │ │ │ ├── timeout.go
│ │ │ │ ├── timeoutall.go
│ │ │ │ └── waitgoboring.go
│ │ ├── go-docs.slide
│ │ ├── go-docs
│ │ │ ├── blog.png
│ │ │ ├── codewalk.png
│ │ │ ├── faninboring.go
│ │ │ ├── gobyexample.png
│ │ │ ├── godoc.png
│ │ │ ├── godoc1.png
│ │ │ ├── gopkgdoc.png
│ │ │ ├── gowiki.png
│ │ │ ├── javadoc.png
│ │ │ ├── javadoc1.png
│ │ │ ├── lseek.png
│ │ │ ├── play.png
│ │ │ ├── seek.png
│ │ │ └── tour.png
│ │ ├── go1.slide
│ │ ├── go1
│ │ │ ├── changes.png
│ │ │ ├── errordiff1.png
│ │ │ ├── errordiff2.png
│ │ │ └── go1lines.png
│ │ ├── goforc.slide
│ │ ├── goforc
│ │ │ ├── adder.go
│ │ │ ├── cat.go
│ │ │ ├── celsius.go
│ │ │ ├── channels.go
│ │ │ ├── communication1.go
│ │ │ ├── communication2.go
│ │ │ ├── consts.go
│ │ │ ├── decls.go
│ │ │ ├── example0.go
│ │ │ ├── example1.go
│ │ │ ├── example2.go
│ │ │ ├── forloop.go
│ │ │ ├── hello.go
│ │ │ ├── interface.go
│ │ │ ├── point.go
│ │ │ ├── stmts.go
│ │ │ ├── vars.go
│ │ │ ├── worker1.go
│ │ │ └── worker2.go
│ │ ├── insidepresent.slide
│ │ ├── insidepresent
│ │ │ ├── hello.go
│ │ │ ├── socket-simple.go
│ │ │ ├── socket.go
│ │ │ ├── websocket.go
│ │ │ ├── websocket.js
│ │ │ └── wire.html
│ │ ├── simple.slide
│ │ ├── simple
│ │ │ ├── flag.go
│ │ │ ├── gopher.jpg
│ │ │ ├── hello-web.go
│ │ │ ├── hello.go
│ │ │ ├── io
│ │ │ │ └── io.go
│ │ │ ├── json.go
│ │ │ ├── reader.go
│ │ │ ├── split.png
│ │ │ ├── test.go
│ │ │ ├── test
│ │ │ │ └── string_test.go
│ │ │ ├── time.go
│ │ │ ├── time2.go
│ │ │ ├── time3.go
│ │ │ └── webfront
│ │ │ │ ├── main.go
│ │ │ │ ├── server_test.go
│ │ │ │ └── testdata
│ │ │ │ └── index.html
│ │ ├── splash.article
│ │ ├── splash.slide
│ │ ├── splash
│ │ │ ├── appenginegophercolor.jpg
│ │ │ ├── datacenter.jpg
│ │ │ └── fire.jpg
│ │ ├── tutorial.slide
│ │ ├── tutorial
│ │ │ ├── 1get.go
│ │ │ ├── 2json.go
│ │ │ ├── 3func.go
│ │ │ ├── 4method.go
│ │ │ ├── golang.json
│ │ │ ├── hello.go
│ │ │ ├── jsonserve.go
│ │ │ ├── main.go
│ │ │ └── reddit
│ │ │ │ └── reddit.go
│ │ ├── waza.slide
│ │ ├── waza
│ │ │ ├── balance.go
│ │ │ ├── gopherchart.jpg
│ │ │ ├── gophercomplex0.jpg
│ │ │ ├── gophercomplex1.jpg
│ │ │ ├── gophercomplex2.jpg
│ │ │ ├── gophercomplex3.jpg
│ │ │ ├── gophercomplex4.jpg
│ │ │ ├── gophercomplex5.jpg
│ │ │ ├── gophercomplex6.jpg
│ │ │ ├── gophersimple1.jpg
│ │ │ ├── gophersimple2.jpg
│ │ │ ├── gophersimple3.jpg
│ │ │ ├── gophersimple4.jpg
│ │ │ ├── load1
│ │ │ ├── load2
│ │ │ └── snippets
│ │ ├── zen.slide
│ │ └── zen
│ │ │ ├── hello.go
│ │ │ ├── http.go
│ │ │ ├── jsonformat.go
│ │ │ └── race.go
│ ├── 2013
│ │ ├── advconc.slide
│ │ ├── advconc
│ │ │ ├── buffer
│ │ │ │ └── buffer.go
│ │ │ ├── dedupermain
│ │ │ │ └── dedupermain.go
│ │ │ ├── fakemain
│ │ │ │ └── fakemain.go
│ │ │ ├── gopherhat.jpg
│ │ │ ├── gopherrunning.jpg
│ │ │ ├── gopherswim.jpg
│ │ │ ├── gopherswrench.jpg
│ │ │ ├── naivemain
│ │ │ │ └── naivemain.go
│ │ │ ├── nilselect
│ │ │ │ └── nilselect.go
│ │ │ ├── pingpong
│ │ │ │ └── pingpong.go
│ │ │ ├── pingpong1.go
│ │ │ ├── pingpongdeadlock
│ │ │ │ └── pingpongdeadlock.go
│ │ │ ├── pingpongpanic
│ │ │ │ └── pingpongpanic.go
│ │ │ ├── race.out
│ │ │ ├── race.png
│ │ │ └── realmain
│ │ │ │ └── realmain.go
│ │ ├── bestpractices.slide
│ │ ├── bestpractices
│ │ │ ├── bufchan.go
│ │ │ ├── bufchanfix.go
│ │ │ ├── cmd.png
│ │ │ ├── concurrency1.go
│ │ │ ├── concurrency2.go
│ │ │ ├── funcdraw
│ │ │ │ ├── cmd
│ │ │ │ │ └── funcdraw.go
│ │ │ │ ├── drawer
│ │ │ │ │ ├── dependent.go
│ │ │ │ │ ├── drawer.go
│ │ │ │ │ └── drawer_test.go
│ │ │ │ └── parser
│ │ │ │ │ └── parser.go
│ │ │ ├── httphandler.go
│ │ │ ├── quitchan.go
│ │ │ ├── server.go
│ │ │ ├── shortercode1.go
│ │ │ ├── shortercode2.go
│ │ │ ├── shortercode3.go
│ │ │ ├── shortercode4.go
│ │ │ ├── shortercode5.go
│ │ │ └── shortercode6.go
│ │ ├── distsys.slide
│ │ ├── distsys
│ │ │ ├── addr1.go
│ │ │ ├── addr2.go
│ │ │ ├── addr3.go
│ │ │ ├── addr4.go
│ │ │ ├── addr5.go
│ │ │ ├── finger.go
│ │ │ ├── hello.go
│ │ │ ├── hello0.go
│ │ │ ├── hello1.go
│ │ │ ├── replread.go
│ │ │ ├── replwrite.go
│ │ │ ├── writebuffer.go
│ │ │ └── writebuffer2.go
│ │ ├── go-sreops.slide
│ │ ├── go-sreops
│ │ │ ├── goroutines-channels.go
│ │ │ ├── goroutines.go
│ │ │ └── hello.go
│ │ ├── go1.1.slide
│ │ ├── go1.1
│ │ │ ├── blockprofile.png
│ │ │ ├── blockprofile.svg
│ │ │ ├── chanof.go
│ │ │ ├── intdiv.go
│ │ │ ├── makefunc.go
│ │ │ ├── methodvals-old.go
│ │ │ ├── methodvals.go
│ │ │ ├── race.go
│ │ │ ├── return-old.go
│ │ │ ├── return.go
│ │ │ ├── scanner.go
│ │ │ ├── scanner2.go
│ │ │ ├── timer.go
│ │ │ └── yearday.go
│ │ ├── go4python.slide
│ │ ├── go4python
│ │ │ ├── deco.go
│ │ │ ├── deco.py
│ │ │ ├── decoex.go
│ │ │ ├── dyntyp.py
│ │ │ ├── fib-gen.go
│ │ │ ├── fib-gen.py
│ │ │ ├── fib-gen2.go
│ │ │ ├── fib.go
│ │ │ ├── fib.py
│ │ │ ├── genex.go
│ │ │ ├── genex2.go
│ │ │ ├── img
│ │ │ │ ├── duck.jpg
│ │ │ │ ├── fib-go.png
│ │ │ │ ├── fib-py.png
│ │ │ │ ├── funnelin.jpg
│ │ │ │ ├── gopher.jpg
│ │ │ │ └── monkey.jpg
│ │ │ ├── monkey.go
│ │ │ ├── monkey.py
│ │ │ └── typesandmethods.go
│ │ ├── highperf.slide
│ │ ├── highperf
│ │ │ ├── aegopher.jpg
│ │ │ ├── appenginegophercolor.jpg
│ │ │ ├── appstats1.png
│ │ │ ├── appstats2.png
│ │ │ ├── appstats3.png
│ │ │ ├── art
│ │ │ │ ├── gophercart.png
│ │ │ │ ├── gophercheckout.png
│ │ │ │ └── gophermegaphone.png
│ │ │ ├── cachingembed.html
│ │ │ ├── concurrency.go.notouch
│ │ │ ├── gophermart.png
│ │ │ ├── gophermart2.png
│ │ │ ├── gopherrulespanner.png
│ │ │ ├── longtail.go
│ │ │ ├── mart
│ │ │ │ ├── 1
│ │ │ │ │ ├── app.yaml
│ │ │ │ │ └── mart.go
│ │ │ │ ├── 2
│ │ │ │ │ ├── app.yaml
│ │ │ │ │ └── mart.go
│ │ │ │ ├── 3
│ │ │ │ │ ├── app.yaml
│ │ │ │ │ └── mart.go
│ │ │ │ └── README
│ │ │ ├── santa.png
│ │ │ ├── santaembed.html
│ │ │ ├── santagraph.png
│ │ │ └── turkey.png
│ │ ├── oscon-dl.slide
│ │ └── oscon-dl
│ │ │ ├── after-code.png
│ │ │ ├── after.go
│ │ │ ├── after.png
│ │ │ ├── before.png
│ │ │ ├── chunkaligned.go
│ │ │ ├── copy.go
│ │ │ ├── cpp-toggle.png
│ │ │ ├── cpp-write.png
│ │ │ ├── cpp-writeerr.png
│ │ │ ├── crbug.png
│ │ │ ├── groupcache.go
│ │ │ ├── reader.png
│ │ │ ├── readseeker.png
│ │ │ ├── sectionreader.png
│ │ │ ├── seeker.png
│ │ │ ├── servecontent.png
│ │ │ ├── server-compose.go
│ │ │ ├── server-content.go
│ │ │ ├── server-fs.go
│ │ │ ├── server-hello.go
│ │ │ ├── server.go
│ │ │ ├── sizereaderat.go
│ │ │ └── slow.png
│ ├── 2014
│ │ ├── c2go.slide
│ │ ├── camlistore.slide
│ │ ├── camlistore
│ │ │ ├── cam-android.png
│ │ │ ├── cam-boot.png
│ │ │ ├── cam-checkins.jpg
│ │ │ ├── cam-fuse.png
│ │ │ ├── cam-mix-types.jpg
│ │ │ ├── cam-moscow.jpg
│ │ │ ├── cam-other.png
│ │ │ ├── cam-pano.jpg
│ │ │ └── cam-paris-portrait.jpg
│ │ ├── compiling.slide
│ │ ├── compiling
│ │ │ ├── const1.go
│ │ │ ├── const2.go
│ │ │ ├── const3.go
│ │ │ ├── name1.go
│ │ │ ├── name2.go
│ │ │ ├── rtype1.go
│ │ │ ├── rtype2.go
│ │ │ └── var1.go
│ │ ├── droidcon.slide
│ │ ├── droidcon
│ │ │ ├── gopherswim.jpg
│ │ │ └── gopherswrench.jpg
│ │ ├── go1.3.slide
│ │ ├── go1.3
│ │ │ ├── json.png
│ │ │ ├── liblink.graffle
│ │ │ ├── liblink1.png
│ │ │ └── liblink2.png
│ │ ├── go4gophers.slide
│ │ ├── go4gophers
│ │ │ ├── chain.go
│ │ │ ├── godoc.png
│ │ │ ├── gopherflag.png
│ │ │ ├── gopherhat.jpg
│ │ │ ├── gopherswim.jpg
│ │ │ ├── gopherswrench.jpg
│ │ │ ├── gophertraining.html
│ │ │ ├── gophertraining.png
│ │ │ ├── organs.go
│ │ │ ├── organs2.go
│ │ │ ├── organs3.go
│ │ │ ├── reader.go
│ │ │ ├── roshi.png
│ │ │ ├── sigourney.png
│ │ │ ├── sort.go
│ │ │ ├── tree-nothread.go
│ │ │ ├── tree-select.go
│ │ │ ├── tree-thread.go
│ │ │ ├── tree-walk.go
│ │ │ └── tree.png
│ │ ├── go4java.slide
│ │ ├── go4java
│ │ │ ├── BadInheritance.java
│ │ │ ├── Composition.java
│ │ │ ├── battle.go
│ │ │ ├── chan.go
│ │ │ ├── conc1.go
│ │ │ ├── conc2.go
│ │ │ ├── conc3.go
│ │ │ ├── embedsample.go
│ │ │ ├── goodcounter.go
│ │ │ ├── goroutines.go
│ │ │ ├── img
│ │ │ │ ├── baby.jpg
│ │ │ │ ├── badinheritance.png
│ │ │ │ ├── busy.jpg
│ │ │ │ ├── chain.jpg
│ │ │ │ ├── conc.jpg
│ │ │ │ ├── duck.jpg
│ │ │ │ ├── fast.jpg
│ │ │ │ ├── funcdraw.png
│ │ │ │ ├── funnelin.jpg
│ │ │ │ ├── gopher.jpg
│ │ │ │ ├── lego.jpg
│ │ │ │ ├── perfection.jpg
│ │ │ │ ├── piet.png
│ │ │ │ └── trends.png
│ │ │ ├── loopback.go
│ │ │ ├── runner
│ │ │ │ ├── embed.go
│ │ │ │ └── runner.go
│ │ │ └── writecounter.go
│ │ ├── gocon-tokyo.slide
│ │ ├── gocon-tokyo
│ │ │ ├── 60p.jpg
│ │ │ ├── changestats.png
│ │ │ ├── concurrency.svg
│ │ │ ├── concurrency0.svg
│ │ │ ├── concurrent.jpg
│ │ │ ├── contig-stack.png
│ │ │ ├── docker.png
│ │ │ ├── drone.png
│ │ │ ├── funfast-nogo.svg
│ │ │ ├── funfast.svg
│ │ │ ├── generics.svg
│ │ │ ├── goandroid.png
│ │ │ ├── gpio.gif
│ │ │ ├── sigourney.png
│ │ │ ├── spaghetti.jpg
│ │ │ ├── tardis.png
│ │ │ └── trs.png
│ │ ├── gotham-context.slide
│ │ ├── gotham-context
│ │ │ ├── after.go
│ │ │ ├── before.go
│ │ │ ├── eg.go
│ │ │ ├── first-context.go
│ │ │ ├── first.go
│ │ │ ├── interface.go
│ │ │ └── transitive.svg
│ │ ├── gothamgo-android.slide
│ │ ├── gothamgo-android
│ │ │ ├── red.go
│ │ │ ├── sprite_affine.svg
│ │ │ ├── sprite_subtex.svg
│ │ │ └── touch.go
│ │ ├── hammers.slide
│ │ ├── hammers
│ │ │ ├── codegen.go
│ │ │ ├── extractiface.go
│ │ │ ├── extractpath.go
│ │ │ ├── findthecode.go
│ │ │ ├── findtheifacedecl.go
│ │ │ ├── format.go
│ │ │ ├── fulltype.go
│ │ │ ├── importpath.go
│ │ │ └── types.go
│ │ ├── hellogophers.slide
│ │ ├── hellogophers
│ │ │ ├── emerging.png
│ │ │ ├── gophers.jpg
│ │ │ ├── hello.b
│ │ │ ├── hello.c
│ │ │ ├── hello.go
│ │ │ ├── helloAnsi.c
│ │ │ ├── helloDraftAnsi.c
│ │ │ ├── helloKnR.c
│ │ │ ├── hello_20080606.go
│ │ │ ├── hello_20080627.go
│ │ │ ├── hello_20080811.go
│ │ │ ├── hello_20081024.go
│ │ │ ├── hello_20090115.go
│ │ │ ├── hello_20091211.go
│ │ │ ├── hellogophers.go
│ │ │ ├── sieve.csp
│ │ │ ├── sieve.go
│ │ │ ├── sieve.newsqueak
│ │ │ ├── sieve_20080305.go
│ │ │ ├── sieve_20080722.go
│ │ │ ├── sieve_20080917.go
│ │ │ ├── sieve_20090106.go
│ │ │ ├── sieve_20090925.go
│ │ │ └── trends.png
│ │ ├── names.slide
│ │ ├── organizeio.slide
│ │ ├── organizeio
│ │ │ ├── godoc.png
│ │ │ ├── gogetversion.png
│ │ │ ├── hello.go
│ │ │ └── home.png
│ │ ├── playground.slide
│ │ ├── playground
│ │ │ ├── deadlock.go
│ │ │ ├── file.go
│ │ │ ├── heap.go
│ │ │ ├── hello.go
│ │ │ ├── http.go
│ │ │ ├── img
│ │ │ │ ├── andrew.png
│ │ │ │ ├── arch.png
│ │ │ │ ├── areyousure.png
│ │ │ │ ├── blog.png
│ │ │ │ ├── brad.png
│ │ │ │ ├── bug.png
│ │ │ │ ├── cat.jpg
│ │ │ │ ├── examples.png
│ │ │ │ ├── gopherbw.png
│ │ │ │ ├── jan.png
│ │ │ │ ├── mattn.png
│ │ │ │ ├── nacl.png
│ │ │ │ ├── play.png
│ │ │ │ ├── share.png
│ │ │ │ ├── sleepbug.png
│ │ │ │ └── tour.png
│ │ │ ├── loop.go
│ │ │ ├── net.go
│ │ │ ├── removeall.go
│ │ │ ├── rm.go
│ │ │ ├── sleep.go
│ │ │ ├── sleepfast.go
│ │ │ └── stack.go
│ │ ├── readability.slide
│ │ ├── readability
│ │ │ ├── close-cond-bad.go
│ │ │ ├── close-cond-good.go
│ │ │ ├── err_close_write_bad.go
│ │ │ ├── err_close_write_good.go
│ │ │ ├── err_regexp_bad.go
│ │ │ ├── err_regexp_good.go
│ │ │ ├── example_test.go
│ │ │ ├── gopher-ok-no.png
│ │ │ ├── gophers5th.jpg
│ │ │ ├── if-else-bad.go
│ │ │ ├── if-else-good.go
│ │ │ ├── if-switch-bad.go
│ │ │ ├── if-switch-good.go
│ │ │ ├── implement-interface-bad.go
│ │ │ ├── implement-interface-good.go
│ │ │ ├── in-band-error-client.go
│ │ │ ├── in-band-error.go
│ │ │ ├── long-line-fold.go
│ │ │ ├── long-line-nofold.go
│ │ │ ├── long-line-short.go
│ │ │ ├── nil_error.go
│ │ │ ├── nil_interface_en.go
│ │ │ ├── pkg.png
│ │ │ ├── project.png
│ │ │ ├── ref.png
│ │ │ ├── reflect-bad.go
│ │ │ ├── reflect-good.go
│ │ │ ├── resthandler-fix2.go
│ │ │ ├── resthandler.go
│ │ │ ├── struct-field-bad.go
│ │ │ ├── struct-field-good.go
│ │ │ ├── talks.png
│ │ │ ├── test-pattern_en.go
│ │ │ ├── time_duration_bad.go
│ │ │ ├── time_duration_bad1.go
│ │ │ ├── time_duration_bad2.go
│ │ │ ├── time_duration_good.go
│ │ │ └── val-and-error.go
│ │ ├── research.slide
│ │ ├── state-of-go.slide
│ │ ├── state-of-go
│ │ │ ├── bus.jpg
│ │ │ ├── dotgo.png
│ │ │ ├── gophercon.png
│ │ │ ├── gophers.jpg
│ │ │ ├── indent.png
│ │ │ ├── india.png
│ │ │ ├── msg-exceptions1b.png
│ │ │ ├── msg-exceptions2.png
│ │ │ ├── msg-generics.png
│ │ │ ├── msg-lacks.png
│ │ │ ├── msg-logo1.png
│ │ │ ├── msg-logo2.png
│ │ │ ├── msg-logo3.jpg
│ │ │ ├── msg-nogenerics.png
│ │ │ ├── msg-semi.png
│ │ │ ├── msg-type.png
│ │ │ ├── msg-wrong.png
│ │ │ ├── oloh.png
│ │ │ ├── redmonk.png
│ │ │ ├── sadgopher.png
│ │ │ └── tattoo.jpg
│ │ ├── state-of-the-gopher.slide
│ │ ├── state-of-the-gopher
│ │ │ ├── build.png
│ │ │ ├── bus.jpg
│ │ │ ├── contig-stack.png
│ │ │ ├── dotgo.png
│ │ │ ├── gopher.jpg
│ │ │ ├── gophercon.png
│ │ │ ├── india.png
│ │ │ ├── oloh.png
│ │ │ ├── opensource.png
│ │ │ ├── trace.png
│ │ │ ├── website1.png
│ │ │ └── website2.png
│ │ ├── static-analysis.slide
│ │ ├── static-analysis
│ │ │ ├── demo.go
│ │ │ ├── demoscript
│ │ │ ├── egtest
│ │ │ │ └── test.go
│ │ │ ├── fib.go
│ │ │ ├── hello.go
│ │ │ ├── hvn.svg
│ │ │ ├── template.go
│ │ │ └── tools.svg
│ │ ├── taste.slide
│ │ ├── taste
│ │ │ ├── concurrency1.go
│ │ │ ├── concurrency2.go
│ │ │ ├── examples.go
│ │ │ ├── hello.go
│ │ │ ├── hellohttp.go
│ │ │ ├── histo.go
│ │ │ ├── histo0.go
│ │ │ ├── histop.go
│ │ │ ├── idents.go
│ │ │ ├── point.go
│ │ │ ├── sort.go
│ │ │ ├── stringer.go
│ │ │ ├── walk.go
│ │ │ └── weekday.go
│ │ ├── testing.slide
│ │ └── testing
│ │ │ ├── cover.png
│ │ │ ├── go1.1.png
│ │ │ ├── httprecorder.go
│ │ │ ├── httpserver.go
│ │ │ ├── subprocess
│ │ │ ├── subprocess.go
│ │ │ └── subprocess_test.go
│ │ │ ├── test1
│ │ │ └── string_test.go
│ │ │ └── test2
│ │ │ └── string_test.go
│ ├── .gitattributes
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ └── app.yaml
│ ├── static
│ ├── article.css
│ ├── dir.css
│ ├── dir.js
│ ├── favicon.ico
│ ├── jquery-ui.js
│ ├── print.css
│ ├── slides.js
│ └── styles.css
│ └── template
│ ├── action.tmpl
│ ├── article.tmpl
│ ├── dir.tmpl
│ └── slides.tmpl
└── tour
└── zh_CN
├── content
├── basics.article
├── basics
│ ├── basic-types.go
│ ├── constants.go
│ ├── exported-names.go
│ ├── functions-continued.go
│ ├── functions.go
│ ├── imports.go
│ ├── multiple-results.go
│ ├── named-results.go
│ ├── numeric-constants.go
│ ├── packages.go
│ ├── short-variable-declarations.go
│ ├── type-conversions.go
│ ├── type-inference.go
│ ├── variables-with-initializers.go
│ ├── variables.go
│ └── zero.go
├── concurrency.article
├── concurrency
│ ├── buffered-channels.go
│ ├── channels.go
│ ├── default-selection.go
│ ├── exercise-equivalent-binary-trees.go
│ ├── exercise-web-crawler.go
│ ├── goroutines.go
│ ├── range-and-close.go
│ └── select.go
├── flowcontrol.article
├── flowcontrol
│ ├── defer-multi.go
│ ├── defer.go
│ ├── exercise-loops-and-functions.go
│ ├── for-continued.go
│ ├── for-is-gos-while.go
│ ├── for.go
│ ├── forever.go
│ ├── if-and-else.go
│ ├── if-with-a-short-statement.go
│ ├── if.go
│ ├── switch-evaluation-order.go
│ ├── switch-with-no-condition.go
│ └── switch.go
├── img
│ ├── newton.png
│ ├── newton3.png
│ └── tree.png
├── methods.article
├── methods
│ ├── errors.go
│ ├── exercise-errors.go
│ ├── exercise-http-handlers.go
│ ├── exercise-images.go
│ ├── exercise-reader.go
│ ├── exercise-rot-reader.go
│ ├── exercise-stringer.go
│ ├── images.go
│ ├── interfaces-are-satisfied-implicitly.go
│ ├── interfaces.go
│ ├── methods-continued.go
│ ├── methods-with-pointer-receivers.go
│ ├── methods.go
│ ├── reader.go
│ ├── stringer.go
│ └── web-servers.go
├── moretypes.article
├── moretypes
│ ├── append.go
│ ├── array.go
│ ├── exercise-fibonacci-closure.go
│ ├── exercise-maps.go
│ ├── exercise-slices.go
│ ├── function-closures.go
│ ├── function-values.go
│ ├── making-slices.go
│ ├── map-literals-continued.go
│ ├── map-literals.go
│ ├── maps.go
│ ├── mutating-maps.go
│ ├── nil-slices.go
│ ├── pointers.go
│ ├── range-continued.go
│ ├── range.go
│ ├── slices.go
│ ├── slicing-slices.go
│ ├── struct-fields.go
│ ├── struct-literals.go
│ ├── struct-pointers.go
│ └── structs.go
├── welcome.article
└── welcome
│ ├── hello.go
│ └── sandbox.go
├── solutions
├── README
├── binarytrees.go
├── binarytrees_quit.go
├── errors.go
├── fib.go
├── http.go
├── image.go
├── loops.go
├── maps.go
├── rot13.go
├── slices.go
├── stringers.go
└── webcrawler.go
├── static
├── css
│ └── app.css
├── img
│ ├── burger.png
│ ├── favicon.ico
│ └── gopher.png
├── js
│ ├── app.js
│ ├── controllers.js
│ ├── directives.js
│ ├── services.js
│ └── values.js
├── lib
│ ├── angular-ui.min.js
│ ├── angular.min.js
│ ├── codemirror
│ │ ├── AUTHORS
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── lib
│ │ │ ├── codemirror.css
│ │ │ └── codemirror.js
│ │ └── mode
│ │ │ └── go
│ │ │ └── go.js
│ ├── jquery-ui.min.js
│ └── jquery.min.js
└── partials
│ ├── editor.html
│ ├── lesson.html
│ ├── list.html
│ ├── toc-button.html
│ └── toc.html
└── template
├── action.tmpl
└── index.tmpl
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | *. text eol=lf
3 | .* text eol=lf
4 | *.go text eol=lf
5 | *.html text eol=lf
6 | *.tmpl text eol=lf
7 | *.yml text eol=lf
8 | *.toml text eol=lf
9 | *.md text eol=lf
10 | *.json text eol=lf
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | 除特别注明外, 本站内容均采用[知识共享-署名(CC-BY) 3.0协议](http://creativecommons.org/licenses/by/3.0/)授权,
2 | 代码遵循[Go项目的BSD协议](http://golang.org/LICENSE)授权.
3 |
--------------------------------------------------------------------------------
/blog/zh_CN/.gitattributes:
--------------------------------------------------------------------------------
1 | # Treat all files in this repo as binary, with no git magic updating
2 | # line endings. Windows users contributing to Go will need to use a
3 | # modern version of git and editors capable of LF line endings.
4 | #
5 | # We'll prevent accidental CRLF line endings from entering the repo
6 | # via the git-review gofmt checks.
7 | #
8 | # See golang.org/issue/9281
9 |
10 | * -text
11 |
--------------------------------------------------------------------------------
/blog/zh_CN/.gitignore:
--------------------------------------------------------------------------------
1 | # Add no patterns to .hgignore except for files generated by the build.
2 | last-change
3 |
--------------------------------------------------------------------------------
/blog/zh_CN/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/blog/zh_CN/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/blog/zh_CN/README:
--------------------------------------------------------------------------------
1 | This repository holds the Go Blog server code and content.
2 |
3 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
4 |
5 |
--------------------------------------------------------------------------------
/blog/zh_CN/app.yaml:
--------------------------------------------------------------------------------
1 | application: zh-golang
2 | version: blog
3 | runtime: go
4 | api_version: go1
5 |
6 | handlers:
7 | - url: /favicon.ico
8 | static_files: static/favicon.ico
9 | upload: static/favicon.ico
10 | - url: /.*
11 | script: _go_app
12 |
13 | nobuild_files: ^(support|content)/
14 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/4years-gopher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/4years-gopher.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/4years-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/4years-graph.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/5years/conferences.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/5years/conferences.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/5years/gophers5th.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/5years/gophers5th.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/_tr/div_begin_en.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/_tr/div_begin_zh_CN.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/_tr/div_end.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/building-stathat-with-go_stathat_architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/building-stathat-with-go_stathat_architecture.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/building-stathat-with-go_weather.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/building-stathat-with-go_weather.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/bool.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | type MyBool bool
10 | const True = true
11 | const TypedTrue bool = true
12 | var mb MyBool
13 | mb = true // OK
14 | mb = True // OK
15 | mb = TypedTrue // Bad
16 | fmt.Println(mb)
17 | // STOP OMIT
18 | }
19 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/complex1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | type MyComplex128 complex128
10 | const I = (0.0 + 1.0i)
11 | const TypedI complex128 = (0.0 + 1.0i)
12 | var mc MyComplex128
13 | mc = (0.0 + 1.0i) // OK
14 | mc = I // OK
15 | mc = TypedI // Bad
16 | fmt.Println(mc)
17 | // STOP OMIT
18 | }
19 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/complex2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | const Two = 2.0 + 0i
9 | // START OMIT
10 | s := Two
11 | fmt.Printf("%T: %v\n", s, s)
12 | // STOP OMIT
13 | }
14 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/complex3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | const Two = 2.0 + 0i
9 | // START OMIT
10 | var f float64
11 | var g float64 = Two
12 | f = Two
13 | fmt.Println(f, "and", g)
14 | // STOP OMIT
15 | }
16 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/default1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | fmt.Printf("%s", "Hello, 世界")
10 | // STOP OMIT
11 | }
12 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/default2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const hello = "Hello, 世界"
8 |
9 | func main() {
10 | // START OMIT
11 | fmt.Printf("%T: %v\n", "Hello, 世界", "Hello, 世界")
12 | fmt.Printf("%T: %v\n", hello, hello)
13 | // STOP OMIT
14 | }
15 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/default3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type MyString string
8 |
9 | const myStringHello MyString = "Hello, 世界"
10 |
11 | func main() {
12 | // START OMIT
13 | fmt.Printf("%T: %v\n", myStringHello, myStringHello)
14 | // STOP OMIT
15 | }
16 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/exercise1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | const MaxUint uint = -1 // Error: negative value
8 | // STOP OMIT
9 | }
10 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/exercise2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | const MaxUint uint = uint(-1) // Error: negative value
8 | // STOP OMIT
9 | }
10 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/exercise3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | var u uint
8 | var v = -1
9 | u = uint(v)
10 | // STOP OMIT
11 | _ = u
12 | }
13 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/exercise4.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | var u uint
8 | const v = -1
9 | u = uint(v) // Error: negative value
10 | // STOP OMIT
11 | _ = u
12 | }
13 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/exercise5.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | const MaxUint uint = ^0 // Error: overflow
8 | // STOP OMIT
9 | }
10 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/exercise6.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | const MaxUint = ^uint(0)
10 | fmt.Printf("%x\n", MaxUint)
11 | // STOP OMIT
12 | }
13 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/float1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | type MyFloat64 float64
10 | const Zero = 0.0
11 | const TypedZero float64 = 0.0
12 | var mf MyFloat64
13 | mf = 0.0 // OK
14 | mf = Zero // OK
15 | mf = TypedZero // Bad
16 | fmt.Println(mf)
17 | // STOP OMIT
18 | }
19 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/float2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | const Zero = 0.0
9 | const TypedZero float64 = 0.0
10 | // START OMIT
11 | var f32 float32
12 | f32 = 0.0
13 | f32 = Zero // OK: Zero is untyped
14 | f32 = TypedZero // Bad: TypedZero is float64 not float32.
15 | fmt.Println(f32)
16 | // STOP OMIT
17 | }
18 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/float3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | const Huge = 1e1000
9 | // START OMIT
10 | fmt.Println(Huge)
11 | // STOP OMIT
12 | }
13 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/float4.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | const Huge = 1e1000
9 | // START OMIT
10 | fmt.Println(Huge / 1e999)
11 | // STOP OMIT
12 | }
13 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/float5.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func main() {
11 | // START OMIT
12 | pi := math.Pi
13 | fmt.Println(pi)
14 | // STOP OMIT
15 | }
16 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/int1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | type MyInt int
10 | const Three = 3
11 | const TypedThree int = 3
12 | var mi MyInt
13 | mi = 3 // OK
14 | mi = Three // OK
15 | mi = TypedThree // Bad
16 | fmt.Println(mi)
17 | // STOP OMIT
18 | }
19 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/int2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | var i8 int8 = 128 // Error: too large.
8 | // STOP OMIT
9 | _ = i8
10 | }
11 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/int3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | var u8 uint8 = -1 // Error: negative value.
8 | // STOP OMIT
9 | _ = u8
10 | }
11 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/int4.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | // START OMIT
7 | type Char byte
8 | var c Char = '世' // Error: '世' has value 0x4e16, too large.
9 | // STOP OMIT
10 | _ = c
11 | }
12 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/numbers1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | var f float32 = 1
10 | var i int = 1.000
11 | var u uint32 = 1e3 - 99.0*10.0 - 9
12 | var c float64 = '\x01'
13 | var p uintptr = '\u0001'
14 | var r complex64 = 'b' - 'a'
15 | var b byte = 1.0 + 3i - 3.0i
16 |
17 | fmt.Println(f, i, u, c, p, r, b)
18 | // STOP OMIT
19 | }
20 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/numbers2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | var f = 'a' * 1.5
10 | fmt.Println(f)
11 | // STOP OMIT
12 | }
13 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/string1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const typedHello string = "Hello, 世界"
8 |
9 | func main() {
10 | // START OMIT
11 | var s string
12 | s = typedHello
13 | fmt.Println(s)
14 | // STOP OMIT
15 | }
16 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/string2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const typedHello string = "Hello, 世界"
8 |
9 | func main() {
10 | // START OMIT
11 | type MyString string
12 | var m MyString
13 | m = typedHello // Type error
14 | fmt.Println(m)
15 | // STOP OMIT
16 | }
17 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/string3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const typedHello string = "Hello, 世界"
8 |
9 | func main() {
10 | type MyString string
11 | var m MyString
12 | // START OMIT
13 | const myStringHello MyString = "Hello, 世界"
14 | m = myStringHello // OK
15 | fmt.Println(m)
16 | // STOP OMIT
17 | }
18 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/string4.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const typedHello string = "Hello, 世界"
8 |
9 | func main() {
10 | type MyString string
11 | var m MyString
12 | // START OMIT
13 | m = MyString(typedHello)
14 | fmt.Println(m)
15 | // STOP OMIT
16 | }
17 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/constants/syntax.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | // START OMIT
9 | fmt.Printf("%T %v\n", 0, 0)
10 | fmt.Printf("%T %v\n", 0.0, 0.0)
11 | fmt.Printf("%T %v\n", 'x', 'x')
12 | fmt.Printf("%T %v\n", 0i, 0i)
13 | // STOP OMIT
14 | }
15 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/cover/count.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/cover/count.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/cover/pkg.go:
--------------------------------------------------------------------------------
1 | package size
2 |
3 | func Size(a int) string {
4 | switch {
5 | case a < 0:
6 | return "negative"
7 | case a == 0:
8 | return "zero"
9 | case a < 10:
10 | return "small"
11 | case a < 100:
12 | return "big"
13 | case a < 1000:
14 | return "huge"
15 | }
16 | return "enormous"
17 | }
18 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/cover/set.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/cover/set.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/docker-outyet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/docker-outyet.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/examples/reverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/examples/reverse.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/from-zero-to-go-launching-on-google_image00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/from-zero-to-go-launching-on-google_image00.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/from-zero-to-go-launching-on-google_image01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/from-zero-to-go-launching-on-google_image01.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/from-zero-to-go-launching-on-google_image02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/from-zero-to-go-launching-on-google_image02.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/from-zero-to-go-launching-on-google_image03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/from-zero-to-go-launching-on-google_image03.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image00.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image00.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image01.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image01.gif
--------------------------------------------------------------------------------
/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image02.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image03.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gif-decoder-exercise-in-go-interfaces_image03.gif
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-11-is-released_gopherbiplane5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-11-is-released_gopherbiplane5.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-at-google-io-2011-videos_gopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-at-google-io-2011-videos_gopher.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-image-package_image-package-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-image-package_image-package-01.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-image-package_image-package-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-image-package_image-package-02.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-image-package_image-package-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-image-package_image-package-03.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-image-package_image-package-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-image-package_image-package-04.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-image-package_image-package-05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-image-package_image-package-05.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_20.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_2a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_2a.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_2b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_2b.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_2c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_2c.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_2d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_2d.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_2e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_2e.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-imagedraw-package_2f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-imagedraw-package_2f.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-programming-language-turns-two_costume.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-programming-language-turns-two_costume.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-programming-language-turns-two_gophers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-programming-language-turns-two_gophers.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-programming-session-video-from.article:
--------------------------------------------------------------------------------
1 | Go Programming session video from Google I/O
2 | 6 Jun 2010
3 | Tags: video, talk
4 |
5 | Andrew Gerrand
6 |
7 | * Introduction
8 |
9 | Below is the video of the talk given by Rob Pike and Russ Cox at Google I/O 2010.
10 |
11 | .iframe http://www.youtube.com/embed/jgVhBThJdXc 304 540
12 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-slices-usage-and-internals_slice-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-slices-usage-and-internals_slice-1.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-slices-usage-and-internals_slice-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-slices-usage-and-internals_slice-2.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-slices-usage-and-internals_slice-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-slices-usage-and-internals_slice-3.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-slices-usage-and-internals_slice-array.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-slices-usage-and-internals_slice-array.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-slices-usage-and-internals_slice-struct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-slices-usage-and-internals_slice-struct.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/go-version-1-is-released_gophermega.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/go-version-1-is-released_gophermega.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/avatars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/avatars.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/glenda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/glenda.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/gopher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/gopher.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/header.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/logo.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/plush.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/plush.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/portrait.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/portrait.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/prototype.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/prototype.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/usergroups.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/usergroups.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/vinyl.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/vinyl.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gopher/wfmu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gopher/wfmu.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gophercon/image00.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gophercon/image00.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gophercon/image01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gophercon/image01.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gophercon/image02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gophercon/image02.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gophergala/fancygopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gophergala/fancygopher.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/gothamgo/gothamgo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/gothamgo/gothamgo.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/introducing-go-playground_Untitled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/introducing-go-playground_Untitled.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/io2014/booth.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/io2014/booth.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/io2014/collage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/io2014/collage.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/io2014/crowd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/io2014/crowd.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/io2014/summerfest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/io2014/summerfest.jpg
--------------------------------------------------------------------------------
/blog/zh_CN/content/osconreport/meetup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/osconreport/meetup.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/osconreport/random.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/osconreport/random.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/osconreport/talks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/osconreport/talks.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/osconreport/workshops.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/osconreport/workshops.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/playground/overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/playground/overview.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/playground/time.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | stop := time.After(3 * time.Second)
12 | tick := time.NewTicker(1 * time.Second)
13 | defer tick.Stop()
14 | for {
15 | select {
16 | case <-tick.C:
17 | fmt.Println(time.Now())
18 | case <-stop:
19 | return
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/profiling-go-programs_havlak1-hash_lookup-75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/profiling-go-programs_havlak1-hash_lookup-75.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/profiling-go-programs_havlak1a-75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/profiling-go-programs_havlak1a-75.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/profiling-go-programs_havlak4a-mallocgc-trim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/profiling-go-programs_havlak4a-mallocgc-trim.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/profiling-go-programs_havlak4a-mallocgc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/content/profiling-go-programs_havlak4a-mallocgc.png
--------------------------------------------------------------------------------
/blog/zh_CN/content/race-detector/blackhole.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | var blackHole [4096]byte // shared buffer
6 |
7 | func (devNull) ReadFrom(r io.Reader) (n int64, err error) {
8 | readSize := 0
9 | for {
10 | readSize, err = r.Read(blackHole[:])
11 | n += int64(readSize)
12 | if err != nil {
13 | if err == io.EOF {
14 | return n, nil
15 | }
16 | return
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/blog/zh_CN/content/slices/prog070.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | import (
10 | "fmt"
11 | )
12 |
13 | func main() {
14 | slice := make([]int, 10, 15)
15 | fmt.Printf("len: %d, cap: %d\n", len(slice), cap(slice))
16 | }
17 |
--------------------------------------------------------------------------------
/blog/zh_CN/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/blog/zh_CN/static/favicon.ico
--------------------------------------------------------------------------------
/blog/zh_CN/template/article.tmpl:
--------------------------------------------------------------------------------
1 | {{/* This file is combined with the root.tmpl to display a single article. */}}
2 |
3 | {{define "title"}}{{.Doc.Title}} - Go 语言博客{{end}}
4 | {{define "content"}}
5 | {{template "doc" .Doc}}
6 | {{with .Doc.Related}}
7 |
相关文章
8 |
13 | {{end}}
14 | {{end}}
15 |
16 |
--------------------------------------------------------------------------------
/blog/zh_CN/template/home.tmpl:
--------------------------------------------------------------------------------
1 | {{/* This file is combined with the root.tmpl to display the blog home page. */}}
2 |
3 | {{define "title"}}Go 语言博客{{end}}
4 | {{define "content"}}
5 | {{range .Data}}
6 | {{template "doc" .}}
7 | {{end}}
8 |
查看 文章索引.
9 | {{end}}
10 |
--------------------------------------------------------------------------------
/doc/zh_CN/articles/index.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
11 |
12 |
13 | Go文章的完整列表见文档页面。
14 |
15 |
--------------------------------------------------------------------------------
/doc/zh_CN/articles/wiki/edit.html:
--------------------------------------------------------------------------------
1 |
Editing {{.Title}}
2 |
3 |
7 |
--------------------------------------------------------------------------------
/doc/zh_CN/articles/wiki/http-sample.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "net/http"
6 | )
7 |
8 | func handler(w http.ResponseWriter, r *http.Request) {
9 | fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
10 | }
11 |
12 | func main() {
13 | http.HandleFunc("/", handler)
14 | http.ListenAndServe(":8080", nil)
15 | }
16 |
--------------------------------------------------------------------------------
/doc/zh_CN/articles/wiki/test_Test.txt.good:
--------------------------------------------------------------------------------
1 | some content
--------------------------------------------------------------------------------
/doc/zh_CN/articles/wiki/test_edit.good:
--------------------------------------------------------------------------------
1 |
Editing Test
2 |
3 |
7 |
--------------------------------------------------------------------------------
/doc/zh_CN/articles/wiki/test_view.good:
--------------------------------------------------------------------------------
1 |
Test
2 |
3 |
[edit]
4 |
5 |
some content
6 |
--------------------------------------------------------------------------------
/doc/zh_CN/articles/wiki/view.html:
--------------------------------------------------------------------------------
1 |
{{.Title}}
2 |
3 |
[edit]
4 |
5 |
{{printf "%s" .Body}}
6 |
--------------------------------------------------------------------------------
/doc/zh_CN/codewalk/popout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/codewalk/popout.png
--------------------------------------------------------------------------------
/doc/zh_CN/go-logo-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/go-logo-black.png
--------------------------------------------------------------------------------
/doc/zh_CN/go-logo-blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/go-logo-blue.png
--------------------------------------------------------------------------------
/doc/zh_CN/go-logo-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/go-logo-white.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/README:
--------------------------------------------------------------------------------
1 | The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
2 | The design is licensed under the Creative Commons 3.0 Attributions license.
3 | Read this article for more details: http://blog.golang.org/gopher
4 |
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/appenginegopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/appenginegopher.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/appenginegophercolor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/appenginegophercolor.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/appenginelogo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/appenginelogo.gif
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/biplane.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/biplane.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/bumper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/bumper.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/bumper192x108.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/bumper192x108.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/bumper320x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/bumper320x180.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/bumper480x270.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/bumper480x270.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/bumper640x360.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/bumper640x360.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/doc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/doc.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/fiveyears.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/fiveyears.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/frontpage-china.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/frontpage-china.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/frontpage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/frontpage.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/gopherbw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/gopherbw.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/gophercolor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/gophercolor.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/gophercolor16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/gophercolor16x16.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/gopherconf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/gopherconf.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/help.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pencil/gopherhat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pencil/gopherhat.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pencil/gopherhelmet.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pencil/gopherhelmet.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pencil/gophermega.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pencil/gophermega.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pencil/gopherrunning.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pencil/gopherrunning.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pencil/gopherswim.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pencil/gopherswim.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pencil/gopherswrench.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pencil/gopherswrench.jpg
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/pkg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/pkg.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/project.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/ref.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/ref.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/run.png
--------------------------------------------------------------------------------
/doc/zh_CN/gopher/talks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/gopher/talks.png
--------------------------------------------------------------------------------
/doc/zh_CN/ie.css:
--------------------------------------------------------------------------------
1 | #nav-main li { display: inline; }
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/logo-153x55.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/logo-153x55.png
--------------------------------------------------------------------------------
/doc/zh_CN/play/fib.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | // fib 返回一个函数,该函数返回连续的斐波纳契数。
6 | func fib() func() int {
7 | a, b := 0, 1
8 | return func() int {
9 | a, b = b, a+b
10 | return a
11 | }
12 | }
13 |
14 | func main() {
15 | f := fib()
16 | // 函数调用按从左到右顺序求值。
17 | fmt.Println(f(), f(), f(), f(), f())
18 | }
19 |
--------------------------------------------------------------------------------
/doc/zh_CN/play/hello.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | func main() {
6 | fmt.Println("Hello, 世界")
7 | }
8 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/defer.out:
--------------------------------------------------------------------------------
1 | 0
2 | 3210
3 | 2
4 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/defer2.out:
--------------------------------------------------------------------------------
1 | Calling g.
2 | Printing in g 0
3 | Printing in g 1
4 | Printing in g 2
5 | Printing in g 3
6 | Panicking!
7 | Defer in g 3
8 | Defer in g 2
9 | Defer in g 1
10 | Defer in g 0
11 | Recovered in f 4
12 | Returned normally from f.
13 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/eff_bytesize.out:
--------------------------------------------------------------------------------
1 | 1.00YB 9.09TB
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/eff_sequence.out:
--------------------------------------------------------------------------------
1 | [-1 2 6 16 44]
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/eff_unused1.go:
--------------------------------------------------------------------------------
1 | // skip
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "io"
8 | "log"
9 | "os"
10 | )
11 |
12 | func main() {
13 | fd, err := os.Open("test.go")
14 | if err != nil {
15 | log.Fatal(err)
16 | }
17 | // TODO: use fd.
18 | }
19 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/eff_unused2.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "io"
8 | "log"
9 | "os"
10 | )
11 |
12 | var _ = fmt.Printf // For debugging; delete when done. // 用于调试,结束时删除。
13 | var _ io.Reader // For debugging; delete when done. // 用于调试,结束时删除。
14 |
15 | func main() {
16 | fd, err := os.Open("test.go")
17 | if err != nil {
18 | log.Fatal(err)
19 | }
20 | // TODO: use fd.
21 | _ = fd
22 | }
23 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package1.go:
--------------------------------------------------------------------------------
1 | // cmpout
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | import (
10 | "fmt"
11 | "image"
12 | )
13 |
14 | func main() {
15 | p := image.Point{2, 1}
16 | fmt.Println("X is", p.X, "Y is", p.Y)
17 | }
18 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package1.out:
--------------------------------------------------------------------------------
1 | X is 2 Y is 1
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package2.out:
--------------------------------------------------------------------------------
1 | 3 4 false
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package3.out:
--------------------------------------------------------------------------------
1 | 3 4 true
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package4.out:
--------------------------------------------------------------------------------
1 | image.Point{X:2, Y:1}
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package5.out:
--------------------------------------------------------------------------------
1 | {255 0 0 255}
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/image_package6.out:
--------------------------------------------------------------------------------
1 | 8 4
2 | true
3 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/interface2.out:
--------------------------------------------------------------------------------
1 | type: float64
2 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/json2.out:
--------------------------------------------------------------------------------
1 | the circle's area 24.227111172875365
2 | the reciprocal of i is 0.3601008282319049
3 |
--------------------------------------------------------------------------------
/doc/zh_CN/progs/update.bash:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2012 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 | set -e
7 |
8 | rm -f *.out *.rej *.orig [568].out
9 |
10 | for i in *.go; do
11 | if grep -q '^// cmpout$' $i; then
12 | echo $i
13 | go run $i &> ${i/.go/.out}
14 | fi
15 | done
16 |
--------------------------------------------------------------------------------
/doc/zh_CN/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/share.png
--------------------------------------------------------------------------------
/doc/zh_CN/sieve.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/doc/zh_CN/sieve.gif
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/screenshot.png
--------------------------------------------------------------------------------
/src/runtime/cgo/doc_zh_CN.go:
--------------------------------------------------------------------------------
1 | // +build ingore
2 |
3 | // Package cgo contains runtime support for code generated
4 | // by the cgo tool. See the documentation for the cgo command
5 | // for details on using cgo.
6 |
7 | // cgo 包含有 cgo 工具生成的代码的运行时支持.
8 | // 使用 cgo 的详情见 cgo 命令的文档。
9 | package cgo
10 |
11 | import (
12 | "C"
13 | "unsafe"
14 | )
15 |
16 |
--------------------------------------------------------------------------------
/static/zh_CN/analysis/call-eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/call-eg.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/call3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/call3.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/callers1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/callers1.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/callers2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/callers2.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/chan1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/chan1.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/chan2a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/chan2a.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/chan2b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/chan2b.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/error1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/error1.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/ident-def.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/ident-def.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/ident-field.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/ident-field.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/ident-func.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/ident-func.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/ipcg-func.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/ipcg-func.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/ipcg-pkg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/ipcg-pkg.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/typeinfo-pkg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/typeinfo-pkg.png
--------------------------------------------------------------------------------
/static/zh_CN/analysis/typeinfo-src.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/analysis/typeinfo-src.png
--------------------------------------------------------------------------------
/static/zh_CN/error.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | {{html .}}
9 |
10 |
--------------------------------------------------------------------------------
/static/zh_CN/images/minus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/minus.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/plus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/plus.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/treeview-black-line.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/treeview-black-line.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/treeview-black.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/treeview-black.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/treeview-default-line.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/treeview-default-line.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/treeview-default.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/treeview-default.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/treeview-gray-line.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/treeview-gray-line.gif
--------------------------------------------------------------------------------
/static/zh_CN/images/treeview-gray.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/static/zh_CN/images/treeview-gray.gif
--------------------------------------------------------------------------------
/talks/README.md:
--------------------------------------------------------------------------------
1 | # 报告文档
2 |
3 | 原始版本: https://github.com/golang/talks
4 |
5 | 因为原始版本文件太大(有22+MB), 因此对pdf和png图像做了压缩处理.
6 |
7 | PDF处理方式:
8 |
9 | 1. 尝试在线压缩: http://smallpdf.com/cn/compress-pdf
10 | 2. 尝试软件压缩: http://www.apagoinc.com/index.php
11 | 3. 取较小的版本
12 |
13 | PNG处理方式:
14 |
15 | 1. 采用8位的带颜色表的PNG格式
16 | 2. 去掉透明色中的深度信息(只有透明/非透明之分)
17 | 3. 部分风景图像转为jpg格式 (./2014/camlistore)
18 |
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/.gitattributes:
--------------------------------------------------------------------------------
1 | # Treat all files in this repo as binary, with no git magic updating
2 | # line endings. Windows users contributing to Go will need to use a
3 | # modern version of git and editors capable of LF line endings.
4 | #
5 | # We'll prevent accidental CRLF line endings from entering the repo
6 | # via the git-review gofmt checks.
7 | #
8 | # See golang.org/issue/9281
9 |
10 | * -text
11 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2009/go_talk-20091030.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2009/go_talk-20091030.pdf
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/ExpressivenessOfGo-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/ExpressivenessOfGo-2010.pdf
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/gofrontend-gcc-summit-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/gofrontend-gcc-summit-2010.pdf
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/io/talk.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/io/talk.pdf
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/support/bumper480x270.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/support/bumper480x270.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/support/bumper640x360.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/support/bumper640x360.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/support/go-logo-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/support/go-logo-white.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2010/support/java-typing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2010/support/java-typing.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2011/Real_World_Go.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2011/Real_World_Go.pdf
--------------------------------------------------------------------------------
/talks/zh_CN/content/2011/Writing_Web_Apps_in_Go.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2011/Writing_Web_Apps_in_Go.pdf
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/10things/gopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/10things/gopher.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/README:
--------------------------------------------------------------------------------
1 | These slide files are intended to be viewed with the 'present' tool.
2 | To install 'present':
3 |
4 | go get code.google.com/p/go.talks/present
5 |
6 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/diagrams.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/chat/diagrams.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/gophers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/chat/gophers.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/chan.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | ch := make(chan int)
9 | go fibs(ch)
10 | for i := 0; i < 20; i++ {
11 | fmt.Println(<-ch)
12 | }
13 | }
14 |
15 | func fibs(ch chan int) {
16 | i, j := 0, 1
17 | for {
18 | ch <- j
19 | i, j = j, i+j
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/echo.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "io"
7 | "log"
8 | "net"
9 | )
10 |
11 | const listenAddr = "localhost:4000"
12 |
13 | func main() {
14 | l, err := net.Listen("tcp", listenAddr)
15 | if err != nil {
16 | log.Fatal(err)
17 | }
18 | for {
19 | c, err := l.Accept()
20 | if err != nil {
21 | log.Fatal(err)
22 | }
23 | go io.Copy(c, c)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/embed.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type A struct{}
8 |
9 | func (A) Hello() {
10 | fmt.Println("Hello!")
11 | }
12 |
13 | type B struct {
14 | A
15 | }
16 |
17 | // func (b B) Hello() { b.A.Hello() } // (implicitly!)
18 |
19 | func main() {
20 | var b B
21 | b.Hello()
22 | }
23 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/goroutines.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | go say("let's go!", 3)
12 | go say("ho!", 2)
13 | go say("hey!", 1)
14 | time.Sleep(4 * time.Second)
15 | }
16 |
17 | func say(text string, secs int) {
18 | time.Sleep(time.Duration(secs) * time.Second)
19 | fmt.Println(text)
20 | }
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, go")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/select.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | ticker := time.NewTicker(time.Millisecond * 250)
12 | boom := time.After(time.Second * 1)
13 | for {
14 | select {
15 | case <-ticker.C:
16 | fmt.Println("tick")
17 | case <-boom:
18 | fmt.Println("boom!")
19 | return
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/chat/support/websocket.js:
--------------------------------------------------------------------------------
1 | var sock = new WebSocket("ws://localhost:4000/");
2 | sock.onmessage = function(m) { console.log("Received:", m.data); }
3 | sock.send("Hello!\n")
4 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/concurrency/images/gophereartrumpet.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/concurrency/images/gophereartrumpet.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/concurrency/images/gophermegaphones.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/concurrency/images/gophermegaphones.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/concurrency/support/boring.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | boring("boring!")
12 | }
13 |
14 | // START OMIT
15 | func boring(msg string) {
16 | for i := 0; ; i++ {
17 | fmt.Println(msg, i)
18 | time.Sleep(time.Second)
19 | }
20 | }
21 | // STOP OMIT
22 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/concurrency/support/goboring.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math/rand"
8 | "time"
9 | )
10 |
11 | func main() {
12 | go boring("boring!") // HL
13 | }
14 | // STOP OMIT
15 |
16 | func boring(msg string) {
17 | for i := 0; ; i++ {
18 | fmt.Println(msg, i)
19 | time.Sleep(time.Duration(rand.Intn(1e3)) * time.Millisecond)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/concurrency/support/lessboring.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math/rand"
8 | "time"
9 | )
10 |
11 | func main() {
12 | boring("boring!") // HL
13 | }
14 |
15 | // START OMIT
16 | func boring(msg string) {
17 | for i := 0; ; i++ {
18 | fmt.Println(msg, i)
19 | time.Sleep(time.Duration(rand.Intn(1e3)) * time.Millisecond)
20 | }
21 | }
22 | // STOP OMIT
23 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/concurrency/support/mainboring.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math/rand"
8 | "time"
9 | )
10 |
11 | func main() {
12 | boring("boring!")
13 | }
14 | // STOP OMIT
15 |
16 | func boring(msg string) {
17 | for i := 0; ; i++ {
18 | fmt.Println(msg, i)
19 | time.Sleep(time.Duration(rand.Intn(1e3)) * time.Millisecond)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/blog.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/codewalk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/codewalk.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/gobyexample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/gobyexample.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/godoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/godoc.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/godoc1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/godoc1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/gopkgdoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/gopkgdoc.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/gowiki.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/gowiki.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/javadoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/javadoc.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/javadoc1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/javadoc1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/lseek.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/lseek.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/play.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/seek.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/seek.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go-docs/tour.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go-docs/tour.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go1/changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go1/changes.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go1/errordiff1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go1/errordiff1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go1/errordiff2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go1/errordiff2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/go1/go1lines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/go1/go1lines.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/goforc/cat.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "flag"
7 | "io"
8 | "os"
9 | )
10 |
11 | func main() {
12 | flag.Parse()
13 | for _, arg := range flag.Args() {
14 | f, err := os.Open(arg)
15 | if err != nil {
16 | panic(err)
17 | }
18 | defer f.Close()
19 | _, err = io.Copy(os.Stdout, f) // HL
20 | if err != nil {
21 | panic(err)
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/goforc/decls.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | // START OMIT
6 | import "fmt"
7 |
8 | const digits = "0123456789abcdef"
9 |
10 | type Point struct {
11 | x, y int
12 | tag string
13 | }
14 |
15 | var s [32]byte
16 |
17 | var msgs = []string{"Hello, 世界", "Ciao, Mondo"}
18 |
19 | func itoa(x, base int) string
20 |
21 | // STOP OMIT
22 |
23 | func main() {
24 | fmt.Println() // use fmt
25 | }
26 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/goforc/example0.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | // START1 OMIT
11 | func main() {
12 | f("Hello, World", 500*time.Millisecond)
13 | }
14 |
15 | // STOP1 OMIT
16 |
17 | // START2 OMIT
18 | func f(msg string, delay time.Duration) {
19 | for i := 0; ; i++ {
20 | fmt.Println(msg, i)
21 | time.Sleep(delay)
22 | }
23 | }
24 |
25 | // STOP2 OMIT
26 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/goforc/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, 世界")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/goforc/vars.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | // START1 OMIT
6 | var i int
7 | var p, q *Point
8 | var threshold float64 = 0.75
9 |
10 | // STOP1 OMIT
11 |
12 | // START2 OMIT
13 | var i = 42 // type of i is int
14 | var z = 1 + 2.3i // type of z is complex128
15 | // STOP2 OMIT
16 |
17 | func _() int {
18 | i := 42 // type of i is int
19 | return &i
20 | }
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/insidepresent/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import ( "fmt"; "time" )
6 |
7 | func main() {
8 | for {
9 | fmt.Println("Hello, Gophers!")
10 | time.Sleep(time.Second)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/insidepresent/websocket.js:
--------------------------------------------------------------------------------
1 | var sock = new WebSocket("ws://localhost:4000/");
2 | sock.onmessage = function(m) { console.log("Received:", m.data); }
3 | sock.send("Hello!\n")
4 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/insidepresent/wire.html:
--------------------------------------------------------------------------------
1 |
15 |
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/flag.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "flag"
7 | "fmt"
8 | "time"
9 | )
10 |
11 | var (
12 | message = flag.String("message", "Hello!", "what to say")
13 | delay = flag.Duration("delay", 2*time.Second, "how long to wait")
14 | )
15 |
16 | func main() {
17 | flag.Parse()
18 | fmt.Println(*message)
19 | time.Sleep(*delay)
20 | }
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/gopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/simple/gopher.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/hello-web.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "log"
8 | "net/http"
9 | )
10 |
11 | type Greeting string
12 |
13 | func (g Greeting) ServeHTTP(w http.ResponseWriter, r *http.Request) {
14 | fmt.Fprint(w, g)
15 | }
16 |
17 | func main() {
18 | err := http.ListenAndServe("localhost:4000", Greeting("Hello, go"))
19 | if err != nil {
20 | log.Fatal(err)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, go")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/io/io.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package io
4 |
5 | type Writer interface {
6 | Write(p []byte) (n int, err error)
7 | }
8 |
9 | type Reader interface {
10 | Read(p []byte) (n int, err error)
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/split.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/simple/split.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/time.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | // START OMIT
12 | if time.Now().Hour() < 12 {
13 | fmt.Println("Good morning.")
14 | } else {
15 | fmt.Println("Good afternoon (or evening).")
16 | }
17 | // END OMIT
18 | }
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/time2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | // START OMIT
12 | birthday, _ := time.Parse("Jan 2 2006", "Nov 10 2009") // time.Time
13 | age := time.Since(birthday) // time.Duration
14 | fmt.Printf("Go is %d days old\n", age/(time.Hour*24))
15 | // END OMIT
16 | }
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/time3.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | // START OMIT
12 | t := time.Now()
13 | fmt.Println(t.In(time.UTC))
14 | home, _ := time.LoadLocation("Australia/Sydney")
15 | fmt.Println(t.In(home))
16 | // END OMIT
17 | }
18 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/simple/webfront/testdata/index.html:
--------------------------------------------------------------------------------
1 | contents of index.html
2 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/splash/appenginegophercolor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/splash/appenginegophercolor.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/splash/datacenter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/splash/datacenter.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/splash/fire.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/splash/fire.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/tutorial/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Greetings, fellow gopher")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/tutorial/main.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "github.com/nf/reddit" // HL
8 | "log"
9 | )
10 |
11 | func main() {
12 | items, err := reddit.Get("golang") // HL
13 | if err != nil {
14 | log.Fatal(err)
15 | }
16 | for _, item := range items {
17 | fmt.Println(item)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gopherchart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gopherchart.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex0.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex1.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex2.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex3.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex4.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex5.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophercomplex6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophercomplex6.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophersimple1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophersimple1.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophersimple2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophersimple2.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophersimple3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophersimple3.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/waza/gophersimple4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2012/waza/gophersimple4.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/zen/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, Pythonistas!")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2012/zen/http.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "net/http"
8 | )
9 |
10 | func main() {
11 | http.HandleFunc("/", hello)
12 | http.ListenAndServe("localhost:8000", nil)
13 | }
14 |
15 | func hello(w http.ResponseWriter, r *http.Request) {
16 | fmt.Fprintln(w, "Hello, Pythonistas!")
17 | }
18 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/advconc/gopherhat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/advconc/gopherhat.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/advconc/gopherrunning.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/advconc/gopherrunning.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/advconc/gopherswim.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/advconc/gopherswim.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/advconc/gopherswrench.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/advconc/gopherswrench.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/advconc/race.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/advconc/race.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/bestpractices/cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/bestpractices/cmd.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/bestpractices/funcdraw/drawer/dependent.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package drawer
4 |
5 | // START OMIT
6 | import (
7 | "image"
8 |
9 | "golang.org/x/talks/2013/bestpractices/funcdraw/parser"
10 | )
11 |
12 | // Draw draws an image showing a rendering of the passed ParsedFunc.
13 | func DrawParsedFunc(f parser.ParsedFunc) image.Image {
14 | // END OMIT
15 | return nil
16 | }
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/bestpractices/funcdraw/drawer/drawer.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package drawer
4 |
5 | // START OMIT
6 | import "image"
7 |
8 | // Function represent a drawable mathematical function.
9 | type Function interface {
10 | Eval(float64) float64
11 | }
12 |
13 | // Draw draws an image showing a rendering of the passed Function.
14 | func Draw(f Function) image.Image {
15 | // END OMIT
16 | return nil
17 | }
18 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/distsys/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | c := make(chan string)
9 | go func() {
10 | c <- "Hello"
11 | c <- "World"
12 | }()
13 | fmt.Println(<-c, <-c)
14 | }
15 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/distsys/hello0.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Printf("hello, world\n")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/distsys/hello1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "flag"
7 |
8 | "github.com/golang/glog"
9 | )
10 |
11 | func main() {
12 | flag.Set("logtostderr", "true")
13 | glog.Infof("hello, world")
14 | }
15 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/distsys/writebuffer.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "bytes"
7 | "fmt"
8 | "io"
9 | "os"
10 | )
11 |
12 | var _ = io.Copy
13 |
14 | func main() {
15 | b := new(bytes.Buffer)
16 | var w io.Writer
17 | w = b
18 | fmt.Fprintf(w, "hello, %s\n", "world")
19 | os.Stdout.Write(b.Bytes())
20 | }
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/distsys/writebuffer2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "bytes"
7 | "fmt"
8 | "io"
9 | "os"
10 | )
11 |
12 | func main() {
13 | b := new(bytes.Buffer)
14 | fmt.Fprintf(b, "hello, %s\n", "world")
15 | io.Copy(os.Stdout, b)
16 | }
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go-sreops/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "flag"
7 | "fmt"
8 | )
9 |
10 | var message = flag.String("message", "Hello, OSCON!", "what to say")
11 |
12 | func main() {
13 | flag.Parse()
14 | fmt.Println(*message)
15 | }
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go1.1/blockprofile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go1.1/blockprofile.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go1.1/intdiv.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func f(x int) int {
6 | return x / 0
7 | }
8 |
9 | func main() {
10 | f(1)
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go1.1/methodvals-old.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "os"
6 |
7 | func main() {
8 | var w func([]byte) (int, error)
9 | w = func(b []byte) (int, error) { return os.Stdout.Write(b) }
10 | w([]byte("hello!\n"))
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go1.1/methodvals.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "os"
6 |
7 | func main() {
8 | var w func([]byte) (int, error)
9 | w = os.Stdout.Write
10 | w([]byte("hello!\n"))
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go1.1/race.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | var a int
7 | go func() {
8 | for {
9 | if a == 0 {
10 | a = 1
11 | }
12 | }
13 | }()
14 | for {
15 | if a == 1 {
16 | a = 0
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go1.1/yearday.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | fmt.Println("Today is day", time.Now().YearDay())
12 | }
13 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/dyntyp.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | import random
4 |
5 | name = 'pythonista'
6 |
7 | # This code only works half of the time.
8 | if random.random() > 0.5:
9 | print 'hey '+name+', you win!'
10 | else:
11 | print 'sorry '+nane+', you lose'
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/fib-gen.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func fib(c chan int, n int) {
8 | a, b := 0, 1
9 | for i := 0; i < n; i++ {
10 | a, b = b, a+b
11 | c <- a // HL
12 | }
13 | close(c)
14 | }
15 |
16 | func main() {
17 | c := make(chan int)
18 | go fib(c, 10) // HL
19 |
20 | for x := range c { // HL
21 | fmt.Println(x)
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/fib-gen.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | def fib(n):
4 | a, b = 0, 1
5 | for i in range(n):
6 | a, b = b, a + b
7 | yield a
8 |
9 | f = fib(10)
10 | try:
11 | while True:
12 | print f.next()
13 | except StopIteration:
14 | print 'done'
15 |
16 | for x in fib(10):
17 | print x
18 | print 'done'
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/fib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | def fib(n):
4 | a, b = 0, 1
5 | for i in range(n):
6 | a, b = b, a + b
7 | return b
8 |
9 | def fib_rec(n):
10 | if n <= 1:
11 | return 1
12 | else:
13 | return fib_rec(n-1) + fib_rec(n-2)
14 |
15 | for x in range(10):
16 | print fib(x), fib_rec(x)
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/img/duck.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go4python/img/duck.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/img/fib-go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go4python/img/fib-go.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/img/fib-py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go4python/img/fib-py.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/img/funnelin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go4python/img/funnelin.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/img/gopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go4python/img/gopher.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/go4python/img/monkey.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/go4python/img/monkey.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/aegopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/aegopher.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/appenginegophercolor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/appenginegophercolor.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/appstats1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/appstats1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/appstats2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/appstats2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/appstats3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/appstats3.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/art/gophercart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/art/gophercart.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/art/gophercheckout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/art/gophercheckout.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/art/gophermegaphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/art/gophermegaphone.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/cachingembed.html:
--------------------------------------------------------------------------------
1 |
2 | Small reads
3 |
4 | datastore.Get |
5 | O(20ms) |
6 |
7 |
8 | memcache.Get |
9 | O(1ms) |
10 |
11 |
12 | RAM |
13 | O(1µs) |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/gophermart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/gophermart.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/gophermart2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/gophermart2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/gopherrulespanner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/gopherrulespanner.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/mart/1/app.yaml:
--------------------------------------------------------------------------------
1 | application: gophermart
2 | version: 1
3 | runtime: go
4 | api_version: go1
5 |
6 | handlers:
7 | - url: /admin/.*
8 | script: _go_app
9 | login: admin
10 | - url: /.*
11 | script: _go_app
12 | login: required
13 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/mart/2/app.yaml:
--------------------------------------------------------------------------------
1 | application: gophermart
2 | version: 2
3 | runtime: go
4 | api_version: go1
5 |
6 | handlers:
7 | - url: /admin/.*
8 | script: _go_app
9 | login: admin
10 | - url: /_ah/(stats|queue).*
11 | script: _go_app
12 | login: admin
13 | - url: /.*
14 | script: _go_app
15 | login: required
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/mart/3/app.yaml:
--------------------------------------------------------------------------------
1 | application: gophermart
2 | version: 3
3 | runtime: go
4 | api_version: go1
5 |
6 | handlers:
7 | - url: /admin/.*
8 | script: _go_app
9 | login: admin
10 | - url: /.*
11 | script: _go_app
12 | login: required
13 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/mart/README:
--------------------------------------------------------------------------------
1 | This is a little demonstration app called Gopher Mart.
2 |
3 | 1/ is the simple, trivial, stupid, slow version.
4 | 2/ defers work (mail).
5 | 3/ uses batching.
6 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/santa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/santa.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/santaembed.html:
--------------------------------------------------------------------------------
1 |

2 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/santagraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/santagraph.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/highperf/turkey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/highperf/turkey.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/after-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/after-code.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/after.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/after.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/before.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/before.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/copy.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import (
6 | "io"
7 | )
8 |
9 | func main() {
10 | var dst io.Writer
11 | var src io.Reader
12 | // START OMIT
13 | n, err := io.Copy(dst, src)
14 | // END OMIT
15 | _ = n
16 | _ = err
17 | }
18 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/cpp-toggle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/cpp-toggle.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/cpp-write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/cpp-write.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/cpp-writeerr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/cpp-writeerr.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/crbug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/crbug.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/reader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/reader.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/readseeker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/readseeker.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/sectionreader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/sectionreader.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/seeker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/seeker.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/servecontent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/servecontent.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/server-fs.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import (
6 | "log"
7 | "net/http"
8 | "os"
9 | "path/filepath"
10 | )
11 |
12 | func main() {
13 | log.Printf("Running...")
14 | log.Fatal(http.ListenAndServe(
15 | "127.0.0.1:8080",
16 | http.FileServer(http.Dir(
17 | filepath.Join(os.Getenv("HOME"), "go", "doc")))))
18 | }
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/server.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import "net/http"
6 |
7 | func main() {
8 | http.ListenAndServe(":8080", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
9 | http.ServeContent(w, r, "foo.txt", time.Now(),
10 | strings.NewReader("I am some content.\n"))
11 | }))
12 | }
13 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2013/oscon-dl/slow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2013/oscon-dl/slow.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-android.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-boot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-boot.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-checkins.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-checkins.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-fuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-fuse.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-mix-types.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-mix-types.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-moscow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-moscow.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-other.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-other.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-pano.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-pano.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/camlistore/cam-paris-portrait.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/camlistore/cam-paris-portrait.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/compiling/const1.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | // 1 START OMIT
8 | const C1 = 1e-323
9 |
10 | const C2 = C1 / 100
11 | const C3 = C2 * 100
12 |
13 | const C4 float64 = C1 / 100
14 | const C5 = C4 * 100
15 |
16 | func main() {
17 | fmt.Println(C3, C5)
18 | }
19 |
20 | // 1 END OMIT
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/compiling/const2.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | // 1 START OMIT
8 | const C1 = 1e+308
9 | const C2 = C1 * 10
10 | const C3 = C2 / 10
11 |
12 | var V1 = C1
13 | var V2 = V1 * 10
14 | var V3 = V2 / 10
15 |
16 | func main() {
17 | fmt.Println(C3, V3)
18 | }
19 |
20 | // 1 END OMIT
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/compiling/const3.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "unsafe"
8 | )
9 |
10 | // 1 START OMIT
11 | var V1 = 0x01020304
12 | var V2 [unsafe.Sizeof(V1)]byte
13 |
14 | func main() {
15 | *(*int)(unsafe.Pointer(&V2)) = V1
16 | fmt.Println(V2)
17 | }
18 |
19 | // 1 END OMIT
20 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/compiling/name1.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | // 2 START OMIT
8 | // 1 START OMIT
9 | func main() {
10 | i := 1
11 | f := func() T {
12 | return T{
13 | i: 1, // HL
14 | }
15 | }
16 | fmt.Println(i, f())
17 | }
18 |
19 | // 1 END OMIT
20 |
21 | type T map[int]int
22 |
23 | // 2 END OMIT
24 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/compiling/name2.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | // 2 START OMIT
8 | // 1 START OMIT
9 | func main() {
10 | i := 1
11 | f := func() T {
12 | return T{
13 | i: 1, // HL
14 | }
15 | }
16 | fmt.Println(i, f())
17 | }
18 |
19 | // 1 END OMIT
20 |
21 | type T struct{ i int }
22 |
23 | // 2 END OMIT
24 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/compiling/var1.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "os"
8 | )
9 |
10 | // 1 START OMIT
11 | var V = struct {
12 | name string
13 | os.FileMode
14 | }{
15 | name: "hello.go",
16 | }
17 |
18 | func main() {
19 | fmt.Println(V)
20 | }
21 | // 1 END OMIT
22 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/droidcon/gopherswim.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/droidcon/gopherswim.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/droidcon/gopherswrench.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/droidcon/gopherswrench.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go1.3/json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go1.3/json.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go1.3/liblink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go1.3/liblink1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go1.3/liblink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go1.3/liblink2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/godoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/godoc.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/gopherflag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/gopherflag.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/gopherhat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/gopherhat.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/gopherswim.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/gopherswim.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/gopherswrench.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/gopherswrench.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/gophertraining.html:
--------------------------------------------------------------------------------
1 |
2 |
Don't over-specify.
3 |
Don't under-specify.
4 |
Find the sweet spot.
5 |
6 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/gophertraining.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/gophertraining.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/roshi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/roshi.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/sigourney.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/sigourney.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/tree-walk.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 |
8 | "code.google.com/p/go-tour/tree"
9 | )
10 |
11 | func Walk(t *tree.Tree) {
12 | if t.Left != nil {
13 | Walk(t.Left)
14 | }
15 | fmt.Println(t.Value)
16 | if t.Right != nil {
17 | Walk(t.Right)
18 | }
19 | }
20 |
21 | func main() {
22 | Walk(tree.New(1))
23 | }
24 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4gophers/tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4gophers/tree.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/embedsample.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Person struct{ Name string }
8 |
9 | func (p Person) Introduce() { fmt.Println("Hi, I'm", p.Name) }
10 |
11 | type Employee struct {
12 | Person
13 | EmployeeID int
14 | }
15 |
16 | func ExampleEmployee() {
17 | var e Employee
18 | e.Name = "Peter"
19 | e.EmployeeID = 1234
20 |
21 | e.Introduce()
22 | }
23 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/baby.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/baby.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/badinheritance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/badinheritance.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/busy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/busy.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/chain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/chain.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/conc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/conc.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/duck.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/duck.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/fast.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/fast.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/funcdraw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/funcdraw.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/funnelin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/funnelin.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/gopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/gopher.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/lego.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/lego.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/perfection.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/perfection.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/piet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/piet.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/go4java/img/trends.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/go4java/img/trends.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/60p.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/60p.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/changestats.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/changestats.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/concurrent.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/concurrent.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/contig-stack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/contig-stack.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/docker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/docker.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/drone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/drone.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/goandroid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/goandroid.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/gpio.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/gpio.gif
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/sigourney.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/sigourney.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/spaghetti.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/spaghetti.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/tardis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/tardis.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gocon-tokyo/trs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/gocon-tokyo/trs.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gotham-context/after.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package after
4 |
5 | // START OMIT
6 | func (*ServiceA) HandleRPC(ctx context.Context, a Arg) {
7 | f(ctx, a)
8 | }
9 |
10 | func f(ctx context.Context, a Args) { // HL
11 | x.M(ctx, a)
12 | }
13 |
14 | func (x *X) M(ctx context.Context, a Args) { // HL
15 | serviceB.IssueRPC(ctx, a)
16 | }
17 |
18 | // END OMIT
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gotham-context/before.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package before
4 |
5 | // START OMIT
6 | func (*ServiceA) HandleRPC(ctx context.Context, a Arg) {
7 | f(a)
8 | }
9 |
10 | func f(a Args) {
11 | x.M(a)
12 | }
13 |
14 | func (x *X) M(a Args) {
15 | // TODO(sameer): pass a real Context here.
16 | serviceB.IssueRPC(context.TODO(), a) // HL
17 | }
18 |
19 | // END OMIT
20 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/gotham-context/eg.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package P
4 |
5 | import (
6 | "xpkg"
7 | "ypkg"
8 |
9 | "golang.org/x/net/context"
10 | )
11 |
12 | func before(x xpkg.X, y ypkg.Y) error { // HL
13 | return x.M(y)
14 | }
15 |
16 | func after(x xpkg.X, y ypkg.Y) error { // HL
17 | return x.MContext(context.TODO(), y)
18 | }
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hammers/findthecode.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "go/build"
8 | )
9 |
10 | func main() {
11 | pkg, _ := build.Import("net/http", "", 0) // HL
12 | fmt.Println(pkg.Dir)
13 | fmt.Println(pkg.GoFiles)
14 | }
15 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hammers/format.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "go/format"
8 | )
9 |
10 | func main() {
11 | ugly := `func (f *File) Read(p []byte, )(n int, err error, ){}`
12 | fmt.Println(ugly)
13 | pretty, _ := format.Source([]byte(ugly)) // HL
14 | fmt.Println(string(pretty))
15 | }
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/emerging.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/hellogophers/emerging.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/gophers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/hellogophers/gophers.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello.b:
--------------------------------------------------------------------------------
1 | main( ) {
2 | extrn a, b, c;
3 | putchar(a); putchar(b); putchar(c); putchar('!*n');
4 | }
5 | a 'hell';
6 | b 'o, w';
7 | c 'orld';
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello.c:
--------------------------------------------------------------------------------
1 | main()
2 | {
3 | printf("hello, world");
4 | }
5 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, Gophers (some of whom know 日本語)!")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/helloAnsi.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | main(void)
4 | {
5 | printf("hello, world\n");
6 | }
7 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/helloDraftAnsi.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | main()
4 | {
5 | printf("hello, world\n");
6 | }
7 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/helloKnR.c:
--------------------------------------------------------------------------------
1 | main()
2 | {
3 | printf("hello, world\n");
4 | }
5 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello_20080606.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | func main() int {
6 | print "hello, world\n";
7 | return 0;
8 | }
9 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello_20080627.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | print "hello, world\n";
7 | }
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello_20080811.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | print("hello, world\n");
7 | }
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello_20081024.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.printf("hello, world\n");
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello_20090115.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Printf("hello, world\n");
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hello_20091211.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Printf("hello, world\n")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/hellogophers.go:
--------------------------------------------------------------------------------
1 | // +build ignore,OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Printf("Hello, gophers!\n")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/hellogophers/trends.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/hellogophers/trends.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/organizeio/godoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/organizeio/godoc.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/organizeio/gogetversion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/organizeio/gogetversion.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/organizeio/hello.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | func main() {
6 | fmt.Println("Hello, world!")
7 | }
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/organizeio/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/organizeio/home.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/deadlock.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | c := make(chan int)
7 |
8 | <-c
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/heap.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | type list struct {
6 | buf [100000]byte
7 | next *list
8 | }
9 |
10 | func main() {
11 | var l *list
12 | for {
13 | l = &list{next: l}
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, gophers!")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/andrew.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/andrew.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/arch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/arch.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/areyousure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/areyousure.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/blog.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/brad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/brad.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/bug.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/cat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/cat.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/examples.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/examples.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/gopherbw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/gopherbw.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/jan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/jan.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/mattn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/mattn.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/nacl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/nacl.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/play.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/share.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/sleepbug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/sleepbug.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/img/tour.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/playground/img/tour.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/loop.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | for {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/removeall.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "log"
7 | "os"
8 | )
9 |
10 | func main() {
11 | err := os.RemoveAll("/foo")
12 | if err != nil {
13 | log.Fatal(err)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/rm.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "log"
7 | "os/exec"
8 | )
9 |
10 | func main() {
11 | err := exec.Command("mkdir", "/tmp/foo").Run()
12 | if err != nil {
13 | log.Fatal(err)
14 | }
15 |
16 | err = exec.Command("rm", "-rf", "/tmp/foo").Run()
17 | if err != nil {
18 | log.Fatal(err)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/sleep.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | fmt.Println("Good night")
12 | time.Sleep(8 * time.Hour)
13 | fmt.Println("Good morning")
14 | }
15 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/sleepfast.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | start := time.Now()
12 | fmt.Println(start)
13 |
14 | for i := 0; i < 10; i++ {
15 | time.Sleep(time.Nanosecond)
16 | fmt.Println(time.Since(start))
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/playground/stack.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func foo(a [1000]byte) {
6 | foo(a)
7 | }
8 |
9 | func main() {
10 | foo([1000]byte{})
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/err_close_write_bad.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | func run() error {
6 | in, err := os.Open(*input)
7 | if err != nil {
8 | return err
9 | }
10 | defer in.Close()
11 |
12 | out, err := os.Create(*output)
13 | if err != nil {
14 | return err
15 | }
16 | defer out.Close() // HL
17 | // some code
18 | }
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/err_regexp_bad.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "regex" // OMIT
6 |
7 | var whitespaceRegex, _ = regexp.Compile("\\s+")
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/err_regexp_good.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "regex" // OMIT
6 |
7 | var whitespaceRegex = regexp.MustCompile(`\s+`)
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/example_test.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package binary // OMIT
4 |
5 | func ExampleWrite() {
6 | var buf bytes.Buffer
7 | var pi float64 = math.Pi
8 | err := binary.Write(&buf, binary.LittleEndian, pi)
9 | if err != nil {
10 | fmt.Println("binary.Write failed:", err)
11 | }
12 | fmt.Printf("% x", buf.Bytes())
13 | // Output: 18 2d 44 54 fb 21 09 40
14 | }
15 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/gopher-ok-no.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/readability/gopher-ok-no.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/gophers5th.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/readability/gophers5th.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/if-else-bad.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | func sample() { // OMIT
6 | if _, ok := f.dirs[dir]; !ok { // HL
7 | f.dirs[dir] = new(feedDir) // HL
8 | } else {
9 | f.addErr(fmt.Errorf("..."))
10 | return
11 | }
12 | // some code
13 | } // OMIT
14 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/if-else-good.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | func sample() { // OMIT
6 |
7 | if _, found := f.dirs[dir]; found { // HL
8 | f.addErr(fmt.Errorf("..."))
9 | return
10 | }
11 | f.dirs[dir] = new(feedDir) // HL
12 | // some code
13 | } // OMIT
14 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/if-switch-good.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | func BrowserHeightBucket(s *session.Event) string {
6 | size := sizeFromSession(s)
7 | h := size.GetHeight()
8 | switch {
9 | case h <= 0: // HL
10 | return "null"
11 | case h <= 480: // HL
12 | return "small"
13 | case h <= 640: // HL
14 | return "medium"
15 | default: // HL
16 | return "large"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/implement-interface-bad.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "scan" // OMIT
6 |
7 | // Column writer implements the scan.Writer interface.
8 | type ColumnWriter struct {
9 | scan.Writer // HL
10 | tmpDir string
11 | // some other fields
12 | }
13 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/implement-interface-good.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "scan" // OMIT
6 |
7 | // ColumnWriter is a writer to write ...
8 | type ColumnWriter struct {
9 | tmpDir string
10 | // some other fields
11 | }
12 |
13 | var _ scan.Writer = (*ColumnWriter)(nil) // HL
14 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/in-band-error-client.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package client // OMIT
4 |
5 | func proc(it Iterator) (ret time.Duration) {
6 | d := it.DurationAt()
7 | if d == duration.Unterminated { // HL
8 | ret = -1
9 | } else {
10 | ret = d
11 | }
12 | // some code
13 | }
14 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/long-line-fold.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sampling
4 |
5 | import (
6 | servicepb "foo/bar/service_proto"
7 | )
8 |
9 | type SamplingServer struct {
10 | // some fields
11 | }
12 |
13 | func (server *SamplingServer) SampleMetrics( // HL
14 | sampleRequest *servicepb.Request, sampleResponse *servicepb.Response, // HL
15 | latency time.Duration) { // HL
16 | // some code
17 | }
18 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/long-line-nofold.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sampling
4 |
5 | import (
6 | servicepb "foo/bar/service_proto"
7 | )
8 |
9 | type SamplingServer struct {
10 | // some fields
11 | }
12 |
13 | func (server *SamplingServer) SampleMetrics(sampleRequest *servicepb.Request, sampleResponse *servicepb.Response, latency time.Duration) { // HL
14 | // some code
15 | }
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/long-line-short.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sampling
4 |
5 | import (
6 | spb "foo/bar/service_proto"
7 | )
8 |
9 | type Server struct {
10 | // some fields
11 | }
12 |
13 | func (s *Server) SampleMetrics(req *spb.Request, resp *spb.Response, latency time.Duration) { // HL
14 | // some code
15 | }
16 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/nil_error.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main // OMIT
4 |
5 | import "log"
6 |
7 | type FooError struct{}
8 |
9 | func (e *FooError) Error() string { return "foo error" }
10 |
11 | func foo() error {
12 | var ferr *FooError // ferr == nil // HL
13 | return ferr
14 | }
15 | func main() {
16 | err := foo()
17 | if err != nil { // HL
18 | log.Fatal(err)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/pkg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/readability/pkg.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/readability/project.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/ref.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/readability/ref.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/struct-field-bad.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | type Modifier struct {
6 | pmod *profile.Modifier
7 | cache map[string]time.Time
8 | client *client.Client
9 | mu sync.RWMutex // HL
10 | }
11 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/struct-field-good.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | type Modifier struct {
6 | client *client.Client
7 |
8 | mu sync.RWMutex // HL
9 | pmod *profile.Modifier
10 | cache map[string]time.Time
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/talks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/readability/talks.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/test-pattern_en.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | func TestSample(t *testing.T) { // OMIT
6 | // Typical test code
7 | if got, want := testTargetFunc(input), expectedValue; !checkTestResult(got, want) {
8 | t.Errorf("testTargetFunc(%v) = %v; want %v", input, got, want)
9 | }
10 | } // OMIT
11 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/time_duration_bad.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | var rpcTimeoutSecs = 30 // Thirty seconds // HL
6 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/time_duration_bad1.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "time" // OMIT
6 |
7 | var rpcTimeout = time.Duration(30 * time.Second) // Thirty seconds // HL
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/time_duration_bad2.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "time" // OMIT
6 |
7 | var rpcTimeout = time.Duration(30) * time.Second // Thirty seconds // HL
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/readability/time_duration_good.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package sample // OMIT
4 |
5 | import "time" // OMIT
6 |
7 | var rpcTimeout = 30 * time.Second // HL
8 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/bus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/bus.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/dotgo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/dotgo.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/gophercon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/gophercon.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/gophers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/gophers.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/indent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/indent.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/india.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/india.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-exceptions1b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-exceptions1b.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-exceptions2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-exceptions2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-generics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-generics.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-lacks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-lacks.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-logo1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-logo2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-logo3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-logo3.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-nogenerics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-nogenerics.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-semi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-semi.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-type.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/msg-wrong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/msg-wrong.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/oloh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/oloh.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/redmonk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/redmonk.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/sadgopher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/sadgopher.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-go/tattoo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-go/tattoo.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/build.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/build.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/bus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/bus.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/contig-stack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/contig-stack.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/dotgo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/dotgo.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/gopher.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/gopher.jpg
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/gophercon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/gophercon.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/india.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/india.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/oloh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/oloh.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/opensource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/opensource.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/trace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/trace.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/website1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/website1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/state-of-the-gopher/website2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/state-of-the-gopher/website2.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/static-analysis/egtest/test.go:
--------------------------------------------------------------------------------
1 | package egtest
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "strings"
7 | )
8 |
9 | func f() {
10 | fmt.Printf("%s\n", strings.ToLower("HELLO"))
11 | }
12 |
13 | func g() {
14 | var fmt log.Logger
15 | fmt.Printf("%s\n", strings.ToLower("HELLO"))
16 | }
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/static-analysis/fib.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func fib(x int) int {
8 | if x < 2 {
9 | return x
10 | }
11 | return fib(x-1) + fib(x-2)
12 | }
13 |
14 | func main() {
15 | fmt.Println(fib(7))
16 | }
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/static-analysis/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, 世界")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/static-analysis/template.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package P
4 |
5 | import "fmt"
6 |
7 | func before(s string) { fmt.Printf("%s\n", s) }
8 | func after(s string) { fmt.Println(s) }
9 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/taste/examples.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package examples
4 |
5 | // IndexOfAny START OMIT
6 | func IndexOfAny(str string, chars []rune) int {
7 | if len(str) == 0 || len(chars) == 0 {
8 | return -1
9 | }
10 | for i, ch := range str {
11 | for _, match := range chars {
12 | if ch == match {
13 | return i
14 | }
15 | }
16 | }
17 | return -1
18 | }
19 |
20 | // IndexOfAny END OMIT
21 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/taste/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, 世界!")
9 | }
10 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/taste/idents.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main // idents.go
4 |
5 | import (
6 | "fmt"
7 | "os"
8 | "text/scanner"
9 | )
10 |
11 | func main() {
12 | var s scanner.Scanner
13 | s.Init(os.Stdin)
14 | for {
15 | switch s.Scan() {
16 | case scanner.EOF:
17 | return // all done
18 | case scanner.Ident:
19 | fmt.Println(s.TokenText())
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/testing/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/testing/cover.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/testing/go1.1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/content/2014/testing/go1.1.png
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/testing/subprocess/subprocess.go:
--------------------------------------------------------------------------------
1 | package subprocess
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | )
7 |
8 | func Crasher() {
9 | fmt.Println("Going down in flames!")
10 | os.Exit(1)
11 | }
12 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/2014/testing/test1/string_test.go:
--------------------------------------------------------------------------------
1 | package strings_test
2 |
3 | import (
4 | "strings"
5 | "testing"
6 | )
7 |
8 | func TestIndex(t *testing.T) {
9 | const s, sep, want = "chicken", "ken", 4
10 | got := strings.Index(s, sep)
11 | if got != want {
12 | t.Errorf("Index(%q,%q) = %v; want %v", s, sep, got, want)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/talks/zh_CN/content/app.yaml:
--------------------------------------------------------------------------------
1 | application: golang-org
2 | version: talks-test
3 | runtime: go
4 | api_version: go1
5 |
6 | handlers:
7 | - url: /favicon.ico
8 | static_files: present/static/favicon.ico
9 | upload: present/static/favicon.ico
10 | - url: /static
11 | static_dir: present/static
12 | application_readable: true
13 | - url: /.*
14 | script: _go_app
15 |
16 | nobuild_files: ^201[0-9]/
17 |
--------------------------------------------------------------------------------
/talks/zh_CN/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/talks/zh_CN/static/favicon.ico
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/basic-types.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math/cmplx"
8 | )
9 |
10 | var (
11 | ToBe bool = false
12 | MaxInt uint64 = 1<<64 - 1
13 | z complex128 = cmplx.Sqrt(-5 + 12i)
14 | )
15 |
16 | func main() {
17 | const f = "%T(%v)\n"
18 | fmt.Printf(f, ToBe, ToBe)
19 | fmt.Printf(f, MaxInt, MaxInt)
20 | fmt.Printf(f, z, z)
21 | }
22 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/constants.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const Pi = 3.14
8 |
9 | func main() {
10 | const World = "世界"
11 | fmt.Println("Hello", World)
12 | fmt.Println("Happy", Pi, "Day")
13 |
14 | const Truth = true
15 | fmt.Println("Go rules?", Truth)
16 | }
17 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/exported-names.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func main() {
11 | fmt.Println(math.pi)
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/functions-continued.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func add(x, y int) int {
8 | return x + y
9 | }
10 |
11 | func main() {
12 | fmt.Println(add(42, 13))
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/functions.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func add(x int, y int) int {
8 | return x + y
9 | }
10 |
11 | func main() {
12 | fmt.Println(add(42, 13))
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/imports.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func main() {
11 | fmt.Printf("Now you have %g problems.", math.Nextafter(2, 3))
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/multiple-results.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func swap(x, y string) (string, string) {
8 | return y, x
9 | }
10 |
11 | func main() {
12 | a, b := swap("hello", "world")
13 | fmt.Println(a, b)
14 | }
15 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/named-results.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func split(sum int) (x, y int) {
8 | x = sum * 4 / 9
9 | y = sum - x
10 | return
11 | }
12 |
13 | func main() {
14 | fmt.Println(split(17))
15 | }
16 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/numeric-constants.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | const (
8 | Big = 1 << 100
9 | Small = Big >> 99
10 | )
11 |
12 | func needInt(x int) int { return x*10 + 1 }
13 | func needFloat(x float64) float64 {
14 | return x * 0.1
15 | }
16 |
17 | func main() {
18 | fmt.Println(needInt(Small))
19 | fmt.Println(needFloat(Small))
20 | fmt.Println(needFloat(Big))
21 | }
22 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/packages.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math/rand"
8 | )
9 |
10 | func main() {
11 | fmt.Println("My favorite number is", rand.Intn(10))
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/short-variable-declarations.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | var i, j int = 1, 2
9 | k := 3
10 | c, python, java := true, false, "no!"
11 |
12 | fmt.Println(i, j, k, c, python, java)
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/type-conversions.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func main() {
11 | var x, y int = 3, 4
12 | var f float64 = math.Sqrt(float64(x*x + y*y))
13 | var z int = int(f)
14 | fmt.Println(x, y, z)
15 | }
16 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/type-inference.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | func main() {
6 | v := 42 // change me!
7 | fmt.Printf("v is of type %T\n", v)
8 | }
9 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/variables-with-initializers.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | var i, j int = 1, 2
8 |
9 | func main() {
10 | var c, python, java = true, false, "no!"
11 | fmt.Println(i, j, c, python, java)
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/variables.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | var c, python, java bool
8 |
9 | func main() {
10 | var i int
11 | fmt.Println(i, c, python, java)
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/basics/zero.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | func main() {
6 | var i int
7 | var f float64
8 | var b bool
9 | var s string
10 | fmt.Printf("%v %v %v %q\n", i, f, b, s)
11 | }
12 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/concurrency/buffered-channels.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | c := make(chan int, 2)
9 | c <- 1
10 | c <- 2
11 | fmt.Println(<-c)
12 | fmt.Println(<-c)
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/concurrency/goroutines.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func say(s string) {
11 | for i := 0; i < 5; i++ {
12 | time.Sleep(100 * time.Millisecond)
13 | fmt.Println(s)
14 | }
15 | }
16 |
17 | func main() {
18 | go say("world")
19 | say("hello")
20 | }
21 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/concurrency/range-and-close.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | func fibonacci(n int, c chan int) {
10 | x, y := 0, 1
11 | for i := 0; i < n; i++ {
12 | c <- x
13 | x, y = y, x+y
14 | }
15 | close(c)
16 | }
17 |
18 | func main() {
19 | c := make(chan int, 10)
20 | go fibonacci(cap(c), c)
21 | for i := range c {
22 | fmt.Println(i)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/defer-multi.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | func main() {
6 | fmt.Println("counting")
7 |
8 | for i := 0; i < 10; i++ {
9 | defer fmt.Println(i)
10 | }
11 |
12 | fmt.Println("done")
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/defer.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | func main() {
6 | defer fmt.Println("world")
7 |
8 | fmt.Println("hello")
9 | }
10 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/exercise-loops-and-functions.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | func Sqrt(x float64) float64 {
10 | }
11 |
12 | func main() {
13 | fmt.Println(Sqrt(2))
14 | }
15 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/for-continued.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | sum := 1
9 | for ; sum < 1000; {
10 | sum += sum
11 | }
12 | fmt.Println(sum)
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/for-is-gos-while.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | sum := 1
9 | for sum < 1000 {
10 | sum += sum
11 | }
12 | fmt.Println(sum)
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/for.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | sum := 0
9 | for i := 0; i < 10; i++ {
10 | sum += i
11 | }
12 | fmt.Println(sum)
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/forever.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | func main() {
6 | for {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/if-with-a-short-statement.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func pow(x, n, lim float64) float64 {
11 | if v := math.Pow(x, n); v < lim {
12 | return v
13 | }
14 | return lim
15 | }
16 |
17 | func main() {
18 | fmt.Println(
19 | pow(3, 2, 10),
20 | pow(3, 3, 20),
21 | )
22 | }
23 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/if.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func sqrt(x float64) string {
11 | if x < 0 {
12 | return sqrt(-x) + "i"
13 | }
14 | return fmt.Sprint(math.Sqrt(x))
15 | }
16 |
17 | func main() {
18 | fmt.Println(sqrt(2), sqrt(-4))
19 | }
20 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/switch-with-no-condition.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | t := time.Now()
12 | switch {
13 | case t.Hour() < 12:
14 | fmt.Println("Good morning!")
15 | case t.Hour() < 17:
16 | fmt.Println("Good afternoon.")
17 | default:
18 | fmt.Println("Good evening.")
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/flowcontrol/switch.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "runtime"
8 | )
9 |
10 | func main() {
11 | fmt.Print("Go runs on ")
12 | switch os := runtime.GOOS; os {
13 | case "darwin":
14 | fmt.Println("OS X.")
15 | case "linux":
16 | fmt.Println("Linux.")
17 | default:
18 | // freebsd, openbsd,
19 | // plan9, windows...
20 | fmt.Printf("%s.", os)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/img/newton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/tour/zh_CN/content/img/newton.png
--------------------------------------------------------------------------------
/tour/zh_CN/content/img/newton3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/tour/zh_CN/content/img/newton3.png
--------------------------------------------------------------------------------
/tour/zh_CN/content/img/tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/tour/zh_CN/content/img/tree.png
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/exercise-errors.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | func Sqrt(x float64) (float64, error) {
10 | return 0, nil
11 | }
12 |
13 | func main() {
14 | fmt.Println(Sqrt(2))
15 | fmt.Println(Sqrt(-2))
16 | }
17 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/exercise-http-handlers.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "log"
7 | "net/http"
8 | )
9 |
10 | func main() {
11 | // your http.Handle calls here
12 | log.Fatal(http.ListenAndServe("localhost:4000", nil))
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/exercise-images.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "golang.org/x/tour/pic"
6 |
7 | type Image struct{}
8 |
9 | func main() {
10 | m := Image{}
11 | pic.ShowImage(m)
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/exercise-reader.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "golang.org/x/tour/reader"
4 |
5 | type MyReader struct{}
6 |
7 | // TODO: Add a Read([]byte) (int, error) method to MyReader.
8 |
9 | func main() {
10 | reader.Validate(MyReader{})
11 | }
12 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/exercise-rot-reader.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "io"
7 | "os"
8 | "strings"
9 | )
10 |
11 | type rot13Reader struct {
12 | r io.Reader
13 | }
14 |
15 | func main() {
16 | s := strings.NewReader("Lbh penpxrq gur pbqr!")
17 | r := rot13Reader{s}
18 | io.Copy(os.Stdout, &r)
19 | }
20 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/exercise-stringer.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | type IPAddr [4]byte
6 |
7 | // TODO: Add a "String() string" method to IPAddr.
8 |
9 | func main() {
10 | addrs := map[string]IPAddr{
11 | "loopback": {127, 0, 0, 1},
12 | "googleDNS": {8, 8, 8, 8},
13 | }
14 | for n, a := range addrs {
15 | fmt.Printf("%v: %v\n", n, a)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/images.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "image"
8 | )
9 |
10 | func main() {
11 | m := image.NewRGBA(image.Rect(0, 0, 100, 100))
12 | fmt.Println(m.Bounds())
13 | fmt.Println(m.At(0, 0).RGBA())
14 | }
15 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/methods-continued.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | type MyFloat float64
11 |
12 | func (f MyFloat) Abs() float64 {
13 | if f < 0 {
14 | return float64(-f)
15 | }
16 | return float64(f)
17 | }
18 |
19 | func main() {
20 | f := MyFloat(-math.Sqrt2)
21 | fmt.Println(f.Abs())
22 | }
23 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/methods.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | type Vertex struct {
11 | X, Y float64
12 | }
13 |
14 | func (v *Vertex) Abs() float64 {
15 | return math.Sqrt(v.X*v.X + v.Y*v.Y)
16 | }
17 |
18 | func main() {
19 | v := &Vertex{3, 4}
20 | fmt.Println(v.Abs())
21 | }
22 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/reader.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "io"
6 | "strings"
7 | )
8 |
9 | func main() {
10 | r := strings.NewReader("Hello, Reader!")
11 |
12 | b := make([]byte, 8)
13 | for {
14 | n, err := r.Read(b)
15 | fmt.Printf("n = %v err = %v b = %v\n", n, err, b)
16 | fmt.Printf("b[:n] = %q\n", b[:n])
17 | if err == io.EOF {
18 | break
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/methods/stringer.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "fmt"
4 |
5 | type Person struct {
6 | Name string
7 | Age int
8 | }
9 |
10 | func (p Person) String() string {
11 | return fmt.Sprintf("%v (%v years)", p.Name, p.Age)
12 | }
13 |
14 | func main() {
15 | a := Person{"Arthur Dent", 42}
16 | z := Person{"Zaphod Beeblebrox", 9001}
17 | fmt.Println(a, z)
18 | }
19 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/array.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | var a [2]string
9 | a[0] = "Hello"
10 | a[1] = "World"
11 | fmt.Println(a[0], a[1])
12 | fmt.Println(a)
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/exercise-fibonacci-closure.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | // fibonacci is a function that returns
8 | // a function that returns an int.
9 | func fibonacci() func() int {
10 | }
11 |
12 | func main() {
13 | f := fibonacci()
14 | for i := 0; i < 10; i++ {
15 | fmt.Println(f())
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/exercise-maps.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "golang.org/x/tour/wc"
7 | )
8 |
9 | func WordCount(s string) map[string]int {
10 | return map[string]int{"x": 1}
11 | }
12 |
13 | func main() {
14 | wc.Test(WordCount)
15 | }
16 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/exercise-slices.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "golang.org/x/tour/pic"
6 |
7 | func Pic(dx, dy int) [][]uint8 {
8 | }
9 |
10 | func main() {
11 | pic.Show(Pic)
12 | }
13 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/function-closures.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func adder() func(int) int {
8 | sum := 0
9 | return func(x int) int {
10 | sum += x
11 | return sum
12 | }
13 | }
14 |
15 | func main() {
16 | pos, neg := adder(), adder()
17 | for i := 0; i < 10; i++ {
18 | fmt.Println(
19 | pos(i),
20 | neg(-2*i),
21 | )
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/function-values.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "math"
8 | )
9 |
10 | func main() {
11 | hypot := func(x, y float64) float64 {
12 | return math.Sqrt(x*x + y*y)
13 | }
14 |
15 | fmt.Println(hypot(3, 4))
16 | }
17 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/map-literals-continued.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | Lat, Long float64
9 | }
10 |
11 | var m = map[string]Vertex{
12 | "Bell Labs": {40.68433, -74.39967},
13 | "Google": {37.42202, -122.08408},
14 | }
15 |
16 | func main() {
17 | fmt.Println(m)
18 | }
19 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/map-literals.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | Lat, Long float64
9 | }
10 |
11 | var m = map[string]Vertex{
12 | "Bell Labs": Vertex{
13 | 40.68433, -74.39967,
14 | },
15 | "Google": Vertex{
16 | 37.42202, -122.08408,
17 | },
18 | }
19 |
20 | func main() {
21 | fmt.Println(m)
22 | }
23 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/maps.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | Lat, Long float64
9 | }
10 |
11 | var m map[string]Vertex
12 |
13 | func main() {
14 | m = make(map[string]Vertex)
15 | m["Bell Labs"] = Vertex{
16 | 40.68433, -74.39967,
17 | }
18 | fmt.Println(m["Bell Labs"])
19 | }
20 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/nil-slices.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | var z []int
9 | fmt.Println(z, len(z), cap(z))
10 | if z == nil {
11 | fmt.Println("nil!")
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/range-continued.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | pow := make([]int, 10)
9 | for i := range pow {
10 | pow[i] = 1 << uint(i)
11 | }
12 | for _, value := range pow {
13 | fmt.Printf("%d\n", value)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/range.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | var pow = []int{1, 2, 4, 8, 16, 32, 64, 128}
8 |
9 | func main() {
10 | for i, v := range pow {
11 | fmt.Printf("2**%d = %d\n", i, v)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/slices.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | p := []int{2, 3, 5, 7, 11, 13}
9 | fmt.Println("p ==", p)
10 |
11 | for i := 0; i < len(p); i++ {
12 | fmt.Printf("p[%d] == %d\n", i, p[i])
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/slicing-slices.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | p := []int{2, 3, 5, 7, 11, 13}
9 | fmt.Println("p ==", p)
10 | fmt.Println("p[1:4] ==", p[1:4])
11 |
12 | // missing low index implies 0
13 | fmt.Println("p[:3] ==", p[:3])
14 |
15 | // missing high index implies len(s)
16 | fmt.Println("p[4:] ==", p[4:])
17 | }
18 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/struct-fields.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | X int
9 | Y int
10 | }
11 |
12 | func main() {
13 | v := Vertex{1, 2}
14 | v.X = 4
15 | fmt.Println(v.X)
16 | }
17 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/struct-literals.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | X, Y int
9 | }
10 |
11 | var (
12 | v1 = Vertex{1, 2} // has type Vertex
13 | v2 = Vertex{X: 1} // Y:0 is implicit
14 | v3 = Vertex{} // X:0 and Y:0
15 | p = &Vertex{1, 2} // has type *Vertex
16 | )
17 |
18 | func main() {
19 | fmt.Println(v1, p, v2, v3)
20 | }
21 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/struct-pointers.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | X int
9 | Y int
10 | }
11 |
12 | func main() {
13 | v := Vertex{1, 2}
14 | p := &v
15 | p.X = 1e9
16 | fmt.Println(v)
17 | }
18 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/moretypes/structs.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | type Vertex struct {
8 | X int
9 | Y int
10 | }
11 |
12 | func main() {
13 | fmt.Println(Vertex{1, 2})
14 | }
15 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/welcome/hello.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import "fmt"
6 |
7 | func main() {
8 | fmt.Println("Hello, 世界")
9 | }
10 |
--------------------------------------------------------------------------------
/tour/zh_CN/content/welcome/sandbox.go:
--------------------------------------------------------------------------------
1 | // +build OMIT
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | func main() {
11 | fmt.Println("Welcome to the playground!")
12 |
13 | fmt.Println("The time is", time.Now())
14 | }
15 |
--------------------------------------------------------------------------------
/tour/zh_CN/static/img/burger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/tour/zh_CN/static/img/burger.png
--------------------------------------------------------------------------------
/tour/zh_CN/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/tour/zh_CN/static/img/favicon.ico
--------------------------------------------------------------------------------
/tour/zh_CN/static/img/gopher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/golang-china/golangdoc.translations/fe925a2c9524373a7fd56e959de6fd7d202c2ea6/tour/zh_CN/static/img/gopher.png
--------------------------------------------------------------------------------
/tour/zh_CN/static/partials/lesson.html:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/tour/zh_CN/static/partials/toc-button.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------