[dev.cmdgo] all: merge master (912f075) into dev.cmdgo

Merge List:

+ 2021-07-02 912f075047 net/http: mention socks5 support in proxy
+ 2021-07-02 287c5e8066 cmd/compile: fix stack growing algorithm
+ 2021-07-02 743f03eeb0 spec, unsafe: clarify unsafe.Slice docs
+ 2021-07-02 6125d0c426 cmd/dist: correct comment: SysProcAttri -> SysProcAttr
+ 2021-07-01 03761ede02 net: don't reject null mx records
+ 2021-07-01 877688c838 testing: add TB.Setenv
+ 2021-07-01 ef8ae82b37 cmd/compile: fix bug in dwarf-gen var location generation
+ 2021-07-01 770899f7e1 cmd/go: add a regression test for 'go mod vendor' path traversal
+ 2021-07-01 835d86a17e cmd/go: use path.Dir instead of filepath.Dir for package paths in 'go mod vendor'
+ 2021-07-01 eb437ba92c cmd/compile: make stack value size threshold comparisons consistent
+ 2021-07-01 9d65578b83 cmd/compile: fix typos in document
+ 2021-06-30 4711bf30e5 doc/go1.17: linkify "language changes" in the runtime section
+ 2021-06-30 ed56ea73e8 path/filepath: deflake TestEvalSymlinksAboveRoot on darwin
+ 2021-06-30 c080d0323b cmd/dist: pass -Wno-unknown-warning-option in swig_callback_lto
+ 2021-06-30 7d0e9e6e74 image/gif: fix typo in the comment (io.ReadByte -> io.ByteReader)
+ 2021-06-30 0fa3265fe1 os: change example to avoid deprecated function
+ 2021-06-30 d19a53338f image: add Uniform.RGBA64At and Rectangle.RGBA64At
+ 2021-06-30 c45e800e0c crypto/x509: don't fail on optional auth key id fields
+ 2021-06-29 f9d50953b9 net: fix failure of TestCVE202133195
+ 2021-06-29 e294b8a49e doc/go1.17: fix typo "MacOS" -> "macOS"
+ 2021-06-29 3463852b76 math/big: fix typo of comment (`BytesScanner` to `ByteScanner`)
+ 2021-06-29 fd4b587da3 cmd/compile: suppress details error for invalid variadic argument type
+ 2021-06-29 e2e05af6e1 cmd/internal/obj/arm64: fix an encoding error of CMPW instruction
+ 2021-06-28 4bb0847b08 cmd/compile,runtime: change unsafe.Slice((*T)(nil), 0) to return []T(nil)
+ 2021-06-28 1519271a93 spec: change unsafe.Slice((*T)(nil), 0) to return []T(nil)
+ 2021-06-28 5385e2386b runtime/internal/atomic: drop Cas64 pointer indirection in comments
+ 2021-06-28 956c81bfe6 cmd/go: add GOEXPERIMENT to `go env` output
+ 2021-06-28 a1d27269d6 cmd/go: prep for 'go env' refactoring
+ 2021-06-28 901510ed4e cmd/link/internal/ld: skip the windows ASLR test when CGO_ENABLED=0
+ 2021-06-28 361159c055 cmd/cgo: fix 'see gmp.go' to 'see doc.go'
+ 2021-06-27 c95464f0ea internal/buildcfg: refactor GOEXPERIMENT parsing code somewhat
+ 2021-06-25 ed01ceaf48 runtime/race: use race build tag on syso_test.go
+ 2021-06-25 d1916e5e84 go/types: in TestCheck/issues.src, import regexp/syntax instead of cmd/compile/internal/syntax
+ 2021-06-25 5160896c69 go/types: in TestStdlib, import from source instead of export data
+ 2021-06-25 d01bc571f7 runtime: make ncgocall a global counter
+ 2021-06-25 37f9a8f69d go/types: fix a bug in package qualification logic
+ 2021-06-24 c309c89db5 reflect: document that InterfaceData is a low-entropy RNG
+ 2021-06-24 cce621431a cmd/compile: fix wrong type in SSA generation for OSLICE2ARRPTR
+ 2021-06-24 600a2a4ffb cmd/go: don't try to add replaced versions that won't be selected
+ 2021-06-24 a9bb38222a net: remove hard-coded timeout in dialClosedPort test helper
+ 2021-06-24 86d72fa2cb time: handle invalid UTF-8 byte sequences in quote to prevent panic
+ 2021-06-24 44a12e5f33 cmd/go: search breadth-first instead of depth-first for test dependency cycles
+ 2021-06-24 73496e0df0 net: use absDomainName in the Windows lookupPTR test helper
+ 2021-06-24 222ed1b38a os: enable TestFifoEOF on openbsd
+ 2021-06-22 0ebd5a8de0 cmd/go: update ToolTags based on GOARCH value
+ 2021-06-22 5bd09e5efc spec: unsafe.Add/Slice are not permitted in statement context
+ 2021-06-22 666315b4d3 runtime/internal/atomic: remove incorrect pointer indirection in comment
+ 2021-06-22 63daa774b5 go/types: guard against checking instantiation when generics is disabled
+ 2021-06-22 197a5ee2ab cmd/gofmt: remove stale documentation for the -G flag
+ 2021-06-22 9afd158eb2 go/parser: parse an ast.IndexExpr for a[]
+ 2021-06-21 1bd5a20e3c cmd/go: add a -go flag to 'go mod graph'
+ 2021-06-21 761edf71f6 cmd/internal/moddeps: use a temporary directory for GOMODCACHE if needed
+ 2021-06-21 a0400420ad cmd/internal/moddeps: use -mod=readonly instead of -mod=mod
+ 2021-06-21 3f9ec83b10 cmd/go: document GOPPC64 environment variable
+ 2021-06-21 20bdfba325 go/scanner: fall back to next() when encountering 0 bytes in parseIdentifier
+ 2021-06-21 44f9a3566c database/sql: fix deadlock test in prepare statement
+ 2021-06-21 16e82be454 runtime: fix crash during VDSO calls on PowerPC
+ 2021-06-21 2e542c3c06 runtime/pprof: deflake TestMorestack more
+ 2021-06-21 ced0fdbad0 doc/go1.17: note deprecation of 'go get' for installing commands
+ 2021-06-21 7a5e7047a4 doc/go1.17: add Go 1.18 pre-announcements
+ 2021-06-21 85a2e24afd doc/go1.17: add security-related release notes
+ 2021-06-21 1de332996c doc/go1.17: document go/parser.SkipObjectResolution
+ 2021-06-21 117ebe0f52 cmd/go: do not require the module cache to exist for 'go mod edit'
+ 2021-06-20 460900a7b5 os/signal: test with a significantly longer fatal timeout
+ 2021-06-19 b73cc4b02b database/sql: do not rely on timeout for deadlock test
+ 2021-06-18 86743e7d86 image: add RGBA64Image interface
+ 2021-06-18 9401172166 runtime: clarify Frames.Next documentation
+ 2021-06-18 57aaa19aae runtime: disable CPU profiling before removing the SIGPROF handler
+ 2021-06-18 6f22d2c682 doc/go1.17: fix typo
+ 2021-06-17 45f251ad6c cmd/pprof,runtime/pprof: disable test on more broken platforms
+ 2021-06-17 ed834853ad cmd/go: replace a TODO with an explanatory comment
+ 2021-06-17 4dede02550 cmd/pprof: make ObjAddr a no-op
+ 2021-06-17 97cee43c93 testing: drop unusual characters from TempDir directory name
+ 2021-06-17 b0355a3e72 time: fix receiver for Time.IsDST method
+ 2021-06-17 881b6ea7ba doc/go1.17: fix redundant space
+ 2021-06-16 0e67ce3d28 cmd/go: in lazy modules, add transitive imports for 'go get' arguments
+ 2021-06-16 6ea2af0890 cmd/go: add a regression test for #45979
+ 2021-06-16 a294e4e798 math/rand: mention half-open intervals explicitly
+ 2021-06-16 a6a853f94c cmd/asm: restore supporting of *1 scaling on ARM64
+ 2021-06-16 785a8f677f cmd/compile: better error message for invalid untyped operation
+ 2021-06-16 a752bc0746 syscall: fix TestGroupCleanupUserNamespace test failure on Fedora
+ 2021-06-15 d77f4c0c5c net/http: improve some server docs
+ 2021-06-15 219fe9d547 cmd/go: ignore UTF8 BOM when reading source code
+ 2021-06-15 723f199edd cmd/link: set correct flags in .dynamic for PIE buildmode
+ 2021-06-15 4d2d89ff42 cmd/go, go/build: update docs to use //go:build syntax
+ 2021-06-15 033d885315 doc/go1.17: document go run pkg@version
+ 2021-06-15 ea8612ef42 syscall: disable c-shared test when no cgo, for windows/arm
+ 2021-06-15 abc56fd1a0 internal/bytealg: remove duplicate go:build line
+ 2021-06-15 4061d3463b syscall: rewrite handle inheritance test to use C rather than Powershell
+ 2021-06-15 cf4e3e3d3b reflect: explain why convertible or comparable types may still panic
+ 2021-06-14 7841cb14d9 doc/go1.17: assorted fixes
+ 2021-06-14 8a5a6f46dc debug/elf: don't apply DWARF relocations for ET_EXEC binaries
+ 2021-06-14 9d13f8d43e runtime: update the variable name in comment
+ 2021-06-14 0fd20ed5b6 reflect: use same conversion panic in reflect and runtime
+ 2021-06-14 6bbb0a9d4a cmd/internal/sys: mark windows/arm64 as c-shared-capable
+ 2021-06-14 d4f34f8c63 doc/go1.17: reword "results" in stack trace printing
+ 2021-06-14 fdab5be159 doc/go1.17: further revise OpenBSD release notes
+ 2021-06-14 326ea438bb cmd/compile: rewrite a, b = f() to use temporaries when type not identical
+ 2021-06-14 3249b645c9 cmd/compile: factor out rewrite multi-valued f()
+ 2021-06-13 14305bf0b9 misc/cgo: generate Windows import libraries for clang
+ 2021-06-13 24cff0f044 cmd/go, misc/cgo: skip test if no .edata
+ 2021-06-13 67b1b6a2e3 cmd/compile: allow ir.OSLICE2ARRPTR in mayCall
+ 2021-06-12 1ed0d129e9 runtime: testprogcgo: don't call exported Go functions directly from Go
+ 2021-06-12 9d46ee5ac4 reflect: handle stack-to-register translation in callMethod
+ 2021-06-11 e552a6d312 cmd/go: remove hint when no module is suggested
+ 2021-06-11 16b5d766d8 syscall: do not load native libraries on non-native powershell on arm
+ 2021-06-11 77aa209b38 runtime: loop on EINTR in macOS sigNoteSleep
+ 2021-06-11 e2dc6dd5c9 doc/go1.17: clean up formatting of gofmt section
+ 2021-06-11 2f1128461d cmd/go: match Windows paths in TestScript/mod_invalid_version
+ 2021-06-11 2721da2608 doc/go1.17: fix formatting near httptest
+ 2021-06-10 770f1de8c5 net/http: remove test-only private key from production binaries
+ 2021-06-10 8d11b1d117 cmd/go: report the imports of CompiledGoFiles in ImportMap
+ 2021-06-10 dc00dc6c6b crypto/tls: let HTTP/1.1 clients connect to servers with NextProtos "h2"
+ 2021-06-09 27f83723e9 api: promote next to go1.17
+ 2021-06-09 182157c81a doc/go1.17: remove lingering TODO
+ 2021-06-09 a5bc060b42 doc/go1.17: document strconv changes for Go 1.17
+ 2021-06-09 1402b27d46 strconv: document parsing of leading +/-
+ 2021-06-09 df35ade067 doc/go1.17: document //go:build lines
+ 2021-06-09 e4e7807d24 net/http: add AllowQuerySemicolons
+ 2021-06-09 ec3026d032 doc/go1.17: remove TODO for ports section
+ 2021-06-09 e6dda19888 net/url: reject query values with semicolons
+ 2021-06-09 139e935d3c math/big: comment division
+ 2021-06-09 aa5540cd82 cmd/compile: make map.zero symbol content-addressable
+ 2021-06-09 07ca28d529 cmd/link: fix bug in -strictdups checking of BSS symbols
+ 2021-06-08 bcecae2af6 doc/go1.17: mention new possibility of type conversion panicking
+ 2021-06-08 63dcab2e91 doc/go1.17: mention new vet checks sigchanyzer and stdmethods.
+ 2021-06-08 6551763a60 doc/go1.17: mention block profile bias fix
+ 2021-06-08 cb80937bf6 Revert "doc/go1.17: mention block profile bias fix"
+ 2021-06-08 d3e3d03666 net: reject leading zeros in IP address parsers
+ 2021-06-08 da4a640141 doc/go1.17: revise OpenBSD release notes
+ 2021-06-08 689f4c7415 doc/go1.17: mention block profile bias fix
+ 2021-06-08 9afe071c60 doc/go1.17: remove TODO for Tools section
+ 2021-06-08 f753d7223e doc/go1.17: resolve TODO for cmd/cover
+ 2021-06-08 9498b0155d cmd/go: in Go 1.17+ modules, add indirect go.mod dependencies separately from direct ones
+ 2021-06-08 949f00cebe doc/go1.17: add release notes for crypto packages
+ 2021-06-08 0fb3e2c184 doc/go1.17: add a release note for the '-compat' flag to 'go mod tidy'
+ 2021-06-08 2169deb352 cmd/compile: use t.AllMethods when sorting typesByString
+ 2021-06-08 c20bcb6488 runtime: remove out-of-date comments about frame skipping
+ 2021-06-07 39c39ae52f doc: document Go 1.17 language changes
+ 2021-06-07 dc8b558951 cmd/dist: pass -Wno-lto-type-mismatch in swig_callback_lto
+ 2021-06-07 909dd5e010 strconv: ParseFloat: always return ErrSyntax for bad syntax
+ 2021-06-07 8212707871 crypto/elliptic: update P-521 docs to say it's constant-time
+ 2021-06-07 7406180012 fmt: split package documentation into more sections
+ 2021-06-07 e3176bbc3e crypto/tls: fix typo in Config.NextProtos docs
+ 2021-06-05 e1fa26026d spec: improve wording consistency by eliminating "specifier"
+ 2021-06-05 f490134126 spec: improve wording by choosing an official term "keyword"
+ 2021-06-05 e3cb381704 go/internal/gcimporter: don't waste CPU copying bytes in `io.ReadAll`
+ 2021-06-05 9d669ed47a misc/cgo/errors: use expected column numbers
+ 2021-06-04 95939e8de7 cmd/compile/internal/abi: fix typo in comment
+ 2021-06-04 831f9376d8 net/http: fix ResponseWriter.ReadFrom with short reads
+ 2021-06-04 3a9d906edc os: avoid finalizer race in windows process object
+ 2021-06-04 105c5b50e0 os: terminate windows processes via handle directly
+ 2021-06-04 79cd407f88 syscall: regenerate zsyscall_windows.go
+ 2021-06-04 c6b6211229 doc/go1.17: document testing changes for Go 1.17
+ 2021-06-04 0214440075 syscall: do not pass console handles to PROC_THREAD_ATTRIBUTE_HANDLE_LIST on Windows 7
+ 2021-06-04 962d5c997a cmd/compile,go/types: restrict use of unsafe.{Add,Slice} to go1.17 or newer
+ 2021-06-04 b29b123e07 cmd/compile: remove spurious ir.Dump
+ 2021-06-03 6d98301114 cmd/link: use correct alignment in PE DWARF sections
+ 2021-06-03 e0d029f758 runtime: avoid gp.lockedm race in exitsyscall0
+ 2021-06-02 dd7ba3ba2c net: don't rely on system hosts in TestCVE202133195
+ 2021-06-02 4f572d7076 io/fs: minor corrections to Sub docs
+ 2021-06-02 e11d14225c doc/go1.17: remove runtime section
+ 2021-06-02 6e189afd3e doc/go1.17: mention SYS_WAIT6/WEXITED on NetBSD
+ 2021-06-02 ff9f5fb859 cmd/link: recognize clang linker error in testCGOLTO
+ 2021-06-02 1c6a2ea2ea doc/go1.17: document time changes for Go1.17
+ 2021-06-02 d743e67e06 doc/go1.17: document flag changes for Go 1.17
+ 2021-06-02 dc8f87b749 runtime/internal/sys: generate //go:build lines in gengoos.go
+ 2021-06-02 84c0e5d47f cmd/link: move issue 43830 tests out of TestScript
+ 2021-06-02 cae68700cc runtime: fix formatting
+ 2021-06-01 567ee865f6 cmd/go: add declaration to cgo_lto_issue43830 test
+ 2021-06-01 24e9707cbf cmd/link, cmd/cgo: support -flto in CFLAGS
+ 2021-06-01 272552275f A+C: update name
+ 2021-06-01 2bec019fb5 doc/go1.17: add release notes for register ABI
+ 2021-06-01 2e59cc5fb4 cmd/go: add [-src] to documentation
+ 2021-06-01 0b80cf1136 cmd/go: make 'go get' save sums for incidentally updated modules
+ 2021-05-30 3b770f2ccb go/types: don't declare 'comparable' when typeparams are disabled
+ 2021-05-30 1607c28172 go/types: unexport the GoVersion configuration option for Go 1.17
+ 2021-05-29 79bda65041 doc/go1.17: mention time.Layout
+ 2021-05-29 f6cc392d1d doc/go1.17: document text/template/parse.SkipFuncCheck
+ 2021-05-28 1419ca7cea doc/go1.17: mention new definitions of MSG_CMSG_CLOEXEC
+ 2021-05-28 6624771c83 doc/go1.17: mention testing.[TB].Setenv methods
+ 2021-05-28 bbda923592 doc/go1.17: mention new Windows SysProcAttr fields
+ 2021-05-28 6f58088bd8 doc/go1.17: document new go/build/BuildContext.ToolTags field
+ 2021-05-28 c295107708 doc/go1.17: mention new encoding/csv/Reader.FieldPos method
+ 2021-05-28 ccd9784edf doc/go1.17: document new debug/elf constant
+ 2021-05-28 3de3440fb9 go/ast: remove FuncDecl.IsMethod for Go 1.17
+ 2021-05-27 639acdc833 doc/go1.17: clarify that compress/lzw Reader and Writer types are new
+ 2021-05-27 193d514131 net/http: correct Client.Do doc about context cancelation
+ 2021-05-27 ab2ef4aaa7 doc/go1.17: document reflect changes
+ 2021-05-27 0ece95a0fe cmd/go: don't let 'go mod download' save sums for inconsistent requirements
+ 2021-05-27 cdcd02842d net: verify results from Lookup* are valid domain names
+ 2021-05-27 8bf5bf5173 cmd/compile: improve debug locations for partially live in-params
+ 2021-05-27 56af34f875 cmd/compile: place reg spills after OpArg{Int,Float}Reg ops
+ 2021-05-27 db66e9e15d cmd/link: accept Windows line-ending in TestTrampolineCgo
+ 2021-05-27 6b8c94b6c5 go/types: guard against check==nil in newNamed
+ 2021-05-27 fca7b8f3e6 Revert "net: verify results from Lookup* are valid domain names"
+ 2021-05-27 950fa11c4c net/http/httputil: always remove hop-by-hop headers
+ 2021-05-27 9bc52686da cmd/go,cmd/link: do not check for staleness in most tests
+ 2021-05-27 6ff0ae2aa4 crypto/elliptic: fix typo in p521Point type name
+ 2021-05-26 3075ffc93e os: deflake TestFdReadRace
+ 2021-05-26 a62c08734f src/os: revert accidentally submitted change
+ 2021-05-26 1d5298d46a doc/go1.17: document net/... changes
+ 2021-05-26 0fbecece98 doc/go1.17: document syscall changes
+ 2021-05-26 02beecb397 mime: document use of the Shared MIME-Info Database
+ 2021-05-26 a92460fd2f doc/go1.17: add release notes for runtime/metrics package
+ 2021-05-26 55aefbb268 doc/go1.17: mention enabling frame pointer on all ARM64
+ 2021-05-26 39da9ae513 go/types: ensure that Named.check is nilled out once it is expanded
+ 2021-05-26 bfd7798a6c runtime,cmd/link/internal/ld: fix typos
+ 2021-05-26 e4615ad74d math/big: move division into natdiv.go
+ 2021-05-26 d050238bb6 doc/go1.17: fix formatting for time changes
+ 2021-05-25 74242baa41 archive/zip: only preallocate File slice if reasonably sized
+ 2021-05-25 f22ec51deb doc: add Go 1.17 release note about inlining functions with closures
+ 2021-05-25 8b462d7567 cmd/go: add a -compat flag to 'go mod tidy'
+ 2021-05-24 c89f1224a5 net: verify results from Lookup* are valid domain names
+ 2021-05-24 08a8fa9c47 misc/wasm: ensure correct stack pointer in catch clauses
+ 2021-05-24 32b73ae180 cmd/go: align checks of module path during initialization.
+ 2021-05-24 15d9d4a009 cmd/go: add tests illustrating what happens when Go 1.16 is used in a Go 1.17 main module
+ 2021-05-24 873401df5b cmd/compile: ensure equal functions don't do unaligned loads
+ 2021-05-24 b83610699a cmd/compile: record regabi status in DW_AT_producer
+ 2021-05-24 a22e317220 cmd/compile: always include underlying type for map types
+ 2021-05-24 4356e7e85f runtime: account for spill slots in Windows callback compilation
+ 2021-05-24 52d7033ff6 cmd/go/internal/modload: set the default GoVersion in a single location
+ 2021-05-24 05819bc104 cmd/go/internal/modcmd: factor out a type for flags whose arguments are Go versions
+ 2021-05-22 cca23a7373 cmd/compile: revert CL/316890
+ 2021-05-21 f87194cbd7 doc/go1.17: document changes to net/http package
+ 2021-05-21 217f5dd496 doc: document additional atomic.Value methods
+ 2021-05-21 3c656445f1 cmd/go: in TestScript/mod_replace, download an explicit module path
+ 2021-05-21 76b2d6afed os: document that StartProcess puts files into blocking mode
+ 2021-05-21 e4d7525c3e cmd/dist: display first class port status in json output
+ 2021-05-21 4fb10b2118 cmd/go: in 'go mod download' without args, don't save module zip sums
+ 2021-05-21 4fda54ce3f doc/go1.17: document database/sql changes for Go 1.17
+ 2021-05-21 8876b9bd6a doc/go1.17: document io/fs changes for Go 1.17
+ 2021-05-21 5fee772c87 doc/go1.17: document archive/zip changes for Go 1.17
+ 2021-05-21 3148694f60 cmd/go: remove warning from module deprecation notice printing
+ 2021-05-21 7e63c8b765 runtime: wait for Go runtime to initialize in Windows signal test
+ 2021-05-21 831573cd21 io/fs: added an example for io/fs.WalkDir
+ 2021-05-20 baa934d26d cmd: go get golang.org/x/tools/analysis@49064d23 && go mod vendor
+ 2021-05-20 7c692cc7ea doc/go1.17: document changes to os package
+ 2021-05-20 ce9a3b79d5 crypto/x509: add new FreeBSD 12.2+ trusted certificate folder
+ 2021-05-20 f8be906d74 test: re-enable test on riscv64 now that it supports external linking
+ 2021-05-20 def5360541 doc/go1.17: add release notes for OpenBSD ports
+ 2021-05-20 ef1f52cc38 doc/go1.17: add release note for windows/arm64 port
+ 2021-05-20 bb7495a46d doc/go1.17: document new math constants
+ 2021-05-20 f07e4dae3c syscall: document NewCallback and NewCallbackCDecl limitations
+ 2021-05-20 a8d85918b6 misc/cgo/testplugin: skip TestIssue25756pie on darwin/arm64 builder
+ 2021-05-19 6c1c055d1e cmd/internal/moddeps: use filepath.SkipDir only on directories
+ 2021-05-19 658b5e66ec net: return nil UDPAddr from ReadFromUDP
+ 2021-05-19 15a374d5c1 test: check portable error message on issue46234.go
+ 2021-05-18 eeadce2d87 go/build/constraint: fix parsing of "// +build" (with no args)
+ 2021-05-18 6d2ef2ef2a cmd/compile: don't emit inltree for closure within body of inlined func
+ 2021-05-18 048cb4ceee crypto/x509: remove duplicate import
+ 2021-05-18 690a8c3fb1 make.bash: fix misuse of continue
+ 2021-05-18 8b0901fd32 doc/go1.17: fix typo "avoding" -> "avoiding"
+ 2021-05-18 5e191f8f48 time: rewrite the documentation for layout strings
+ 2021-05-17 bfe3573d58 go/token: correct the interval notation used in some panic messages
+ 2021-05-17 a2c07a9a1a all: update golang.org/x/net to latest
+ 2021-05-17 b9b2bed893 syscall: some containers may fail syscall.TestSetuidEtc
+ 2021-05-17 b1aff42900 cmd/go: don't print 'go get' deprecation notices in the main module
+ 2021-05-17 bade680867 runtime/cgo: fix crosscall2 on ppc64x
+ 2021-05-15 ce92a2023c cmd/go: error out of 'go mod tidy' if the go version is newer than supported
+ 2021-05-14 02699f810a runtime: mark osyield nosplit on OpenBSD
+ 2021-05-14 3d324f127d net/http: prevent infinite wait during TestMissingStatusNoPanic
+ 2021-05-14 0eb38f2b16 cmd/go/internal/load: override Package.Root in module mode
+ 2021-05-14 a938e52986 cmd/go: fix a portability issue in the cd script command
+ 2021-05-14 d137b74539 cmd/go: fix spacing in help text of -overlay flag
+ 2021-05-14 c925e1546e cmd/internal/obj/arm64: disable AL and NV for some condition operation instructions
+ 2021-05-14 12d383c7c7 debug/macho: fix a typo in macho.go
+ 2021-05-14 3a0453514a all: fix spelling
+ 2021-05-13 b4833f7c06 cmd/link: always mark runtime.unreachableMethod symbol
+ 2021-05-13 92c189f211 cmd/link: resolve ABI alias for runtime.unreachableMethod
+ 2021-05-13 7a7624a3fa cmd/go: permit .tbd files as a linker flag
+ 2021-05-13 cde2d857fe cmd/go: be less strict about go version syntax in dependency go.mod files
+ 2021-05-13 2a61b3c590 regexp: fix repeat of preferred empty match
+ 2021-05-13 fd4631e24f cmd/compile/internal/dwarfgen: fix DWARF param DIE ordering
+ 2021-05-13 a63cded5e4 debug/dwarf: delay array type fixup to handle type cycles
+ 2021-05-13 0fa2302ee5 cmd/vendor: update golang.org/x/sys to latest
+ 2021-05-13 2c76a6f7f8 all: add //go:build lines to assembly files
+ 2021-05-12 6db7480f59 cmd/go/internal/modload: in updateLazyRoots, do not require the main module explicitly
+ 2021-05-12 f93b951f33 cmd/compile/abi-internal.md: fix table format
+ 2021-05-12 3b321a9d12 cmd/compile: add arch-specific inlining for runtime.memmove
+ 2021-05-12 07ff596404 runtime/internal/atomic: add LSE atomics instructions to arm64
+ 2021-05-12 03886707f9 runtime: fix handling of SPWRITE functions in traceback
+ 2021-05-12 e03383a2e2 cmd/link: check mmap error
+ 2021-05-12 af0f8c149e cmd/link: don't cast end address to int32
+ 2021-05-12 485474d204 cmd/go/testdata/script: fix test failing on nocgo builders
+ 2021-05-12 1a0ea1a08b runtime: fix typo in proc.go
+ 2021-05-11 9995c6b50a cmd/go: ignore implicit imports when the -find flag is set
+ 2021-05-11 9b84814f6e net/http: check that Unicode-aware functions are not used
+ 2021-05-11 2520e72d3b runtime: hold sched.lock across atomic pidleget/pidleput
+ 2021-05-11 326a792517 runtime,syscall: simplify openbsd related build tags
+ 2021-05-10 5c489514bc net/http: switch HTTP1 to ASCII equivalents of string functions
+ 2021-05-10 dc50683bf7 crypto/elliptic: upgrade from generic curve impl to specific if available
+ 2021-05-10 73d5aef4d1 cmd/internal/objfile: add objabi.SNOPTRDATA to "D"
+ 2021-05-10 d9e068d289 runtime/cgo,cmd/internal/obj/ppc64: fix signals with cgo
+ 2021-05-10 deb3403ff5 go/build: include files with parse errors in GoFiles and other lists
+ 2021-05-10 82517acae8 net, runtime: drop macOS 10.12 skip conditions in tests
+ 2021-05-10 031854117f cmd/go: include packages with InvalidGoFiles when filtering main packages
+ 2021-05-10 a9edda3788 cmd/go: add a test that reproduces #45827
+ 2021-05-10 e18a8b4fb2 go/build: avoid duplicates in InvalidGoFiles
+ 2021-05-10 287025925f cmd/compile,reflect: allow longer type names
+ 2021-05-09 c14ecaca81 runtime: skip TestCrashDumpsAllThreads on openbsd/arm
+ 2021-05-09 bedf2c4886 runtime,syscall: convert syscall on openbsd/arm to libc
+ 2021-05-09 603f43cbae runtime: switch runtime to libc for openbsd/arm
+ 2021-05-09 83df4a590b runtime: switch openbsd/arm locking to libc
+ 2021-05-09 8ec8f6aa87 runtime: switch openbsd/arm to pthreads
+ 2021-05-09 5203357eba cmd/compile: make non-concurrent compiles deterministic again
+ 2021-05-09 ea93e68858 crypto/elliptic: make P-521 scalar multiplication constant time
+ 2021-05-09 14c3d2aa59 crypto/elliptic: import fiat-crypto P-521 field implementation
+ 2021-05-09 ec4efa4208 crypto/x509: check the private key passed to CreateCertificate
+ 2021-05-08 b38b1b2f9a cmd/compile: manage Slot array better
+ 2021-05-08 68327e1aa1 cmd/vendor: upgrade pprof to latest
+ 2021-05-08 4c8f48ed4f syscall: do not change stdio handle inheritance
+ 2021-05-08 9d0819b27c crypto/tls: make cipher suite preference ordering automatic
+ 2021-05-08 02ce411821 crypto/x509: remove GODEBUG=x509ignoreCN=0 flag
+ 2021-05-08 b211fe0058 cmd/compile: remove bit operations that modify memory directly
+ 2021-05-07 f24eac4771 cmd/compile:  improving the documentation of various fields and functions
+ 2021-05-07 3980c4db19 doc/go1.17: fill in TODO for compress/lzw package
+ 2021-05-07 d80d1427a8 doc/go1.17: fill in TODO for reflect package
+ 2021-05-07 af6123a865 doc/go1.17: document encoding/binary.Uvarint max read of 10 bytes
+ 2021-05-07 b44c78b8c3 doc/go1.17: fill in TODO for strconv package
+ 2021-05-07 9bfa6f75d5 cmd/internal/obj: consolidate MOVB cases with other MOV ops on ppc64
+ 2021-05-07 a0eb662d85 doc/go1.17: move language specification TODO to the right place
+ 2021-05-07 bdb8044665 cmd/link: don't include arginfo symbols in symbol table
+ 2021-05-07 f5423ea615 cmd/compile/internal/types2: add test case for issue 45985
+ 2021-05-07 832c70e33d internal/poll: cast off the last reference of SplicePipe in test
+ 2021-05-07 d2b03111c4 go/types,cmd/compile/internal/types2: unskip std and cmd in TestStdlib
+ 2021-05-07 9524e93adf go/types: add a test case for issue 45985
+ 2021-05-07 a11a1711b0 go/types: expose types.Info.Inferred with -tags=typeparams
+ 2021-05-06 4dbad79510 runtime: call unlockOSThread directly in Windows syscall functions
+ 2021-05-06 f39997b2be cmd/link: split large text sections on Darwin/ARM64 when external linking
+ 2021-05-06 90d6bbbe42 crypto/tls: enforce ALPN overlap when negotiated on both sides
+ 2021-05-06 402f177efc cmd/compile: fix intrinsic setting for mul64, add64 on ppc64le
+ 2021-05-06 51ff3a6965 crypto/x509: rewrite certificate parser
+ 2021-05-06 5f9fe47dea CONTRIBUTORS: change my name
+ 2021-05-06 6c591f79b0 math/big: check for excessive exponents in Rat.SetString
+ 2021-05-06 54e20b505d doc/go1.17: document fixes for negative rune handling
+ 2021-05-06 d2fd503f68 text/template: fix type bug in eq
+ 2021-05-06 0e7a7a68cd text/template/parse: rename DeferFuncCheck to SkipFuncCheck
+ 2021-05-06 ba0f8ce50f runtime: gofmt proc_test.go
+ 2021-05-06 b4ca1cec69 cmd/compile: set unsayable "names" for regabi testing triggers
+ 2021-05-06 1108cbe60b crypto/ecdsa,crypto/elliptic: improve tests and benchmarks
+ 2021-05-06 43c390a1fa crypto/ed25519: skip allocations test on -noopt builder
+ 2021-05-05 cf73f1a8e4 go/parser: don't parse a nil IndexExpr.Index
+ 2021-05-05 15557af207 doc/go1.17: fill in Go 1.17 release note TODOs using relnote
+ 2021-05-05 b0c49ae9f5 crypto/ed25519: replace internal/edwards25519 with filippo.io/edwards25519
+ 2021-05-05 543e098320 go/types: fix potential bugs in santitizer pass
+ 2021-05-05 40d5e6d4e2 cmd/compile/internal/types2: fix potential bugs in santitizer pass
+ 2021-05-05 784ef4c531 net/http: ignore directory path when parsing multipart forms
+ 2021-05-05 95dde3f029 cmd/compile: do not substitute OGOTO inside a closure when inlining
+ 2021-05-05 d0583b131a cmd/go: spot-check the explicit requirements of root module dependencies when loading packages from them
+ 2021-05-05 18e666bad7 cmd/go: skip TestExecInDeletedDir on aix and solaris-based platforms
+ 2021-05-05 69368cece5 cmd/compile/internal/types2: make TestManual work for directories
+ 2021-05-05 3b304ce7fe runtime: implement runqdrain() for GC mark worker goroutines
+ 2021-05-05 f34fe8e370 all: update vendored dependencies for Go 1.17
+ 2021-05-05 4c9791299d runtime: remove redundant save_g call in mcall for arm
+ 2021-05-05 9e0facd26e cmd/compile/internal/types2: implement types2.Instantiate
+ 2021-05-05 caf4c9434b cmd/compile: debug trace output for -N variable location gen
+ 2021-05-05 66ce8aa88d cmd/compile: handle degenerate entry blocks in -N debug gen
+ 2021-05-05 4df662fb37 cmd/go: don't crash when running "go version" in deleted directory
+ 2021-05-05 bb5e45219a cmd/go.sum: remove untidy checksums
+ 2021-05-04 137be7712f embed/internal/embedtest: add test for embedded path starting with dash
+ 2021-05-04 cb0658e624 go/types: expose more API under -tags=typeparams
+ 2021-05-04 62a87f64b9 cmd/go/internal/modload: only check root-promotion during tidy for lazy modules
+ 2021-05-04 6a6aa32783 cmd/go: add a test that reproduces the internal error in #45952
+ 2021-05-04 cd28ca3a4e runtime: abort when receiving a signal on a non-Go thread on Windows
+ 2021-05-04 d19e5493bd doc/go1.17: require macOS 10.13 or later
+ 2021-05-04 10a082aa70 cmd/go: update x/mod to fix "//indirect" comment editing
+ 2021-05-04 f62739b861 cmd/compile: establish regabi name/value mapping for small in-params
+ 2021-05-04 8c3d217d89 os: skip TestExecutableDeleted on plan9
+ 2021-05-04 e15d1f4e64 internal/buildcfg: set Error instead of panicking
+ 2021-05-04 da7496d841 os/signal: increase test timeouts on ppc64*/linux
+ 2021-05-04 d83baa1aa2 cmd/dist,cmd/go: set GOTRACEBACK to "system" for testing
+ 2021-05-04 10d625d5b4 database/sql: add NullInt16 and NullByte
+ 2021-05-04 371ea545c0 net/url: avoid string concatenation in resolvePath
+ 2021-05-04 62d424d794 cmd: update x/tools to pull in CL 315570
+ 2021-05-04 eab0c46af7 cmd/go/internal/modload: remove outdated comments and redundant tests
+ 2021-05-04 0816511d3b all: update x/crypto to pull in CL 316109
+ 2021-05-04 8e38b80b64 cmd: update x/text to pull in CL 315571
+ 2021-05-04 1bbe78bb6d cmd: update x/mod to pull in CL 316113
+ 2021-05-04 86e42c2fbf cmd/go: suppress SSH password prompts when fetching modules or repos
+ 2021-05-04 5e4f9b077f cmd/compile: when compiling with -N, avoid entry block
+ 2021-05-04 0921211403 cmd/compile: preserve/translate names for parameters
+ 2021-05-04 830e63a7a3 syscall: add //go:build lines to assembly files
+ 2021-05-04 45600bcd61 os, syscall: use wait6 to avoid wait/kill race on netbsd
+ 2021-05-04 138d2c9b88 strconv: fix a typo
+ 2021-05-04 e3769299cd strconv: add QuotedPrefix
+ 2021-05-04 2422c5eae5 sync/atomic: add (*Value).Swap and (*Value).CompareAndSwap
+ 2021-05-04 496d7c6914 text/template: add lock for Template.tmpl to fix data race
+ 2021-05-03 731a015ab8 internal/syscall/unix: use internal/abi.FuncPC for syscall wrapper
+ 2021-05-03 e8eb1d8269 math: add MaxUint, MinInt, MaxInt
+ 2021-05-03 ed5ebd32b3 os: update some docs to reference fs.ErrFoo instead of os.ErrFoo
+ 2021-05-03 ddb648fdf6 archive/zip: add File.OpenRaw, Writer.CreateRaw, Writer.Copy
+ 2021-05-03 9f347035ef cmd/api: disallow silent API additions after api/go1.n.txt is created
+ 2021-05-03 791854700d all: update x/net to pull in CL 316129
+ 2021-05-03 a144af9136 cmd: update x/term to pull in CL 316112
+ 2021-05-03 8a4b7294af cmd/compile: fix possible nil deref added in CL 270943
+ 2021-05-03 7f9febd4a1 cmd/compile: fix linux-amd64-noopt builder
+ 2021-05-03 90ec257735 cmd/compile: make the stack allocator more careful about register args.
+ 2021-05-03 b584230889 net/http: use relative path in Location redirect
+ 2021-05-03 169155d61e cmd/compile: preserve argument order in debug_info
+ 2021-05-03 472f519fe2 cmd/compile/internal/ssagen: fix misleading comment
+ 2021-05-03 d75fbac54d cmd/compile:  add edge from lock rank edge from forceGC to traceStackTab
+ 2021-05-03 7b768d43d0 math: replace float32/64 extrema with exact expressions
+ 2021-05-03 be1da9cdee cmd/link: unify text segment write
+ 2021-05-03 8327d2150f cmd/compile: add traceback argument info to ABI0 assembly functions
+ 2021-05-03 844e1fc6f1 cmd/compile: make typecheckaste correctly report invalid use of "..."
+ 2021-05-03 9ed736ac2a cmd/link/internal: fix use of DynlinkingGo with ppc64le trampolines
+ 2021-05-03 30674ae91b cmd/dist: disable misc/cgo/testsanitizers on ppc64le
+ 2021-05-03 2c9f5a1da8 cmd: update x/arch to pull in CL 315572
+ 2021-05-02 abb110bf3d os/user: implement (*User).GroupIds on solaris
+ 2021-05-02 b177b2d51e os, syscall: use wait6 to avoid wait/kill race on dragonfly
+ 2021-05-02 7eb2d30883 syscall: add //go:build lines to files generated with with mksyscall_libc.pl
+ 2021-05-02 bb09f8a29b time: make time.Time print a valid Go string with %#v
+ 2021-05-02 fadad851a3 cmd/compile: implement unsafe.Add and unsafe.Slice
+ 2021-05-02 0d32d9e8a8 os: document that Windows Symlink to missing target creates file symlink
+ 2021-05-02 352a322a83 path/filepath: fix documentation typo (was "each each")
+ 2021-05-01 053fe2f485 cmd/link: emit better error for duplicated definition
+ 2021-05-01 d7473fd907 cmd/link: mangle ABI name for shared linkage
+ 2021-05-01 879db69ce2 go/types: list errors by default in TestManual
+ 2021-05-01 a9db5a7386 go/types: simplify use of TestManual
+ 2021-05-01 ffc38d8ab4 go/types: slice-to-array-pointer conversion requires go1.17
+ 2021-04-30 8e91458b19 runtime,syscall: convert syscall on openbsd/386 to libc
+ 2021-04-30 faff49aae6 runtime: switch runtime to libc for openbsd/386
+ 2021-04-30 0bbfc5c31e runtime: break up large calls to memclrNoHeapPointers to allow preemption
+ 2021-04-30 41afd3af42 cmd/compile: fix abbrev selection for output params
+ 2021-04-30 d19eece91f cmd/compile: handle field padding for register-passed structs
+ 2021-04-30 162d4f9c92 cmd/compile: regabi support for DWARF location expressions
+ 2021-04-30 93200b98c7 bufio: mention ErrFinalToken in SplitFunc documentation
+ 2021-04-30 c23a32284a runtime: work around vet asmdecl checks for openbsd/386 mstart_stub
+ 2021-04-30 afa58ddf5a cmd/compile: revise block/func end sentinels in debug analysis
+ 2021-04-30 83ac59b1a5 cmd/internal/archive: make error message contain printable characters only
+ 2021-04-30 c3b2b04156 runtime: switch openbsd/386 locking to libc
+ 2021-04-30 4893eee9dc runtime: switch openbsd/386 to pthreads
+ 2021-04-30 d9bfda8124 cmd/go: remove the special case for "unsafe" in importFromModules
+ 2021-04-30 cbff713e68 cmd/go: add GODEBUG tokens for debugging lazy module loading
+ 2021-04-30 eb71887b99 cmd/go: prune go.mod and go.sum files from vendored dependencies
+ 2021-04-30 c3365ad5f2 cmd/go: annotate versions in vendor/modules.txt
+ 2021-04-30 7dedc237c5 cmd/go: smooth out upgrade paths for lazy loading
+ 2021-04-30 0e315ad79a cmd/go/internal/modload: avoid loading the full module graph when listing specific modules
+ 2021-04-30 c05d50f8f3 cmd/go/internal/modload: avoid loading the module graph to list only the name of the main module
+ 2021-04-30 ee4f9656ac cmd/go/internal/modload: avoid loading the full module graph to determine which checksums to add to go.sum
+ 2021-04-30 4063605e0d cmd/go/internal/modload: avoid loading the full module graph for imports satisfied by lazy roots
+ 2021-04-30 8d8abb3b8a cmd/go: verify lazy-loading invariants when loading the vendor list for a lazy module
+ 2021-04-30 9a81702b97 cmd/go: enable lazy loading
+ 2021-04-30 2bd3e48055 cmd/go/internal/modload: implement lazy loading
+ 2021-04-30 9c12f1b433 internal/buildcfg: enable regabi for Android
+ 2021-04-30 95c5f4da80 cmd/compile/internal/types2: list errors by default in TestManual
+ 2021-04-30 c55d5c887e cmd/compile/internal/types2: simplify use of TestManual
+ 2021-04-30 89bf297b24 cmd/internal/objfile: emit better error for Go object of a different version
+ 2021-04-30 a893682d83 net/url: add Values.Has
+ 2021-04-30 3366556d1c A+C: add Weixie Cui (individual CLA)
+ 2021-04-30 cc02d59e84 cmd/gofmt: always format non-directory arguments again
+ 2021-04-30 0dfb6fb490 go/ast: print CommentMap contents in source order
+ 2021-04-30 06ac303f6a cmd/internal/obj/ppc64: simplify got/toc address classification
+ 2021-04-30 9c7207891c cmd/internal/obj/arm64: fix the size of STP series instructions in optab
+ 2021-04-30 303b194c6d api: update next.txt
+ 2021-04-30 3498027329 math: increase precision of math.SmallestNonzeroFloat64
+ 2021-04-30 02ab8d1a1d cmd/compile, runtime: emit only GC data for stack objects
+ 2021-04-29 a9705e157b cmd/compile/internal/types2: slice-to-array-pointer conversion requires go1.17
+ 2021-04-29 e99dfb0e5c cmd/compile: make GC prog symbol content-addressable
+ 2021-04-29 1df309eb02 cmd/compile: skip types.Sym for GC mask symbols
+ 2021-04-29 897baae953 runtime/metrics: add additional allocation metrics
+ 2021-04-29 fd09593667 cmd/compile: minor doc enhancements
+ 2021-04-29 7b32830f58 crypto/elliptic: store P-256 precomputed basepoint table in source
+ 2021-04-29 87e4dcd446 archive/zip: only return directory once via io/fs.FS
+ 2021-04-29 6d95e5a4ff encoding/csv: add FieldPos method
+ 2021-04-29 2c05ba4ae0 runtime: top align tinyallocs in race mode
+ 2021-04-29 32dbaac572 cmd/compile/internal/walk: merge operations when calling ir.NewSlic…
+ 2021-04-29 e03cca6407 runtime: use 4 MiB heap arenas on iOS
+ 2021-04-29 5a8435d701 go/types: add additional test data from types2
+ 2021-04-29 f7c6f6210b cmd/link: test trampolines with cgo
+ 2021-04-29 948a262455 cmd/compile/internal/types2: nest all test data under the testdata directory
+ 2021-04-29 12eaefead4 cmd/link: support trampoline insertion for PLT calls on ARM
+ 2021-04-29 657f58d845 cmd/link: support trampoline insertion for PLT calls on ARM64
+ 2021-04-29 f12dfeac89 cmd/link: support trampoline insertion on ARM64
+ 2021-04-29 b15372f39b runtime: remove linux-amd64 walltime function
+ 2021-04-29 862ddb37b4 runtime: rename walltime1 to walltime
+ 2021-04-29 4e3e6b58f7 cmd/compile/internal/ir: fix doc
+ 2021-04-29 18852e8372 cmd/link: use a two-pass approach for trampoline insertion
+ 2021-04-29 d80da19fc9 cmd/link: update comment for PLT/GOT helper functions
+ 2021-04-29 eb3fe28d70 go/types: improve error messages for unexpected ListExprs
+ 2021-04-29 c8a92d454c go/types: ensure that error code values do not change in 1.17
+ 2021-04-29 47cb0c46b2 go/types: nest all test data under the testdata directory
+ 2021-04-29 c4c68fb57f cmd/compile/internal/walk: delete unused statement
+ 2021-04-29 6afa0ae4e5 cmd/compile/internal/types2: match compiler error for invalid type alias decl
+ 2021-04-29 42953bc9f5 runtime: remove walltime function
+ 2021-04-29 d09947522d runtime: implement time.now in assembly for linux-amd64
+ 2021-04-29 756fd56bbf cmd/compile: remove an unused function
+ 2021-04-28 fa6ed6e81a go/types: respect IgnoreFuncBodies for function literals
+ 2021-04-28 6082c05d8b go/types: better errors for invalid short var decls
+ 2021-04-28 414af503d7 go/types: fix type inference
+ 2021-04-28 c96fec9036 runtime: use a single definition of time_now for faketime
+ 2021-04-28 b36596b14f runtime: move Windows time.now implementations into separate files
+ 2021-04-28 07e006dd93 go/types: use a global atomic counter for type parameter ids
+ 2021-04-28 168dd4e6aa go/types: add example test for type inference
+ 2021-04-28 1e235cd454 go/types: use combined type and ordinary args for type inference
+ 2021-04-28 ad989c7dba crypto/cipher: make AES-GCM benchmarks match ChaCha20Poly1305 ones
+ 2021-04-28 764f53eb6c spec: clarify conditions for switch expression type
+ 2021-04-28 42812a2fee types2: disambiguate package qualifiers in error messages
+ 2021-04-28 ea65a12f89 cmd/compile/internal/types2: catch unexpected expression lists
+ 2021-04-28 90614ff462 cmd/go/internal/modfetch: fix comment that mentions no-longer returned error
+ 2021-04-28 a54762586f cmd/gofmt: simplify arg handling
+ 2021-04-28 22a56b629d cmd/go/internal/modload: in importFromModules, do not wrap module graph errors in ImportMissingError
+ 2021-04-28 f893f35d9f go/types: split out function instantiation from index expr
+ 2021-04-28 5b328c4a2f cmd/compile: use desired register only if it satisfies register mask
+ 2021-04-28 cbb3f09047 testing: add -shuffle=off|on|N to alter the execution order of tests and benchmarks
+ 2021-04-28 e51246c881 runtime: consolidate Windows time constants into single copy
+ 2021-04-28 92c9f3a9b8 cmd/go: include C/C++/Fortran compiler version in build ID
+ 2021-04-28 becb9a278f test: do not run fuse test in noopt mode
+ 2021-04-28 24ea547a21 cmd/link: don't pass -Wl,--dynamic-linker if -static
+ 2021-04-28 12af403624 cmd/go/internal/bug: use envcmd instead of go env
+ 2021-04-28 5c69cb2a5b cmd/go: populate module info even if an error occurs in loading package
+ 2021-04-28 11052d77a3 cmd/link: use R12 as trampoline scratch register on ARM
+ 2021-04-28 4a7effa418 cmd/compile: mark R12 clobbered for special calls
+ 2021-04-28 4fe324dd0f cmd/go: make TOOLEXEC_IMPORTPATH consistent with 'go list -f {{.ImportPath}}'
+ 2021-04-28 f68878f0fc cmd/dist,runtime: support cgo on openbsd/mips64
+ 2021-04-28 92d1afe989 cmd/compile/ssa: optimize the derivable known branch of If block
+ 2021-04-28 9726c78539 cmd/asm: add check for register and shift/extension combination on arm64
+ 2021-04-28 f439a76253 cmd/internal/obj/arm64: fix the wrong error message of out-of-range checking
+ 2021-04-28 c9f43507c6 cmd/compile: fix typechecking logical operators panic with non-boolean operand
+ 2021-04-27 983dea90c1 cmd/link: disable plugin support if cgo is disabled
+ 2021-04-27 214c8dd80c go/types: factor out index/slice expr handling
+ 2021-04-27 645cb62ee3 testing: document that TestMain can be used with benchmarks
+ 2021-04-27 30002e6656 cmd/go/internal/modload: treat \ as a path separator instead of a shell special character
+ 2021-04-27 b9dfaf77f5 cmd/compile/internal/walk: merge operations
+ 2021-04-27 13e87cda00 time: increase slop for TestTicker
+ 2021-04-27 f432d3fc41 cmd/compile: fix nongeneric closures in generic functions
+ 2021-04-27 8ab7064e33 cmd/go: use a real Go version in the go.mod files in TestScript/mod_readonly
+ 2021-04-27 0c3557e6ad syscall: move TestForegroundSignal create call out of goroutine
+ 2021-04-27 291eb0178f go: various minor cleanups with the help of Goland
+ 2021-04-27 0ae9c3b98b runtime/pprof: fix block profile bias
+ 2021-04-27 8e0023b81b cmd/go/internal/load: treat packages with errors as potentially main packages
+ 2021-04-27 bd2175e1b1 cmd/go: show warnings about symlinks only for patterns containing ...
+ 2021-04-27 222101549a syscall: restore nosplit for ptrace1 on Darwin
+ 2021-04-27 cde6a675bc go/scanner: optimize scanIdentifier
+ 2021-04-27 074a49bfe8 strconv: remove unused extfloat (Grisu3) ftoa code
+ 2021-04-27 55c517a8b3 cmd/compile: fix handling of ir.CurFunc during stenciling
+ 2021-04-27 d553c0144d bits: use same expression with system bit size
+ 2021-04-27 bc6288794d go/scanner: improve variety in benchmarks for file scanning
+ 2021-04-27 6fa12172d9 go/parser: add benchmarks for syntax-only parsing and object resolution
+ 2021-04-27 88a8a27056 os: don't check non-nil err twice in Symlink on windows
+ 2021-04-27 0b9ca4d907 runtime/metrics: add tiny allocs metric
+ 2021-04-27 7d22c2181b syscall: restore signal mask after setting foreground process group
+ 2021-04-27 39844971fb go/types: don't panic when checking a ListExpr in exprInternal
+ 2021-04-27 6edd573218 cmd/link: enforce larger alignment on split ppc64 text sections
+ 2021-04-27 1eca6aa747 cmd/internal/obj: refactor ppc64 address relocation code generation
+ 2021-04-27 e0815d041c runtime: replace --buildmode with -buildmode in tests
+ 2021-04-27 ca8e8317be runtime: add missing import "C" in TestLibraryCtrlHandler
+ 2021-04-27 cb34026a95 cmd/compile: tighten exportWriter.qualifiedIdent signature
+ 2021-04-27 c249491572 doc: change <a/> to </a> in spec
+ 2021-04-27 7ef0237d89 cmd/go/internal/modload: clean up error reporting
+ 2021-04-27 3cc3a16029 cmd/go: add tests for convergence in 'go mod tidy'
+ 2021-04-27 434e12f772 cmd/compile: add more doc for Name.Defn
+ 2021-04-27 15105dd4b5 go/types: walk all imports when determining package name ambiguity
+ 2021-04-27 40254ec0db cmd/compile: fix wrong package path for unsafe.Pointer
+ 2021-04-26 903b25178e syscall: on linux use accept4 in Accept, fall back to accept
+ 2021-04-26 be28caf0aa cmd/compile/internal/types2: respect IgnoreFuncBodies for function literals
+ 2021-04-26 9f601690da cmd/compile: workaround inlining of closures with type switches
+ 2021-04-26 a53dc4c1ce cmd/go/internal/modload: use (*loadPkg).mod only to indicate the module from which the package was loaded
+ 2021-04-26 0d1280c685 Revert "sync: improve sync.Pool object stealing"
+ 2021-04-26 c430313992 runtime: use abi.FuncPCABI0 for libc syscall wrappers
+ 2021-04-26 8ff1da0b81 runtime: fix offset in comment
+ 2021-04-26 14ade57ab8 runtime: fix scavenge min fraction constant floor division
+ 2021-04-26 d02026414c cmd/go: don't add generated SWIG C++ files to CompiledGoFiles
+ 2021-04-26 d5d24dbe41 sync: improve sync.Pool object stealing
+ 2021-04-26 1f7ddf57d2 syscall, etc.: use abi.FuncPCABI0 for libc syscall wrappers
+ 2021-04-26 00d42ffc89 cmd/compile: spos handling fixes to improve prolog debuggability
+ 2021-04-24 70deaa33eb cmd/compile: extend GOSSAFUNC match to well-formed package suffix match.
+ 2021-04-23 e7db792fc5 runtime: simplify TestSelectStackAdjust
+ 2021-04-23 b8fed48a9a cmd/dist: enable cgo on windows/arm64
+ 2021-04-23 a6d3dc40c4 misc/cgo/testso, misc/cgo/testsovar: fix for Windows
+ 2021-04-23 9cc3469106 all: do not test internal linking on windows/arm64
+ 2021-04-23 8e368708c5 cmd/link: implement windows/arm64 external linking
+ 2021-04-23 bf9216055b runtime/testdata: fix testprogcgo for windows/arm64
+ 2021-04-23 a25d1d45d9 runtime: fix windows/arm64 callbackasm1 for frame pointer hack
+ 2021-04-23 16330817aa runtime: add windows/arm64 cgo-linking code
+ 2021-04-23 e5a6c5243c cmd/link: force external link for windows/arm64 cgo binaries
+ 2021-04-23 79f35130cd cmd/link: expand PE constants and fix doc URL
+ 2021-04-23 a0248a99a8 cmd/link: fix PE emitRelocations for >4GB base address
+ 2021-04-23 59ceb985c7 cmd/link: make Loader.SymName not crash
+ 2021-04-23 199575a119 cmd/link: count relocations better
+ 2021-04-23 41e5ae4883 cmd/link: deal with no constructors
+ 2021-04-23 9f7079c44e cmd/link: sort the pclntab relocations
+ 2021-04-23 c0e1301b8c cmd/link: fix PE section attributes for windows/arm64
+ 2021-04-23 073f913949 debug/dwarf: skip over zero-length compilation units
+ 2021-04-23 cef3a442ea cmd/asm, cmd/link: use full objabi header
+ 2021-04-23 19470dc535 misc/cgo/test: do not redeclare exported Go functions
+ 2021-04-23 1421516973 cmd/compile, internal/abi: add FuncPCABIxxx intrinsics
+ 2021-04-23 691e1b84c1 cmd/compile: generalize fix for lvalue-init evaluation
+ 2021-04-23 768a39975d cmd/go/internal/modload: remove the addedModuleFor map
+ 2021-04-23 c3e2ed711c cmd/go: use builtin version and reexec for env
+ 2021-04-23 d2f96f2f75 math/rand: make the security warning clearer and more prominent
+ 2021-04-23 8c66669764 cmd/compile: make sure ascompatee walk lhs init statements
+ 2021-04-23 d4bfe00615 cmd/go: make build cache tag sensitive to GOSSADIR; remove unused
+ 2021-04-23 bedfeed54a runtime,runtime/metrics: add metric to track scheduling latencies
+ 2021-04-23 105a6e9518 os: skip TestExecutableDeleted on aix
+ 2021-04-23 5963f0a332 cmd/vendor: get golang.org/x/tools@f946a157eef
+ 2021-04-23 d310b2a6b8 cmd/compile: set correct Defn for inlined vars
+ 2021-04-23 1b0a031680 cmd/compile: escape "go" wrapper closure everywhere
+ 2021-04-23 cfac62a1cc cmd/compile: fix bug in defer wrapping
+ 2021-04-23 14056d0d00 cmd/compile/internal/types2: add unsafe.Add and unsafe.Slice
+ 2021-04-23 050b408dcc go/types: implement unsafe.Add and unsafe.Slice
+ 2021-04-22 1da05eb0ce spec: add unsafe.Add and unsafe.Slice
+ 2021-04-22 74059685fd go/types: suppress index-out-of-bounds error on Unknown constants
+ 2021-04-22 f7afdfd483 go/types: cleanup and fix Checker.index
+ 2021-04-22 cfe5d79c5c os: depend on Readlink only when necessary
+ 2021-04-22 ecfce58965 runtime: skip work recheck for non-spinning Ms
+ 2021-04-22 b6ff3c69d5 cmd/link: support more load commands on Mach-O
+ 2021-04-22 1a5665533b cmd/go/internal/modload: migrate editBuildList to use a structured requirement graph
+ 2021-04-22 9c1b769d5f cmd/go: add a source file in the multiple-paths module in TestScript/mod_tidy_replace
+ 2021-04-22 537cde0b4b cmd/compile, runtime: add metadata for argument printing in traceback
+ 2021-04-22 d4aa72002e cmd/asm: fix RLDCR const1,reg,const2,reg on ppc64
+ 2021-04-22 e8666abd98 cmd/compile: keep call's args in elim dead auto pass
+ 2021-04-22 d3853fb4e6 runtime: call cgocallbackg indirectly
+ 2021-04-22 d5b2d809b0 cmd/link: emit LC_BUILD_VERSION on Mach-O
+ 2021-04-22 b2a032add8 cmd/link: update machoPlatform selection
+ 2021-04-22 a4f3ff2205 cmd/go: update TestScript/mod_convert
+ 2021-04-22 14a18b7d25 cmd/compile/internal/types2: move a handful of tests
+ 2021-04-22 a71528ad31 cmd/compile/internal/types2: review fixedbugs tests
+ 2021-04-22 ece5935364 cmd/compile/internal/types2: better errors for invalid short var decls
+ 2021-04-22 48b368b01f cmd/compile/internal/types2: avoid follow-on errors for invalid [...] array
+ 2021-04-22 617a83ec68 go/types: re-enable a commented out test
+ 2021-04-22 f0a8101d34 go/types: combine two loops (cleanup of TODO)
+ 2021-04-22 5daefc5363 cmd/internal/obj/arm64: fix the wrong ROR operator of some instructions
+ 2021-04-22 0636d88f6d cmd/compile: add restrictions on the shift amount range of arm64 various instructions
+ 2021-04-22 02a8e83661 runtime: don't run TestCrashDumpsAllThreads in parallel
+ 2021-04-21 7bedd47798 go/types: combine all type inference in a single function
+ 2021-04-21 6639bb894d runtime: call nanotimeQPC from nanotime1 normally
+ 2021-04-21 7e97e4e8cc syscall: syscall.AllThreadsSyscall signal handling fixes
+ 2021-04-21 54af9fd9e6 internal/bytealg: add power9 version of bytes index
+ 2021-04-21 122fca49f9 go/types: simplify Checker.Call
+ 2021-04-21 1d2101116f net: don't check nil err twice in interfaceMessages on freebsd
+ 2021-04-21 614a9c2613 go/types: simplify Checker.funcInst
+ 2021-04-21 39785912b9 go/types: add sizeof test
+ 2021-04-21 255056395e test: add a field tracking test
+ 2021-04-21 35806efda2 io/fs: document that caller can modify slice returned by ReadFile
+ 2021-04-21 b8a359d984 cmd/compile/internal/types2: fix incorrect result type of Checker.index
+ 2021-04-21 f9e2dbbfc9 syscall: use libc in Exec on openbsd/arm64
+ 2021-04-21 e5bc4f2a77 cmd/compile: reenable name preservation on copies in expand_calls
+ 2021-04-21 daee726a0b cmd/compile: don't accumulate duplicated named slots
+ 2021-04-21 4d56576ec0 runtime: move timer recheck after GC recheck
+ 2021-04-21 381252f312 cmd/go/internal/modload: use updateRequirements instead of editRequirements to add modules for missing packages
+ 2021-04-21 5f1df260a9 cmd/compile: allow export/import OSLICE2ARRPTR
+ 2021-04-21 7735ec96c1 cmd/compile: remove ir.OSTMTEXPR op
+ 2021-04-21 acf1b46de5 cmd/compile: update ir.Node ops comments
+ 2021-04-21 f53c2fac46 cmd/go/internal/modload: in newRequirements, verify that rootModules is sorted
+ 2021-04-21 69c94ad55f cmd/go/internal/modload: split updateRoots into separate functions for updating and tidying
+ 2021-04-21 81fcb18df5 cmd/go: make Tidy an option in PackageOpts rather than a separate call
+ 2021-04-21 c33ced6d8a runtime: don't test sig.inuse in sigsend
+ 2021-04-21 190cb937f7 cmd/compile/internal/types2: fix type inference
+ 2021-04-21 760d3b2a16 reflect: allow conversion from slice to array ptr
+ 2021-04-21 c18744377a go/types: allow conversion from slice to array ptr
+ 2021-04-21 faa4fa1a6e cmd/compile: allow conversion from slice to array ptr
+ 2021-04-20 1c268431f4 spec: allow conversion from slice to array ptr
+ 2021-04-20 e12b0afa54 cmd/compile: separate out parameter and field export encoding
+ 2021-04-20 48e3d92454 Revert "runtime: implement runqdrain() for GC mark worker goroutines"
+ 2021-04-20 c7d708e42e cmd/compile: pass struct field note information along in exported info
+ 2021-04-20 f448cb8ba8 cmd/compile: use f.Nname.Type() in makeABIWrapper
+ 2021-04-20 57b0d838ed net: pass MSG_CMSG_CLOEXEC in ReadMsgUnix on dragonfly, netbsd and openbsd
+ 2021-04-20 3f8e64878a internal/poll, net: fix comments regarding accept and sysSocket
+ 2021-04-20 dbade774c3 runtime: refactor findrunnable spinning recheck
+ 2021-04-20 7473a6a0eb reflect: fix stack overflow panic when using haveIdenticalUnderlyingType
+ 2021-04-20 fbb600b283 runtime: implement runqdrain() for GC mark worker goroutines
+ 2021-04-20 77860ad280 cmd/compile: guard partially live arg spilling with number of registers
+ 2021-04-20 109d7580a5 cmd/compile: disable name preservation on copies in expand_calls
+ 2021-04-20 60ab197bc2 runtime: refactor work stealing to dedicated function
+ 2021-04-20 9dd71ba913 internal/buildcfg: enable regabiargs by default
+ 2021-04-20 24875e3880 cmd/compile/internal/types2: fix some typos in rawLookupFieldOrMethod
+ 2021-04-20 4ce49b4a15 go/types: support type parameters in NewMethodSet
+ 2021-04-20 af8a176e91 internal/buildcfg: enable regabidefer by default
+ 2021-04-20 3ff6ff7f84 cmd/compile: preserve pointerness when creating map key temp
+ 2021-04-20 fe26dfadc3 net: use syscall.fcntl on libc systems
+ 2021-04-20 0ccdcb2102 runtime: crash the GC when clobberdead pointer is seen
+ 2021-04-20 4f5aec4603 all: remove redundant spaces before . and ,
+ 2021-04-20 9f87943424 go/types: fix panic when using multiple type arguments
+ 2021-04-19 3711ea0b5d cmd/compile: do not clobber arguments for reflect.callReflect and callMethod's ABI wrappers
+ 2021-04-19 b3a5640397 go/types: remove the concept of finals
+ 2021-04-19 62cad233a6 go/types: remove stale commented-out testdata
+ 2021-04-19 7252e1e5b6 cmd/link: convert -I foo to -Wl,--dynamic-linker,foo when externally linking
+ 2021-04-19 88655480f3 internal/buildcfg: enable regabireflect by default
+ 2021-04-19 bc5de81e70 testing: remove data races so that parallel benchmarks can safely call .Fatal* and .Skip*
+ 2021-04-19 e97d8eb027 net: pass MSG_CMSG_CLOEXEC flag in ReadMsgUnix
+ 2021-04-19 bbb510ccc9 internal/buildcfg: enable regabig by default
+ 2021-04-19 f8892147bd runtime: open up space for callee's arg spill slot in mcall (regabi version)
+ 2021-04-19 5780ab4f60 text/template/parse: add a mode to skip func-check on parsing
+ 2021-04-19 6b8e3e2d06 cmd/compile: reduce redundant register moves for regabi calls
+ 2021-04-19 b21e739f87 test: add test for CL 310589
+ 2021-04-19 a9c244a849 test: add liveness test for regabi
+ 2021-04-19 a72622d028 cmd/compile: skip "_" function in reflectdata.MarkUsedIfaceMethod
+ 2021-04-19 c914e6160d cmd/go: drop GOEXPERIMENT in script tests
+ 2021-04-18 4efd581383 archive/zip: fix imports block of biggestZipBytes generator
+ 2021-04-17 fd3612e433 internal/buildcfg: enable regabiwrappers by default
+ 2021-04-16 43466399cb internal/buildcfg: make regabi enable regabiargs
+ 2021-04-16 067bad2eef runtime: update stale comment
+ 2021-04-16 14dbd6e776 internal/buildcfg: make regabi an alias for regabi sub-experiments
+ 2021-04-16 94817890c2 runtime: remove useless nFlushCacheRoots
+ 2021-04-16 b05903a9f6 cmd/link: fix defaultGOROOT package
+ 2021-04-16 b65f8589e8 cmd/dist: defend self against misc/reboot test
+ 2021-04-16 02a2ff47ef go/parser: add a SkipObjectResolution mode to bypass object resolution
+ 2021-04-16 b91f8a4c0b go/scanner: fix a typo in scanner_test.go
+ 2021-04-16 9e8a312b71 go/parser: move type params in scope for the function signature
+ 2021-04-16 13368ab56a runtime: clarify which work needs spinning coordination
+ 2021-04-16 800fb11efb runtime: remove redudant tryWakeP component
+ 2021-04-16 f6e7fe2711 runtime: move findrunnable timer delay computation closer to use
+ 2021-04-16 9fbcba6664 cmd/compile: in clobberdead mode, don't clobber slots that are live for defers
+ 2021-04-16 4fb74e0555 reflect: preserve ctxt across moveMakeFuncArgPtrs
+ 2021-04-16 b6e1c33603 cmd/compile: spill all the parameters around morestack
+ 2021-04-16 fff236e659 net/http/fcgi: eliminate race, keep request id until end of stdin
+ 2021-04-16 ef57834360 crypto/tls: fix flaky handshake cancellation tests
+ 2021-04-16 dba89283ad cmd/go, go/build: add ToolTags to build.Default
+ 2021-04-16 95ed5c3800 internal/buildcfg: move build configuration out of cmd/internal/objabi
+ 2021-04-16 2fc0ebb623 cmd/go/internal/modload: when outside a module, set cfg.BuildMod based on allowMissingModuleImports
+ 2021-04-16 c1e8a9a8c6 net/http/cgi: Remove hard-coded ServeHTTP timeout
+ 2021-04-16 492eb059f9 cmd/go: fix mod_install_pkg_version
+ 2021-04-16 60abe01321 cmd/link: fix file-local checks in xcoff
+ 2021-04-16 acb189ea59 net/http: make ReadRequest return an error when requests have multiple Host headers
+ 2021-04-16 2f0e5bf907 net/http: using errors.Is in fs error detection
+ 2021-04-16 abbb82957d cmd/compile: don't insert VarDef for already-initialized results
+ 2021-04-16 04e1176fd2 cmd/go: support 'go run cmd@version'
+ 2021-04-16 639cb1b629 runtime: mark stdcallN functions cgo_unsafe_args
+ 2021-04-16 0613c748e8 cmd/go: move 'go install cmd@version' code into internal/load
+ 2021-04-16 dc76c47565 cmd/go/internal/load: convert two global flags to an options struct
+ 2021-04-16 cde92846e2 doc: add release note for module deprecation
+ 2021-04-16 52df9291aa test/abi: reenable test on windows
+ 2021-04-16 c692f752b5 cmd/link/internal/ld: re-enable tests on darwin
+ 2021-04-16 e1f4feb3d6 cmd/link/internal/ld: fix GOARCH in TestAbstractOriginSanityIssue25459
+ 2021-04-16 d26fc68aa1 cmd/internal/objabi,test: use correct GOEXPERIMENT build tags in test/run.go
+ 2021-04-16 cf2396c70e internal/goexperiment: move baseline configuration to objabi
+ 2021-04-16 f08c552dab net/http: add to deadlines only when positive
+ 2021-04-16 bdddfd10ec runtime: improve synchronization in TestFinalizerRegisterABI
+ 2021-04-15 c8fb0ec5a0 cmd/compile: fix ANDI/SRWI merge on ppc64
+ 2021-04-15 699a7c0fe9 cmd/go/internal/modconv: involve GOPROXY in ConvertLegacyConfig
+ 2021-04-15 7ed6d1f2fb cmd/compile/internal/types2: add sizeof test
+ 2021-04-15 a63ff398d5 cmd/compile/internal/syntax: fix error message for ... without type
+ 2021-04-15 ddd8d7c0a6 cmd/internal/obj: consolidate AMOVW and AMOVWZ optab entries
+ 2021-04-15 8009a81f7a bytes: add asm implementation for index on ppc64x
+ 2021-04-15 5631c4b3bf net/http: allow multiple dials in TestTransportMaxConnsPerHost
+ 2021-04-15 1d20a362d0 math: avoid assembly stubs
+ 2021-04-15 31e12b953a cmd/link: issue error if elf header overruns
+ 2021-04-15 7ad496b6f5 runtime: unify C->Go ABI transitions
+ 2021-04-15 dba2eab826 runtime,runtime/cgo: save all necessary registers on entry to Go on Windows
+ 2021-04-15 3e0b1cdb5d runtime: minor refactoring of _rt0_amd64_lib
+ 2021-04-15 b1c4cc5589 mime: keep builtinTypesLower sorted alphabetically
+ 2021-04-15 61a08fc6ce strconv: Implement Ryū algorithm for ftoa shortest mode
+ 2021-04-15 0184b445c0 strconv: implement Ryū-like algorithm for fixed precision ftoa
+ 2021-04-15 8f4c5068e0 internal/bytealg: port more performance-critical functions to ABIInternal
+ 2021-04-15 48b7432e3f cmd/internal/obj/arm64: fix the wrong sp dst register of ADDS/SUBS instructions
+ 2021-04-15 566a87c16b time: add missing "os" import to zoneinfo_test.go
+ 2021-04-15 083a26c7d2 cmd/compile: propagate pragmas from generic function to stenciled implementation
+ 2021-04-15 bf634c76b2 cmd/compile: look for function in instantiations in all global assignments
+ 2021-04-14 567a9322ad mime: add mime type for avif image file format
+ 2021-04-14 d27bb8ba2e go/build: replace os.Setenv with T.Setenv
+ 2021-04-14 f18715c18f time: replace os.Setenv with T.Setenv
+ 2021-04-14 c3931ab1b7 net/http/httptest: panic on non-3 digit (XXX) status code in Recorder.WriteHeader
+ 2021-04-14 cbf9caaf22 cmd/go: add a Go source file in TestScript/mod_sumdb
+ 2021-04-14 23f8c203f0 cmd/compile: rework/reduce partially lived argument spilling
+ 2021-04-14 1a8f0a7961 runtime: fix data race in abi finalizer test
+ 2021-04-14 a89ace106f runtime: update debug call protocol for register ABI
+ 2021-04-14 de7a87ef06 go/internal/gccgoimporter: replace os.MkdirTemp with T.TempDir
+ 2021-04-14 d1f8104b58 time: move slim test tzdata to testdata directory
+ 2021-04-14 b161b57c3f go/build: replace os.MkdirTemp with T.TempDir
+ 2021-04-14 892cad7a9b cmd/compile/internal/types2: add Named.SetTParams and Named.Orig methods
+ 2021-04-14 283f9fdbd3 cmd/dist: add tests using the typeparams build tag
+ 2021-04-14 bcbde83c20 go/ast: fix broken build with typeparams build constraint
+ 2021-04-14 492faaeda8 os/exec: replace os.Setenv with T.Setenv
+ 2021-04-14 4df3d0e4df cmd/compile: rescue stmt boundaries from OpArgXXXReg and OpSelectN.
+ 2021-04-14 4480c822ba cmd/internal/obj: don't emit args_stackmap for ABIInternal asm funcs
+ 2021-04-14 25b25a9ed7 cmd/asm: require NOSPLIT for ABIInternal asm functions
+ 2021-04-14 ef36e4fd0e reflect: keep pointer register results alive in callMethod
+ 2021-04-14 ad44dfb0fd cmd/go: clarify comment on HashSeed
+ 2021-04-14 c98026c104 cmd/go/internal/modload: fix truncated error message from goModDirtyError
+ 2021-04-14 72483de87a runtime: incorporate hbits advancement in scanobject into loop
+ 2021-04-14 7ec7a3cf33 runtime: make gcEffectiveGrowthRatio a method on gcControllerState
+ 2021-04-14 e9cc31e736 runtime: pass work.userForced to gcController.endCycle explicitly
+ 2021-04-14 3eaf75c13a runtime: move next_gc and last_next_gc into gcControllerState
+ 2021-04-14 e224787fef runtime: fix formatting of gcMark
+ 2021-04-14 82e4a6310b runtime: move roots' bases calculation to gcMarkRootPrepare
+ 2021-04-14 ab02cbd29f runtime: increase maxargs to avoid syscall18 crash when called with more than 16 args
+ 2021-04-14 58fdac04e4 syscall: don't defer close raw Socketpair fds in tests
+ 2021-04-14 6d8ba77896 cmd/compile: fix importing of method expressions
+ 2021-04-14 e7ab1a5ba8 runtime: create setGCPercent method for gcControllerState
+ 2021-04-14 9bce7b70fd runtime: create initializer for gcControllerState
+ 2021-04-14 2d4ba2601b runtime: move gcPercent and heapMinimum into gcControllerState
+ 2021-04-14 728e3dc6f9 runtime: make gcSetTriggerRatio a method of gcControllerState
+ 2021-04-14 eb433ed5a2 cmd/compile: set types properly for imported funcs with closures
+ 2021-04-14 8dcc071063 cmd/compile/internal/types2: use a global atomic counter for type parameter ids
+ 2021-04-13 34620364cb runtime, cgo/test: improve debugging output
+ 2021-04-13 f2d5bd1ad3 runtime: move internal GC statistics from memstats to gcController
+ 2021-04-13 8c2a8b1771 cmd/compile: always zero the temporary in mapKeyTemp
+ 2021-04-13 b4881d930a cmd/compile: don't modify underlying type when creating bitmap for bodyless function
+ 2021-04-13 efaf75a216 go/*,cmd/gofmt: guard AST changes with the typeparams build tag
+ 2021-04-13 693859542e runtime: rename gcpercent, readgogc, and heapminimum to match Go style
+ 2021-04-13 f5f7647107 runtime: break out GC pacer into its own file
+ 2021-04-13 9913f821e2 cmd/compile: make map functions ABI insensitive
+ 2021-04-13 c19759aa48 runtime: eliminate externalthreadhandler
+ 2021-04-13 e69f02265c runtime: use newm for profileloop
+ 2021-04-13 e512bc2cf0 runtime: use compileCallback for ctrlhandler
+ 2021-04-13 069983e5db archive/tar: replace os.MkdirTemp with T.TempDir
+ 2021-04-13 3bf645a633 cmd/link: force external linking for DragonFly cgo programs
+ 2021-04-13 69262d4871 cmd/compile,cmd/link: resolve cgo symbols to the correct Go ABI
+ 2021-04-13 48531da9e7 cmd/link: build dynexp symbol list directly
+ 2021-04-13 007e247af1 cmd/link: move cgo export map from loadcgo to setCgoAttr
+ 2021-04-13 6208b10d1e cmd/link: refactor setCgoAttr
+ 2021-04-13 10f883deb7 cmd/cgo: document generated cgo directives
+ 2021-04-13 7b19fb1d56 mime: in globs2 file only keep first time extension is seen
+ 2021-04-13 39dd96ca5a cmd/compile/internal/types: add example test for type inference
+ 2021-04-13 4b00eb7af4 cmd/compile: allow OpArgXXXReg comes before LoweredGetClosurePtr
+ 2021-04-13 444d28295b test: make codegen/memops.go work with both ABIs
+ 2021-04-13 13a4e8c41c all: simplify the spelling of Linux
+ 2021-04-13 3e5bba0a44 cmd/link: support 32b TLS_LE offsets on PPC64
+ 2021-04-13 d948b8633d cmd/go: fix 'go help mod edit' JSON documentation
+ 2021-04-12 49e933fc57 cmd/compile: make interface conversion function selection ABI insensitive
+ 2021-04-12 841bc14216 os: restore testErrNotExist's working directory on os.Chdir success
+ 2021-04-12 263e13d1f7 test: make codegen tests work with both ABIs
+ 2021-04-12 3d5e3a15f6 debug/pe: replace os.MkdirTemp with T.TempDir
+ 2021-04-12 c27991bf5b text/template: replace os.MkdirTemp with T.TempDir
+ 2021-04-12 cccd3ba912 internal/execabs: replace ioutil.WriteFile with os.WriteFile
+ 2021-04-12 aad13cbb74 runtime: non-strict InlTreeIndex lookup in expandFinalInlineFrame
+ 2021-04-12 5c9b6e8e63 net: never probe IPv4 map support on DragonFly BSD, OpenBSD
+ 2021-04-12 3e8ba91275 mime: support reading shared mime-info database on unix systems
+ 2021-04-12 1b736b3c19 runtime: consolidate "is sweep done" conditions
+ 2021-04-12 a25a77aed2 runtime: block sweep completion on all sweep paths
+ 2021-04-12 07b2fee460 cmd/link: fix TestLargeText
+ 2021-04-12 849dba07a5 runtime: port performance-critical functions to regabi
+ 2021-04-12 865d2bc78e cmd/compile: do not allocate space for unspilled in-register results
+ 2021-04-12 8b859be9c3 internal/poll: ensure that newPoolPipe doesn't return a nil pointer
+ 2021-04-12 2fa7163b06 cmd/compile: look for newobject in register ABI for write barrier elision
+ 2021-04-12 5d80f8a82b runtime: replace outdated documentation link in Windows' nanotime
+ 2021-04-12 33d99905da cmd/compile: preserve name association when eliding copies in expand_calls
+ 2021-04-12 70ed28e5f7 cmd/compile: support memmove inlining with register args
+ 2021-04-12 585b52261c runtime: remove deferreturn dummy argument
+ 2021-04-12 9ed0e32059 test: consider default GOEXPERIMENT when matching build tags
+ 2021-04-12 51a47b7ff2 cmd/go: display helpful error when module cache can't be created
+ 2021-04-12 117b1c84d3 cmd/go/internal/work: remove '_test' from import paths in stacktraces when -trimpath is specified
+ 2021-04-12 c26f954a54 cmd/compile/internal/amd64: follow-on regabi fix for amd64 zerorange
+ 2021-04-12 16cd770e06 cmd/cgo: throw if C.malloc returns NULL in C.CString or C.CBytes
+ 2021-04-12 954bd8203b cmd/cgo: use tabs to indent _cgoPREFIX_Cfunc__CMalloc function body
+ 2021-04-12 e12abe4bd6 net: fix (*ipStackCapabilities).probe godoc
+ 2021-04-12 7beb988a3b runtime: using wyhash for memhashFallback on 64bit platform
+ 2021-04-12 424abc8d3b os/signal: replace os.MkdirTemp with T.TempDir
+ 2021-04-11 0da9eff503 runtime: simplify syntax for pointer arithmetic in mapaccess functions
+ 2021-04-11 352d329c44 runtime: move zero-sized frame check from newproc to newproc1
+ 2021-04-11 189c6946f5 net: reference the correct RFCs and sections for IP.IsPrivate
+ 2021-04-10 3f4977bd58 cmd/compile/internal/types2: use combined type and ordinary args for type inference
+ 2021-04-10 a6d95b4508 cmd/compile/internal/types2: split out function instantiation from index expr
+ 2021-04-10 36c5f902f9 cmd/compile/internal/types2: factor out index/slice expr handling
+ 2021-04-10 4638545d85 cmd/compile/internal/syntax: accept "~" and "|" interface elements
+ 2021-04-10 1129a60f1c cmd/compile: include typecheck information in export/import
+ 2021-04-10 11f159456b path/filepath: replace os.MkdirTemp with T.TempDir
+ 2021-04-10 6382ec1aba internal/poll: fix the intermittent build failures with pipe pool
+ 2021-04-10 52bf14e0e8 all: fix spellings
+ 2021-04-09 554d2c4f06 reflect: panic on New of go:notinheap type
+ 2021-04-09 5305bdedb0 test: do not run (another) softfloat test with regabiargs
+ 2021-04-09 281d168e2d cmd/compile: don't set Ntype in noder2 anymore
+ 2021-04-09 756e2b1529 cmd/internal/objabi: make GOEXPERIMENT=none mean "no experiment flags"
+ 2021-04-09 c3faff7f2d cmd/go/internal/modload: change mvsReqs to store roots instead of a full build list
+ 2021-04-09 814c5ff138 cmd/go: support module deprecation
+ 2021-04-09 952187af12 cmd/go: upgrade and vendor golang.org/x/mod
+ 2021-04-09 fcf8a6640b cmd/compile/abi-internal: declare R14 completely fixed
+ 2021-04-09 0ad46889a1 cmd/compile/abi-internal: declare X15 scratch in function bodies
+ 2021-04-09 2698be4905 runtime: use sigpanic0 on all OSes
+ 2021-04-09 d11968012c test/abi: disable test with old-style build tag known to run.go
+ 2021-04-09 6951da56b0 Revert "cmd/compile: ensure spills of int/float reg args land in abi slots"
+ 2021-04-09 77b3269fb5 cmd/go: in TestScript, set GOTRACEBACK and use SIGQUIT to terminate hung subprocesses
+ 2021-04-09 a690a5d75f cmd/compile: ensure spills of int/float reg args land in abi slots
+ 2021-04-09 d138ee2cfb test/abi: disable test on windows for now
+ 2021-04-09 dcc801ef81 cmd/go/internal/modload: actually set the depth field passed to newRequirements
+ 2021-04-09 c432917061 cmd/link: link libgcc archive after mingw archives
+ 2021-04-09 519f223aa2 cmd/compile: reduce overhead of RParams in types.Type
+ 2021-04-09 4d7d7a4c50 os: replace os.MkdirTemp with T.TempDir
+ 2021-04-09 8518aac314 crypto/x509: replace os.MkdirTemp with T.TempDir
+ 2021-04-09 d25c4fbe05 test: do not run softfloat test with regabiargs
+ 2021-04-09 19034fa855 cmd/objdump: update test with register ABI
+ 2021-04-08 5811605df9 cmd/go: fix mod_list_update_nolatest on windows
+ 2021-04-08 d67e739989 os/exec: replace os.MkdirTemp with T.TempDir
+ 2021-04-08 ec367e5b05 cmd/compile: adjust interface conversion function selection with 0-sized fields
+ 2021-04-08 6c98ecda10 cmd/compile: don't use fast32/64 map functions for aggregates
+ 2021-04-08 a9e475a15a cmd/compile: add recursive-invalidate Value method, use in expand_calls
+ 2021-04-08 7e583806d8 runtime/cgo: clarify Handle documentation
+ 2021-04-08 bb76193a7f cmd/compile: fix buglet in walk convert phase relating to convF32/64
+ 2021-04-08 793844207d cmd/go: strip GOEXPERIMENT from hash salt
+ 2021-04-08 98dd205fa4 runtime: see whether gp==nil before checking preemption state
+ 2021-04-08 46ffbec1d6 cmd/compile: break out transformations of tcCompLit into transformCompLit
+ 2021-04-08 ecca94a7d1 cmd/go/internal/modload: add a dormant depth type
+ 2021-04-08 96a6745088 runtime: use register ABI in panicIndex/Slice functions
+ 2021-04-08 ca8540affd cmd/compile: fix buglet in walk convert phase relating to convT64
+ 2021-04-08 d474b6c824 test/abi: clean up test to fix builders
+ 2021-04-08 23e1d36a87 cmd/go: in 'go list -m', ignore "not found" errors loading updates
+ 2021-04-08 0e09e4143e cmd/go: assume Go 1.16 semantics uniformly for unversioned modules
+ 2021-04-08 31d2556273 runtime: set up read-only dummy TLS space for needm on Windows
+ 2021-04-08 283b02063b cmd/compile: sanitize before/after expansion OpSelectN references
+ 2021-04-08 1be8be4acc cmd/go: fix TestNewReleaseRebuildsStalePackagesInGOPATH
+ 2021-04-08 912c4e29d3 reflect: fix typo in result-in-registers case
+ 2021-04-08 1749f3915e sync: update misleading comment in map.go about entry type
+ 2021-04-08 a7e16abb22 runtime: replace os.MkdirTemp with T.TempDir
+ 2021-04-08 2123dfba65 Revert "cmd/compile/internal/noder: limit the number of goroutine"
+ 2021-04-08 8752454ece cmd/internal/objabi: clarify initialization of Experiments
+ 2021-04-08 5159c83641 runtime,cmd/link: include GOEXPERIMENTs in runtime.Version(), "go version X"
+ 2021-04-08 a8e55538af cmd/internal/objabi: make GOEXPERIMENT be a diff from default experiments
+ 2021-04-08 89ca1ce9a8 cmd/compile,cmd/internal/objabi: abstract out object header string
+ 2021-04-08 b675e52e95 internal/goexperiment: consolidate experiment-enabled constants
+ 2021-04-08 6304b401e4 internal/goexperiment,cmd: consolidate GOEXPERIMENTs into a new package
+ 2021-04-08 0c4a08cb74 cmd/asm,runtime: reduce spellings of GOEXPERIMENTs
+ 2021-04-08 aeaa4519b5 runtime: drop haveexperiment, sys.GOEXPERIMENT
+ 2021-04-07 f60aa7a18c syscall: replace os.MkdirTemp with T.TempDir
+ 2021-04-07 fca51ba24a cmd/internal/obj: remove ppc64 msr support from MOV* insns
+ 2021-04-07 e306d06063 runtime/map: update comment for gc/reflect
+ 2021-04-07 b3064b66d0 cmd/compile/internal/types2: combine two loops (cleanup of TODO)
+ 2021-04-07 4520da486b cmd/pack: use testing.T.TempDir in tests
+ 2021-04-07 b55d900529 cmd/compile: correct argument area size for typedmemmove/typedmemclr
+ 2021-04-07 d6aa162f30 embed, testing/fstest: small optimization for ReadDir
+ 2021-04-07 5d5f779db4 net/http: replace os.MkdirTemp with T.TempDir
+ 2021-04-07 4bbe046aad cmd/compile/internal/syntax: add "~" operator
+ 2021-04-07 836356bdaa cmd/compile/internal/types2: process errors in src order during testing
+ 2021-04-07 8f1099b585 cmd/compile/internal/syntax, types2: move cmpPos to pos.Cmp
+ 2021-04-07 1395432f23 cmd/compile/internal/types2: remove Config.AcceptMethodTypeParams flag
+ 2021-04-07 7d5c54eee4 cmd/compile/internal/types2: remove Config.InferFromConstraints flag
+ 2021-04-07 bce85b7011 cmd/compile/internal/types2: combine all type inference in a single function
+ 2021-04-07 8462169b5a cmd/compile: pre-spill pointers in aggregate-typed register args
+ 2021-04-07 8d77e45064 cmd/compile: fix bug of conditional instructions on arm64
+ 2021-04-06 972e883925 runtime/cgo: add Handle for managing (c)go pointers
+ 2021-04-06 b084073b53 reflect: refactor funcLayout tests
+ 2021-04-06 0a510478b0 runtime: use register ABI for race detector functions
+ 2021-04-06 7da8490cbb path/filepath: replace os.MkdirTemp with T.TempDir
+ 2021-04-06 0bc4605ead cmd/go/internal/modload: track conflicts in versionLimiter
+ 2021-04-06 b56177a303 cmd/compile: check for unused OpArg* and mark invalid (again)
+ 2021-04-06 f5efa5a313 cmd/compile: load results into registers on open defer return path
+ 2021-04-06 bcc4422ee1 runtime: deflake TestGCTestIsReachable
+ 2021-04-06 1271e9a9cc time: properly quote strings containing quotes and backslashes
+ 2021-04-06 2e6f39beb0 cmd/go/internal/modload: factor out a method to update loader requirements
+ 2021-04-06 d6a90d06d2 cmd/compile/internal/types2: simplify Checker.Call
+ 2021-04-06 3a30381b21 cmd/compile/internal/types2: simplify Checker.funcInst
+ 2021-04-06 93466cc1b6 cmd/compile/internal/types2: review of pos.go and move into syntax package
+ 2021-04-06 d57189e92b test/syntax: remove interface.go
+ 2021-04-06 55bac87bd6 runtime/pprof: deflake TestMorestack
+ 2021-04-06 b345a306a0 cmd/compile: when GOSSAFUNC is set, dump the current pass on crash
+ 2021-04-06 939b561a6e cmd/internal/obj: reorg ppc64 MOV* optab entries and remove unused classes
+ 2021-04-06 5cd8a34495 cmd/compile: fix gcSizes.Sizeof for a zero-sized struct
+ 2021-04-06 84162b8832 cmd/compile/internal/typecheck: call tcConv directly
+ 2021-04-06 a25c584629 os: implement fs.StatFS for os.DirFS
+ 2021-04-06 d8306ee1f9 runtime: make reflectcall ABI0 on amd64
+ 2021-04-06 298975c634 runtime: use funcID to identify abort in isAbortPC
+ 2021-04-05 b2389ad3ce cmd/compile: fix for zerorange on plan9-amd64
+ 2021-04-05 d446cb7cff reflect: call ABI0 callReflect/callMethod
+ 2021-04-05 0723f062ff cmd/compile: enable panic+recover adjustment for some ABI wrappers
+ 2021-04-05 79b2e14b1a crypto/ed25519: add comprehensive edge-case test vectors
+ 2021-04-05 27015152ec flag: use strings.Builder instead of concatenating strings
+ 2021-04-05 ee40bb666b cmd/compile: add "surprised by IData of Arg" case for register args
+ 2021-04-05 254fb85c12 cmd/go: print deprecation notice for 'go get cmd'
+ 2021-04-05 d5b9dc1317 cmd/cgo: pass end position info for C function arguments.
+ 2021-04-05 e985245cd5 net: make ErrClosed and ParseError implement net.Error
+ 2021-04-05 a1a45afd4a cmd/internal/obj: remove duplicate ppc64 spr MOV* optab entries
+ 2021-04-05 a11244e95e time: use offset and isDST when caching zone from extend string
+ 2021-04-05 cf148f3d46 cmd/compile, runtime: use ABI-aware function converting float to interface
+ 2021-04-05 a040ebeb98 all: update references to symbols moved from io/ioutil to io
+ 2021-04-05 9abedf4827 cmd/compile/internal/ssagen: conditon not need
+ 2021-04-05 5cc5576a9c cmd/compile: untangle Wrapper and ABIWrapper flags
+ 2021-04-05 45e87cd3ec cmd/compile: disable tail call for method wrappers when RegabiArgs is enabled
+ 2021-04-05 411860251e cmd/compile: reference ABIInternal memequal_varlen
+ 2021-04-05 e617b2b0dd cmd/compile: add a debug flag to enable/disable open-coded defers
+ 2021-04-05 dcf85b30ba cmd/link: mangle function name with ABI on Mach-O
+ 2021-04-05 9e3328e740 cmd/internal/objabi: remove StackPreempt
+ 2021-04-05 191167c2b2 cmd/internal/obj/s390x: simplify huge frame prologue
+ 2021-04-05 042f4cbb6f cmd/internal/obj/riscv: simplify huge frame prologue
+ 2021-04-05 a06b08e7d1 cmd/internal/obj/ppc64: simplify huge frame prologue
+ 2021-04-05 2b63404ddb cmd/internal/obj/mips: simplify huge frame prologue
+ 2021-04-05 4702dd67a7 cmd/internal/obj/arm64: simplify huge frame prologue
+ 2021-04-05 24dd8cfe23 cmd/internal/obj/arm: simplify huge frame prologue
+ 2021-04-05 ef3122e909 cmd/internal/obj/x86: simplify huge frame prologue
+ 2021-04-05 af1789a61c runtime: extend internal atomics to comply with sync/atomic
+ 2021-04-05 a4b8241d97 cmd/compile: get rid of Fields in types.Interface, use allMethods in types.Type instead
+ 2021-04-05 6ed045b365 cmd/go: refactor modload.CheckRetractions
+ 2021-04-05 ee51e3d895 cmd/go: refactor modload.ListModules to accept bit flags
+ 2021-04-04 4230a6ebdd os: don't use T.Cleanup in TestRemoveAllLongPath
+ 2021-04-04 7bfd681c2f runtime/pprof: skip tests for AIX
+ 2021-04-04 776d8d387c os, path/filepath: use T.Cleanup to restore the original working directory
+ 2021-04-03 9e7bc80b31 os: reuse readdir buffers on unix with a sync.Pool
+ 2021-04-03 dac136f87b archive/zip: fix character device handling in fileModeToUnixMode
+ 2021-04-03 971c7154b0 io/fs: implement subFS.Sub
+ 2021-04-03 6986c02d72 cmd/compile: rename newNamedTypeWithSym, add some commemnts
+ 2021-04-03 fe587ce856 cmd/dist: include "go1.x-" in devel go version strings
+ 2021-04-03 01821137c2 cmd/compile/internal/types2: review of errors.go
+ 2021-04-03 93dcaba119 cmd/compile/internal/types2: review of stmt.go
+ 2021-04-03 a1e4657d5a cmd/compile/internal/types2: review of check_test.go
+ 2021-04-03 6454b2720f cmd/compile/internal/types2: review of resolver.go
+ 2021-04-02 2ebe77a2fd cmd/internal/obj: use REGENTRYTMP* in a few more places
+ 2021-04-02 f25d78f8e2 testing: clarify when Cleanup is called
+ 2021-04-02 35a8bbc9ea runtime: make concatstring{2,3,4,5} consistent w/ compiler's use
+ 2021-04-02 41cf18eda7 reflect: fix methodValueCall frame size on mips64
+ 2021-04-02 34b87b4a1a reflect: remove short-circuits for zero-sized types in ABI algorithm
+ 2021-04-02 254948a50e cmd/compile: mark unused values as invalid to prevent problems in expandCalls
+ 2021-04-02 28c5fed557 reflect: add register ABI support for makeFuncStub and methodValueCall
+ 2021-04-02 6996bae5d1 cmd/compile: use ABI0 for cgo_unsafe_args functions
+ 2021-04-02 759116b3ac syscall: delete asm_windows.s
+ 2021-04-02 2d88f8f21e go/src/cmd/go/internal/work: compile "internal/abi" with "-+"
+ 2021-04-02 3651eff74e cmd/link: delete CompilationUnit.Pkg field
+ 2021-04-02 b165085836 cmd/link: remove an unused function from linker dwarf gen
+ 2021-04-02 a78b12aea7 cmd/link: remove unnecessary attrReachable test
+ 2021-04-02 aebc0b473e cmd/compile: fix bug in phiopt pass
+ 2021-04-02 97b3ce430b runtime: make gcTestMoveStackOnNextCall not double the stack
+ 2021-04-02 41e8a9f1cf runtime: fix TestGCTestMoveStackOnNextCall flakes
+ 2021-04-02 5579ee169f cmd/compile: in expand calls, preserve pointer store type but decompose aggregate args
+ 2021-04-01 27d306281c reflect,runtime: assume register ABI with GOEXPERIMENT=regabiargs
+ 2021-04-01 51cd074c59 reflect: undo register count increments on register assignment failure
+ 2021-04-01 45ca9ef5c1 cmd/compile: fix register/offset calculation for trailing empty field case.
+ 2021-04-01 e6ac2df2b1 net/url: use camelCase names
+ 2021-04-01 5f646f0a98 cmd/compile: fix parameter offset calculation
+ 2021-04-01 ec721d92bf runtime: fix uses of ABIInternal PCs in assembly
+ 2021-04-01 1f29e69bad cmd/compile: fix outgoing calls with GOEXPERIMENT=regabiargs
+ 2021-04-01 3304b2235a cmd/compile: fix incoming ABI with GOEXPERIMENT=regabiargs
+ 2021-03-31 87c6fa4f47 cmd/internal/obj/x86: use ABI scratch registers for WRAPPER prologue
+ 2021-03-31 5d6581d747 cmd/compile: deduplicate OpArg's across types
+ 2021-03-31 4acefa07b1 go/parser: switch to resolving objects as a post-processing pass
+ 2021-03-31 44dd06670f runtime: support register ABI Go functions from Windows callbacks
+ 2021-03-31 cb42e3e979 cmd/compile: schedule in-register OpArg first
+ 2021-03-31 46fa8afca6 cmd/go/internal/load/test: parse overlay files for test functions
+ 2021-03-31 ca3aefc4a9 cmd/compile: make expandCalls preserve types of pointer stores
+ 2021-03-31 c847932804 runtime: replace reflectcall of defers with direct call
+ 2021-03-31 135c9f45ec cmd/compile/internal/types2: review of operand.go
+ 2021-03-31 34fb2b2ed5 cmd/compile/internal/types2: review of decl.go
+ 2021-03-31 0e8a72b62e runtime: check for sysAlloc failures in pageAlloc
+ 2021-03-31 c93cd86149 net/http: use consistent case in URL in names
+ 2021-03-31 1d8abb3417 go/parser: remove redundant list argument to Parser.shortVarDecl
+ 2021-03-31 152ca79b73 go/parser: add resolution tests for type params
+ 2021-03-31 6d2a557a4d cmd/compile: deal with call.Use correctly for noder2, allow inlining of stenciled functions
+ 2021-03-31 f2717b31b5 cmd/compile: deal correctly with unnamed function params during stenciling
+ 2021-03-30 606e0aba74 go/ast: add missing handling for ListExpr in Walk
+ 2021-03-30 c3ec79bca9 go/parser: resolve the type name when parsing a composite lit value
+ 2021-03-30 0fdd371e6b go/parser: add data-driven tests for object resolution
+ 2021-03-30 64ca7e2cb3 cmd/compile: avoid generating duplicated in-register Arg
+ 2021-03-30 4b1a24f3cd runtime: fix G passed to schedEnabled and cleanup
+ 2021-03-30 e0ce0af6ef runtime: check that defer/go frames are empty
+ 2021-03-30 1318fb4a32 cmd/compile: handle partial type inference that doesn't require function args
+ 2021-03-30 3300390ec7 cmd/compile: make amd64 version of zerorange regabi-friendly
+ 2021-03-30 c40dc677be go/doc: avoid panic on references to functions with no body
+ 2021-03-30 6cadfe2fee reflect: cache IsVariadic calls in Call
+ 2021-03-30 43afb1a220 cmd/go: fix documentation on how to create new go.mod file
+ 2021-03-30 89b141c06e cmd/compile: emit writebarriers in specified ABI
+ 2021-03-30 c274a7c03b cmd/compile/internal/noder: limit the number of goroutine
+ 2021-03-30 e4a4161f1f runtime: non-strict InlTreeIndex lookup in Frames.Next
+ 2021-03-30 a81b5e4d0a crypto/elliptic: fix some typos
+ 2021-03-30 032ef4bbfc cmd/compile: fix creation of named generic types (setting of t.nod)
+ 2021-03-30 bb2fc21c3b runtime: fix typos in comments
+ 2021-03-30 33945869c1 cmd/compile: update default ABI choices for calls and bodyless fn stack maps
+ 2021-03-30 eeadfa2d38 cmd/compile: fix various small bugs related to type lists
+ 2021-03-30 a95454b6f3 runtime: init plan9 hashkey by time
+ 2021-03-30 06ad41642c cmd/compile: wrap defer/go call with results
+ 2021-03-30 e27f3966bb cmd/compile: be sure to wrap defer/go calls with arguments
+ 2021-03-30 bd6628e62d cmd/compile: check deferred nil interface call before wrapping it
+ 2021-03-29 4e1bf8ed38 runtime: add GC testing helpers for regabi signature fuzzer
+ 2021-03-29 1ef114d12c runtime: abstract specials list iteration
+ 2021-03-29 4e16422da0 cmd/internal/obj/ppc64: remove bogus MOVBU optab entry
+ 2021-03-29 164a6265e7 go/types: remove use of ioutil (cleanup)
+ 2021-03-29 9fbd0f64d8 runtime: fix some typos
+ 2021-03-29 67d565d281 cmd/compile: restructure ABI wrapper generation, export ABI
+ 2021-03-29 feb844f1ea cmd/compile: eliminate -abiwraplimit
+ 2021-03-29 1e8fff0f7b cmd/compile: assert that function values reference ABIInternal
+ 2021-03-29 0d1423583b cmd/compile: set ir.Name.Func in more cases
+ 2021-03-29 33b4ffc357 cmd/compile: track funcsyms by ir.Name instead of types.Sym
+ 2021-03-29 2ba296da47 cmd/compile: update a few stale comments
+ 2021-03-29 24764496c7 go/types: remove outdated comment
+ 2021-03-29 1a7d921aa5 cmd/compile: remove typechecker calls in varDecl()
+ 2021-03-29 2abf280a28 cmd/compile/internal/types2: remove 'strict' argument from several methods
+ 2021-03-29 8f676144ad crypto/rsa: fix salt length calculation with PSSSaltLengthAuto
+ 2021-03-29 565e70fcef cmd/link/internal/ld: use linkerFlagSupported to check -Qunused-arguments
+ 2021-03-29 6f90ee36e9 math: simplify comparison in FMA when swapping p and z
+ 2021-03-29 d10241fcf6 runtime: fix some typos
+ 2021-03-29 ba6bd967d2 cmd/compile/internal/ssa: strengthen phiopt pass
+ 2021-03-28 23ffb5b9ae runtime: overwrite existing keys for mapassign_faststr variant
+ 2021-03-27 49dccf141f time: add Time.Unix{Milli,Micro} and to-Time helpers UnixMicro, UnixMilli
+ 2021-03-27 2de1f42857 net: clear completed Buffers to permit earlier collection
+ 2021-03-26 359f44910f cmd/compile: fix long RMW bit operations on AMD64
+ 2021-03-26 98a902323f cmd/vendor, cmd/pprof: use golang.org/x/term directly
+ 2021-03-26 3a0061822e cmd/compile: add arm64 rules to optimize go codes to constant 0
+ 2021-03-25 b587b050ca cmd/compile: add transform functions for OXDOT and builtins
+ 2021-03-25 374b190475 io/fs: implement FileInfoToDirEntry
+ 2021-03-25 11b4aee05b cmd/compile: mark R16, R17 clobbered for non-standard calls on ARM64
+ 2021-03-25 5834ce1dd7 cmd/compile/internal/ssa: unnecessary loop break
+ 2021-03-25 691db3737c cmd/cover: use golang.org/x/tools/cover directly
+ 2021-03-25 5cec8b85e5 net/http/httptest: wait for user ConnState hooks
+ 2021-03-25 7ce361737f net: only perform IPv4 map check for AF_INET6 sockets
+ 2021-03-25 569c86d23b cmd/compile/internal/types2: review of importer_test.go
+ 2021-03-25 ada77d23ae cmd/compile/internal/types2: review of examples test
+ 2021-03-25 2c8692d45f cmd/compile/internal/types2: review of example_test.go
+ 2021-03-25 ffa9983b99 cmd/compile/internal/types2: review of api_test.go
+ 2021-03-25 34ef294b76 cmd/compile/internal/types2: review of lookup.go
+ 2021-03-25 0fc595ec99 cmd/compile/internal/types2: review of check.go
+ 2021-03-25 74fe516c35 cmd/go: add -benchtime to cacheable test flags
+ 2021-03-25 82a1e0f9d3 cmd/link: make symbol data writable before toc fixup
+ 2021-03-25 4d66d77cd2 database/sql: remove unnecessary types in composite literals
+ 2021-03-25 53941b6150 cmd/compile: fix defer desugar keepalive arg handling buglet
+ 2021-03-25 9f4d5c94b0 cmd/go: emit error when listing with -f and -json
+ 2021-03-25 402d784b8f path/filepath: make Rel handle Windows UNC share
+ 2021-03-25 dec3d00b28 cmd/compile/internal/types2: review of stdlib_test.go
+ 2021-03-25 ddcdbb417b cmd/compile/internal/types2: review of assignments.go
+ 2021-03-25 607f99904e cmd/compile/internal/types2: review of api.go
+ 2021-03-25 c69515c9fd cmd/compile/internal/types2: review of expr.go
+ 2021-03-25 4889afe8f8 cmd/go/internal/load: use setLoadPackageDataError in loadImport
+ 2021-03-25 adb037d67a cmd/go: attribute direct imports from indirect dependencies to the importing package
+ 2021-03-25 954879d6d1 cmd/go/internal/modload: replace the global buildList with structured requirements
+ 2021-03-25 a95e2ae280 test: skip fixedbugs/issue36705 on Windows
+ 2021-03-25 80157b5144 crypto/x509: fix spelling error
+ 2021-03-25 e7e0995cba cmd/compile:  create/use noder2 transform functions for more node types
+ 2021-03-24 29ed12d4c7 testing: update permitted number of -race goroutines
+ 2021-03-24 179bcd787e test: only run bug513.go if cgo is enabled
+ 2021-03-24 63e9f6d5f0 test: recognize cgo build tag
+ 2021-03-24 dade83a588 cmd/internal/moddeps: fix false positive when $TMPDIR is symlinked
+ 2021-03-24 fef5a15396 runtime: bypass ABI wrapper when calling needm on Windows
+ 2021-03-24 771c57e68e cmd/compile: disable shortcircuit optimization for intertwined phi values
+ 2021-03-24 fd5e0bd385 cmd/link: mangle function names with ABI on PE
+ 2021-03-24 6f62f852ef net/http: fix request cancellation race
+ 2021-03-24 0e31de280f math/big: don't require runtime.(*Frame).Next symbol present
+ 2021-03-24 975b097307 cmd/link: separate elf addend size from reloc size
+ 2021-03-24 e8700f1ce6 cmd/compile, cmd/link: use weak reference in itab
+ 2021-03-24 747f426944 cmd/internal/obj: remove bogus load/store optab entries from ppc64
+ 2021-03-24 d8960e65a2 cmd/go: move psuedo-version and version sorting to x/mod
+ 2021-03-24 2e94401277 os/exec: use testenv.SkipFlaky in TestExtraFilesFDShuffle
+ 2021-03-24 4357f71ca7 cmd/compile: remove more dead code and data structures
+ 2021-03-24 14ef2d8c01 cmd/compile: fix array case in types-for-register parameter
+ 2021-03-23 87a3ac5f53 cmd/compile: don't let -race override explicit -d=checkptr=0
+ 2021-03-23 769d4b68ef cmd/compile: wrap/desugar defer calls for register abi
+ 2021-03-23 4e27aa6cd2 os/exec: simplify TestContextCancel
+ 2021-03-23 dc289d3dcb io: fix spelling in documentation for io.Discard
+ 2021-03-23 2887ef499a cmd/compile/internal/test: update abi tests for recent spec changes
+ 2021-03-23 c59b17e5a2 cmd/go: make -coverpkg=all skip test-only packages
+ 2021-03-23 05250429ae net/http: treat MaxBytesReader's negative limits as equivalent to zero limit
+ 2021-03-23 9b78c68a15 cmd/compile: remove AuxCall.results, cleanup ssagen/ssa.go
+ 2021-03-23 53dd0d7809 net: make go resolver aware of network parameter
+ 2021-03-23 f4b918384d test: enable fixedbugs/bug193.go for -G compiler option
+ 2021-03-23 cd26192aba go/types: remove superfluous code for shift checking
+ 2021-03-23 e7aa0f9f28 go/types, types2: add a test case for shifts that used to fail
+ 2021-03-23 8f19394b62 cmd/compile/internal/types2: refactor untyped conversions
+ 2021-03-23 0265b6475f cmd/compile: replace calls to typecheck with transform functions
+ 2021-03-23 b8371d495b runtime: support long paths without fixup on Windows 10 >= 1607
+ 2021-03-23 b182ba7fab cmd/compile: optimize codes with arm64 REV16 instruction
+ 2021-03-23 d25476ebb2 cmd/internal/obj/arm64: fix constant pool size calculation error
+ 2021-03-23 c819907754 cmd/{compile,link}: relocate generation of DWARF for global vars
+ 2021-03-22 1c9e587b90 net: add IP.IsPrivate
+ 2021-03-22 d9691ffa37 cmd/compile/internal/walk: relocate a stray comment
+ 2021-03-22 a93849b9e2 cmd/compile: remove now-redundant AuxCall.args
+ 2021-03-22 196c33e92d cmd/compile: fix WriteFuncMap for new ABI.
+ 2021-03-22 ba6b8e75ed os/exec: avoid flaky Wait in TestContextCancel
+ 2021-03-22 78afca22c9 runtime: fix bogus NtCurrentTeb()->TlsSlots[n] calculation on windows/arm64
+ 2021-03-22 8fd0f83552 cmd/compile/internal/ssa: correct sign extension for consts on riscv64
+ 2021-03-22 5437b5a24b cmd/compile: disallow rewrite rules from declaring reserved names
+ 2021-03-22 bd8b3fe5be cmd/compile: make no-op rewrite funcs smaller
+ 2021-03-22 e838c76a6e cmd/go/internal/modload: remove go116EnableNarrowAll constant
+ 2021-03-22 d8394bfc7f cmd/internal/obj/arm64: mark functions with small stacks NOSPLIT
+ 2021-03-20 e0fae78e1d runtime: fix stack alignment for Windows amd64 lib entry
+ 2021-03-19 6ae3b70ef2 cmd/compile: add clobberdeadreg mode
+ 2021-03-19 9f2a71b6e7 make.bash: this change modifies Go to correctly select a dyamic linker
+ 2021-03-19 3b0d28808d cmd/go: assume Go 1.16 instead of Go 1.11 for dependencies that lack explicit 'go' directives
+ 2021-03-19 1c590661e7 testing: allow parallel-subtest goroutines to exit when the subtest is complete
+ 2021-03-19 482903150d syscall: fix typo in exec_windows_test.go
+ 2021-03-19 836dbdb15b runtime: mark Windows' address-taken asm routines as ABIInternal
+ 2021-03-19 4deaa6a178 runtime: call nanotimeQPC from nanotime1 without a wrapper
+ 2021-03-19 e58fb90c75 net/http: make ExampleGet show StatusCode checks for non-1XX,2XX responses
+ 2021-03-19 a937729c2c net/http: mention NewRequestWithContext+Client.Do for custom contexts
+ 2021-03-19 196b104bc1 cmd/internal/obj/ppc64: consolidate memory classifications
+ 2021-03-19 ed3ae9a340 cmd/doc: properly display interface methods
+ 2021-03-19 9136d958ab cmd/asm: complete the support for VDUP on arm64
+ 2021-03-19 6704843202 testing: update helperNames just before checking it
+ 2021-03-19 dcc96e4b94 io/ioutil: use correct Go version in redirection comments
+ 2021-03-18 90b1ed1602 cmd/compile: get untyped constants working in generic functions
+ 2021-03-18 095ba22597 cmd/internal/objabi,runtime: simplify sys.GOEXPERIMENT parsing
+ 2021-03-18 0c93b16d01 cmd: move experiment flags into objabi.Experiment
+ 2021-03-18 d3ab6b5049 test: switch fieldtrack test to use GOEXPERIMENT
+ 2021-03-18 bdbba22404 reflect: add tests for reflect.Value.Call for the new ABI
+ 2021-03-18 79d03ad739 runtime/pprof: move common code to writeProfileInternal function
+ 2021-03-18 e4253cd023 cmd/link: Add section data slice to Archrelocvariant
+ 2021-03-18 b95e4b7850 go/types: minor simplification in assignableTo (cleanup)
+ 2021-03-18 f47fab938e cmd/compile: remove unneeded calls to typecheck in noder2
+ 2021-03-18 eaa1ddee84 all: explode GOEXPERIMENT=regabi into 5 sub-experiments
+ 2021-03-18 c71acbfe83 test: make nosplit test invariant to ABI wrappers
+ 2021-03-18 af4388aee1 cmd/internal/objabi: support boolean GOEXPERIMENTs
+ 2021-03-18 6461d74bf2 cmd/dist: build bootstrap without GOEXPERIMENT
+ 2021-03-18 06ca809410 cmd/internal/objabi: centralize GOEXPERIMENT parsing
+ 2021-03-18 b7cb92ad12 cmd/go: remove renameio package and its last usage
+ 2021-03-18 e726e2a608 cmd/go: suppress errors for 'go get' of module paths that are also constrained-out packages
+ 2021-03-18 6b6ea3271f cmd/go: use the global rooted path name
+ 2021-03-18 db4adb1a9b cmd/link: print symbol versions in stack bound check
+ 2021-03-18 9de49ae01a crypto/rsa: correct EncryptOAEP doc comment
+ 2021-03-18 732ea4c2dc sort: add example tests for SearchFloat64s and SearchInts
+ 2021-03-18 c2d625168f cmd/compile,cmd/internal/obj/riscv: load >32-bit constants from memory for riscv64
+ 2021-03-18 42c25e65f3 cmd/compile: actually intrinsify runtime/internal/atomic.{And,Or}{8,} on RISCV64
+ 2021-03-18 6517844129 cmd/compile: use a single const MOV operand for riscv64
+ 2021-03-18 f5e6d3e879 cmd/compile: add rewrite rules for conditional instructions on arm64
+ 2021-03-18 51e4bb236c cmd/compile/internal/types2: delay recording types of untyped operands when checking against type parameters
+ 2021-03-18 2583c1b4df go/types: add test case for issue #45096
+ 2021-03-17 f38b6428a2 crypto/rand, internal/syscall/unix: add support for getentropy syscall on darwin
+ 2021-03-17 f82ce7fb23 cmd/link: improve nonexistent package error message
+ 2021-03-17 7e00049b55 cmd/go: only add a 'go' directive to the main module when the go.mod file will be written
+ 2021-03-17 4313c28861 cmd/cgo: check whether C compiler exists
+ 2021-03-17 a5df88355c time: check int64 overflow in Time.addSec
+ 2021-03-17 5423f6023c test: add bug that failed when run with gccgo
+ 2021-03-17 8628bf9a97 cmd/compile: resurrect clobberdead mode
+ 2021-03-17 0bd308ff27 go/parser: avoid formatting a panic message if an assertion succeeds
+ 2021-03-17 70d54df4f6 cmd/compile:  getting more built-ins to work with generics
+ 2021-03-17 2f3db220d1 crypto/tls: remove flaky cancellation test
+ 2021-03-17 72b501cb03 compress/lzw: add Reset method to Reader and Writer
+ 2021-03-17 119d76d98e math/bits: folded reverse tables by using const string
+ 2021-03-17 a98a0a75b4 os/user: make user.LookupGroupId function work for large entries
+ 2021-03-17 a826f7dc45 debug/dwarf: support DW_FORM_rnglistx aka formRnglistx
+ 2021-03-17 63b0a0a5b8 spec: fix rendering of >=
+ 2021-03-17 68f8e1af29 cmd/compile/internal/types2: review of call.go
+ 2021-03-16 7a1e963058 cmd/compile, cmd/link: dynamically export writable static tmps
+ 2021-03-16 dc1556eaef cmd/compile: update some comments
+ 2021-03-16 c870e86329 cmd/asm: when dynamic linking, reject code that uses a clobbered R15
+ 2021-03-16 72d98df88e cmd/go: bail out from script tests earlier when a timeout occurs
+ 2021-03-16 1824667259 cmd/compile/internal/ssa: delete unused files
+ 2021-03-16 13a0f7b502 spec: clarify that signed integers>=0 are permitted as shift counts
+ 2021-03-16 d206ca5cac cmd/compile: fix open defer of method call
+ 2021-03-16 0ec2c4abba cmd/compile: (fixed) spill output parameters passed in registers as autos
+ 2021-03-16 832a01aad4 cmd/compile:  deal with comparable embedded in a constraint
+ 2021-03-16 e31e84010e cmd/asm: add rotr/drotr for mips64
+ 2021-03-16 bd0fc0b9c3 cmd/link: preserve elf phdr flags when loading external objects
+ 2021-03-16 860704317e crypto/tls: add HandshakeContext method to Conn
+ 2021-03-16 0089f8b2f5 cmd/go: test that 'go mod tidy' retains upgraded indirect dependencies
+ 2021-03-16 120b9eb1c3 cmd/go/internal/modload: in readonly mode, do not read go.mod files missing checksums
+ 2021-03-16 26c32de7c9 cmd/go/internal/modcmd: in 'go mod tidy', suspend go.mod writes until tidy
+ 2021-03-16 afe517590c cmd/compile: loads from readonly globals into const for mips64x
+ 2021-03-16 600259b099 cmd/compile: use depth first topological sort algorithm for layout
+ 2021-03-16 051bf37833 cmd/compile/internal/ssa: handle more cases in fuse pass
+ 2021-03-16 15f16706fb internal/poll: eliminate the redundant type conversions of FD.Sysfd
+ 2021-03-16 78f9015236 runtime: using wyhash for memhashFallback on 32bit platform
+ 2021-03-16 f02a26bed0 time: support "," as separator for fractional seconds
+ 2021-03-15 a9b3c4bd06 time: add Time.IsDST() to check if its Location is in Daylight Savings Time
+ 2021-03-15 d7cc2f1d7c reflect: panic if ArrayOf is called with negative length
+ 2021-03-15 661f3f15d5 net: fix BenchmarkWriteToReadFromUDP on Windows
+ 2021-03-15 de2b27dee7 all: run gofmt
+ 2021-03-15 e61c9ddb7f Revert "cmd/compile: spill output parameters passed in registers as autos"
+ 2021-03-15 8ed438c077 cmd/compile: spill output parameters passed in registers as autos
+ 2021-03-15 96aecdcb36 cmd/compile: fix case where func-valued field of a generic type is called
+ 2021-03-15 c236095638 cmd/compile: add support for generic maps
+ 2021-03-15 dca9c11845 cmd/compile:  add support for generic channels and type conversion during calls
+ 2021-03-15 bd6aeca968 runtime: prepare arenas for use incrementally
+ 2021-03-15 a9cfd55e2b encoding/xml: replace comments inside directives with a space
+ 2021-03-15 4d014e7231 encoding/xml: handle leading, trailing, or double colons in names
+ 2021-03-15 cc4e6160a7 net: use mid-stack inlining with ReadFromUDP to avoid an allocation
+ 2021-03-15 2d4042d4ab all: update golang.org/x/* dependencies
+ 2021-03-15 a8d9fb2fcd cmd/internal/moddeps: fix typo in TestAllDependencies log messages
+ 2021-03-15 c4190fc34d cmd/compile: remove ARMv5 special case in register allocator
+ 2021-03-15 8ac6544564 bytes: correct tense in comment
+ 2021-03-15 0f4bb9627e cmd/compile: fix outdated comment
+ 2021-03-15 7bfe32f39c cmd/internal/obj: reorder ppc64 MOV* optab entries
+ 2021-03-15 4350e4961a crypto/md5: improve ppc64x performance
+ 2021-03-15 6ccb5c49cc cmd/link/internal/ld: fix typo in a comment
+ 2021-03-14 d0d38f0f70 cmd/compile: fix whitespace in comment
+ 2021-03-14 3cdd5c3bcc cmd/link: regression test for issue #42484
+ 2021-03-14 a8b59fe3cd encoding/json: fix package shadowing in MarshalIndent example
+ 2021-03-14 061a6903a2 all: add internal/itoa package
+ 2021-03-14 88b8a16089 cmd/cover: replace code using optimized golang.org/x/tools/cover
+ 2021-03-13 7936efecc8 net/http: revert change from CL 299109 breaking TestAllDependencies
+ 2021-03-13 1767d2cc2f io/fs: use testing.T.TempDir in TestWalkDir
+ 2021-03-13 4bd4dfe96a cmd/compile/internal/ssa: prealloc slice
+ 2021-03-13 8336c311f8 io: add error check to WriteString Example test
+ 2021-03-13 3224990dad fmt: use “truncateString” not “truncate” in method doc
+ 2021-03-13 fedb494878 errors/wrap: do not call Elem() twice
+ 2021-03-13 289d34a465 all: remove duplicate words
+ 2021-03-13 b3235b75d1 encoding/gob: ensure "duplicate type received" decoder errors surface up
+ 2021-03-13 83e79c7b14 crypto/ecdsa: fix dead reference link
+ 2021-03-13 59e012991a net/http: note that "HTTP/2" is invalid for ParseHTTPVersion
+ 2021-03-13 a8a85281ca runtime: fix documented alignment of 32KiB and 64KiB size classes
+ 2021-03-13 8e725f8452 all: use HTML5 br tags
+ 2021-03-13 73eb27bd3b misc/cgo/testcarchive: don't use == for string equality in C code
+ 2021-03-13 7588ef0d90 cmd/compile/internal/types2: use self_test.go from go/types
+ 2021-03-13 16ad1ea841 cmd/compile/internal/types2: simplify error reporting API (cleanup)
+ 2021-03-13 7b47f9a5f2 cmd/compile: mention that -m can be increased or given multiple times
+ 2021-03-12 3eebc26700 delete favicon.ico and robots.txt
+ 2021-03-12 86bbf4beee cmd/go: fix godoc formatting for text from 'go help install'
+ 2021-03-12 78052f4c4e cmd/compile: minor cleanup -- remove dead code conditional on test
+ 2021-03-12 7240a18adb cmd/compile: test register ABI for method, interface, closure calls
+ 2021-03-12 cdd08e615a cmd/go/internal/load: always set IsImportCycle when in a cycle
+ 2021-03-12 4662029264 runtime: simplify divmagic for span calculations
+ 2021-03-12 735647d92e runtime: add alignment info to sizeclasses.go comments
+ 2021-03-12 086357e8f6 cmd/go: include default GOEXPERIMENT in build config
+ 2021-03-12 9289c12002 Revert "testing/fstest: test that ReadDirFile on a non-dir fails"
+ 2021-03-12 e8b82789cd A+C: add new e-mail addresses for Andy Pan
+ 2021-03-12 e87c4bb3ef cmd/compile:  fix noder.Addr() to not call typechecker
+ 2021-03-12 71330963c0 internal/poll: fix some grammar errors
+ 2021-03-12 a607408403 cmd/internal/obj/arm64: add support for op(extended register) with RSP arguments
+ 2021-03-12 71a6c13164 cmd/compile:  call types.CheckSize() in g.typ()
+ 2021-03-11 7fc638d6f1 cmd: move GOEXPERIMENT knob from make.bash to cmd/go
+ 2021-03-11 b3896fc331 net/http: revert change to generated file from CL 296152
+ 2021-03-11 4dd9c7cadc cmd/go: remove some fsyncs when writing files
+ 2021-03-11 43d5f213e2 cmd/compile: optimize multi-register shifts on amd64
+ 2021-03-11 b0733ba12d hash/maphash: increase the buffer size
+ 2021-03-11 64d323f45a hash/maphash: optimize Write and WriteString
+ 2021-03-11 ae9cd1299c hash/maphash: manually inline setSeed
+ 2021-03-11 86d6678429 testing/fstest: clarify TestFS docs
+ 2021-03-11 1853411d83 testing/fstest: test that ReadDirFile on a non-dir fails
+ 2021-03-11 bbf79793bd io/fs: clarify additional File interface docs
+ 2021-03-11 0a655598e1 cmd/link: fix glink resolver generation on ppc64le
+ 2021-03-11 f009b5b226 runtime: support register ABI for finalizers
+ 2021-03-11 415ca3f1f0 test: add test that caused a gofrontend internal error
+ 2021-03-11 0fc370c5d2 docs: clarify when APIs use context.Background.
+ 2021-03-11 b8e9ec856c syscall: use runtime.KeepAlive for ProcThreadAttributeList arguments
+ 2021-03-11 9ece63f064 crypto/rand, internal/syscall/unix: add support for getrandom syscall on solaris
+ 2021-03-11 79e3ee52f4 internal/syscall/unix: unify GetRandom implementation
+ 2021-03-11 3a3b8164fd cmd/dist: refactor test constraints for misc/cgo/testsantizers
+ 2021-03-11 68f3344fe9 cmd/compile: remove 8-byte alignment requirement of stack slot on ppc64
+ 2021-03-11 fdded79e6e cmd/compile: fix handling of partially inferred type arguments
+ 2021-03-10 1bad3831a0 cmd/internal/obj: remove param element from ppc64 optab
+ 2021-03-10 aa26687e45 runtime, time: disable preemption in addtimer
+ 2021-03-10 f9ed8b3f1e cmd/go/internal/mvs: factor out an incremental implementation
+ 2021-03-10 2ceb79db52 cmd/go/internal/modload: make EditBuildList report whether the build list was changed
+ 2021-03-10 b7f0fb6d9e cmd/go/internal/modload: fuse upgrading with downgrading in EditBuildList
+ 2021-03-10 a1a3d33b0d cmd/go: test remote lookup of packages with leading dots in path elements
+ 2021-03-10 ccf9acefa8 cmd/compile/internal: improve handling of DS form offsets on ppc64x
+ 2021-03-10 c41bf9ee81 runtime: check partial lock ranking order
+ 2021-03-10 5ce51ea741 flag: panic if flag name begins with - or contains =
+ 2021-03-10 d0b79e3513 encoding/xml: prevent infinite loop while decoding
+ 2021-03-10 cd3b4ca9f2 archive/zip: fix panic in Reader.Open
+ 2021-03-10 1811aeae66 cmd/compile:  deal with helper generic types that add methods to T
+ 2021-03-10 5edab39f49 cmd/gofmt: fix const association to avoid inaccurate comment
+ 2021-03-10 489231111f go/types: add missing build tag to api_go1.18_test.go
+ 2021-03-10 7457462303 runtime/race: update dead link
+ 2021-03-10 818f6b14b4 cmd/compile: remove ".fp" fake arg
+ 2021-03-10 bc489dd6d5 runtime: update signature of reflectcall functions
+ 2021-03-10 30c28bbf05 cmd/go: avoid password prompts in TestScript/mod_get_private_vcs
+ 2021-03-10 cf59850466 crypto/rand: supports for getrandom syscall in DragonFlyBSD
+ 2021-03-10 4d608eb224 testing: fix typo in a comment
+ 2021-03-10 643d240a11 internal/poll: implement a pipe pool for splice() call
+ 2021-03-10 d33e2192a7 cmd/go: allow '+' in package import paths in module mode
+ 2021-03-10 41245ab283 cmd/compile/internal/types2: remove concept of finals
+ 2021-03-10 acd7cb5887 cmd/compile/internal/types2: better error reporting framework (starting point)
+ 2021-03-09 142a76530c go/types: improve the positioning of broken import errors
+ 2021-03-09 48ddf70128 cmd/asm,cmd/compile: support 5 operand RLWNM/RLWMI on ppc64
+ 2021-03-09 18510ae88f runtime, cmd/link/internal/ld: disable memory profiling when data unreachable
+ 2021-03-09 e4f3cfadf6 net: don't append a dot to TXT records on Plan 9
+ 2021-03-09 382851c1fd cmd/compile: fix failure to communicate between ABIinfo producer&consumer
+ 2021-03-09 9f5298ca6e cmd/compile: fix confusion in generating SelectN index
+ 2021-03-09 98dfdc82c8 cmd/compile: fix broken type+offset calc for register args
+ 2021-03-09 5eb9912084 cmd/compile: fix OpArg decomposer for registers in expandCalls
+ 2021-03-09 48895d021b cmd/compile: remove skipping of implicit operations during export
+ 2021-03-09 b6df58bd1f cmd/compile: detect duplicate importing earlier
+ 2021-03-09 e8e425cb23 runtime: add pollDesc partial edges
+ 2021-03-09 b60a3a8cfb cmd/compile: add debugging mode for import/export
+ 2021-03-09 a70eb2c9f2 cmd/compile:  get instantiated generic types working with interfaces
+ 2021-03-09 034fffdb49 net: use io.Discard in TestSendfileOnWriteTimeoutExceeded
+ 2021-03-09 762ef81a56 cmd/link/internal/ld: deflake TestWindowsIssue36495
+ 2021-03-09 b70a2bc9c6 cmd/compile: make ValAndOff.{Val,Off} return an int32
+ 2021-03-09 437d229e2a runtime: document netpollclose
+ 2021-03-09 618b66e16d cmd/compile: remove 4-byte alignment requirement of stack slot on arm
+ 2021-03-08 b6def6a34e cmd/vet: bring in sigchanyzer to report unbuffered channels to signal.Notify
+ 2021-03-08 a08adda12c os/signal: remove comments about SA_RESTART
+ 2021-03-08 bd37284784 cmd/link: use testing.T.TempDir in tests
+ 2021-03-08 fee3cd4250 cmd/compile: fix width not calculated for imported type
+ 2021-03-08 7419a86c82 cmd/link/internal/ld: fix typo in a comment
+ 2021-03-08 b4787201c9 cmd/compile: minor doc improvements
+ 2021-03-08 aafad20b61 encoding/binary: limit bytes read by Uvarint to <= 10
+ 2021-03-08 125eca0f72 cmd/compile: improve IsNonNil rule on riscv64
+ 2021-03-07 597b5d192e cmd/compile: rename internal-abi.md to abi-internal.md
+ 2021-03-07 b0df92703c math/big: add shrVU and shlVU benchmarks
+ 2021-03-05 414fa8c35e cmd/internal/objabi: use a separate bit to mark weak relocation
+ 2021-03-05 009bfeae86 reflect: add VisibleFields function
+ 2021-03-05 f901ea701d cmd/internal/goobj: store relocation type as uint16
+ 2021-03-05 87d29939c8 runtime: remove racefuncenterfp
+ 2021-03-05 7205a4fbdc cmd/internal/goobj: regenerate builtin list
+ 2021-03-05 fb03be9d55 cmd/compile: use getcallersp for gorecover "fp" arg
+ 2021-03-05 a22bd3dc73 cmd/compile: use getcallerpc for racefuncentry
+ 2021-03-05 a829114b21 cmd/compile: match Aux and AuxInt explicitly in store combining rule
+ 2021-03-05 d85083911d runtime: encapsulate access to allgs
+ 2021-03-05 39bdd41d03 cmd/go/internal/modfetch/codehost: report git errors more accurately
+ 2021-03-05 44721f4565 test: enable "-d=panic" by default for errorcheck*
+ 2021-03-05 c082f9fee0 cmd/compile: do not set ONAME type when evaluated in type context
+ 2021-03-05 fbee173545 cmd/compile: fix wrong condition in tcShift
+ 2021-03-05 9e6b1fcd0a cmd/compile: do not report error for invalid constant
+ 2021-03-05 51d8d351c1 cmd/compile: do not set type for OTYPESW
+ 2021-03-05 80098ef00c cmd/compile: don't expand invalid embedded interface
+ 2021-03-05 70b277cf2e cmd/compile: only check return for valid functions
+ 2021-03-05 d4247f5167 text/template: wrap errors returned by template functions instead of stringifying them
+ 2021-03-05 67b9ecb23b runtime: update paniclk ordering
+ 2021-03-05 280c735b07 cmd/go: require a module root in 'go list -m' with an unversioned path
+ 2021-03-05 a2f7067233 reflect: include the alignment of zero-sized types in stack offsets
+ 2021-03-05 c5a1c2276e reflect: use global variables for register count
+ 2021-03-05 302a400316 cmd/go/internal/modfetch: detect and recover from missing ziphash file
+ 2021-03-05 2e794c2bb1 testing: add TB.Setenv
+ 2021-03-05 2217e89ba3 net/http/httptrace: fix doc typo
+ 2021-03-05 31df4e3fcd cmd/link: add relocs type for mips64x
+ 2021-03-05 60b500dc6c math/big: remove bounds checks for shrVU_g inner loop
+ 2021-03-05 f0b6d3753f cmd/go: update PWD variable for 'go generate'
+ 2021-03-05 2b0e29f516 docs: fix case of GitHub
+ 2021-03-05 b62da08909 cmd/go: update error expectations in TestScript/mod_install_pkg_version
+ 2021-03-05 a7526bbf72 encoding/json: marshal maps using reflect.Value.MapRange
+ 2021-03-04 96a96a9058 cmd/compile: remove types2.(*Selection).TArgs(), now that instance bug seems fixed
+ 2021-03-04 d891ebdce1 cmd/compile: return (and receive) medium-large results
+ 2021-03-04 d6504b8097 cmd/compile: tweak offset-generator to elide more +0 offsets
+ 2021-03-04 5c5552c5ba cmd/compile: add register abi tests
+ 2021-03-04 56d52e6611 cmd/go: don't report missing std import errors for tidy and vendor
+ 2021-03-04 b87e9b9f68 cmd/go: clarify errors for commands run outside a module
+ 2021-03-04 a99ff24a26 cmd/compile/internal/syntax: print type parameters and type lists
+ 2021-03-04 9d3718e834 cmd/compile: remove I-saw-a-register-pragma chatter
+ 2021-03-04 c015f76acb cmd/compile: implement too-big-to-SSA struct passing in registers
+ 2021-03-04 77505c25d8 syscall: treat proc thread attribute lists as unsafe.Pointers
+ 2021-03-04 9d88a9e2bf cmd/compile: implement simple register results
+ 2021-03-04 2d30c94874 cmd/internal: Add 6 args to ppc64 optab
+ 2021-03-04 cfb609bfb7 cmd/go: ensure that the test subprocess always times out in TestScript/test_write_profiles_on_timeout
+ 2021-03-04 9c54f878d2 runtime: remove GODEBUG=scavenge mode
+ 2021-03-04 9a40dee3ee cmd/go: reject 'go list -m MOD@patch' when no existing version of MOD is required
+ 2021-03-04 a416efef5a runtime: remove a duplicated testcase of TestPallocDataFindScavengeCa…
+ 2021-03-04 3778f8e07d cmd/compile: fix pointer maps for morestack
+ 2021-03-04 a2d92b5143 cmd/compile: register abi, morestack work and mole whacking
+ 2021-03-04 868a110c56 cmd/compile: make check2 gracefully exit if it reported errors
+ 2021-03-04 1d0256a989 cmd/compile: do not add invalid key to constSet
+ 2021-03-04 4b8b2c5864 cmd/compile: do not set type for OTYPE
+ 2021-03-04 8c22874e4e cmd/compile: skip diag error in checkassign if one was emitted
+ 2021-03-04 12a405b96a cmd/compile: do not set type for OPACK
+ 2021-03-04 b7f4307761 cmd/compile: graceful handle error in noder LoadPackage
+ 2021-03-04 4532467c18 cmd/compile: pass register parameters to called function
+ 2021-03-04 95ff296a11 cmd/compile: pass arguments as register parameters to StaticCall.
+ 2021-03-04 04a4dca2ac cmd/compile: refactor out an almost-superfluous arg
+ 2021-03-04 775f11cda1 cmd/internal/obj/arm64: remove unncessary class check in addpool
+ 2021-03-04 27dbc4551a cmd/asm: disable scaled register format for arm64
+ 2021-03-04 593f5bbad7 cmd/compile: adjust stack slot alignment requirements on arm64
+ 2021-03-04 355c3a037e cmd/internal/obj/asm64: add support for moving BITCON to RSP
+ 2021-03-04 726d704c32 cmd/asm: add arm64 instructions VUMAX and VUMIN
+ 2021-03-04 79beddc773 cmd/asm: add 128-bit FLDPQ and FSTPQ instructions for arm64
+ 2021-03-04 12bb256cb3 go/types: use correct recv for parameterized embedded methods
+ 2021-03-03 6db80d7420 cmd/compile/internal/types2: use correct recv for parameterized embedded methods
+ 2021-03-03 d6f6ef6358 cmd/compile: remove races introduced in abiutils field update
+ 2021-03-03 3e524ee65a cmd/compile: make modified Aux type for OpArgXXXX pass ssa/check
+ 2021-03-03 9f33dc3ca1 cmd/compile: handle aggregate OpArg in registers
+ 2021-03-03 c4e3f6c4c7 cmd/compile: remove 8-byte alignment requirement of stack slot on s390x
+ 2021-03-03 85f62b0941 cmd/compile: remove 8-byte alignment requirement of stack slot on mips
+ 2021-03-03 497feff168 cmd/compile: intrinsify runtime/internal/atomic.{And,Or}{8,} on RISCV64
+ 2021-03-03 00cb841b83 syscall: implement rawVforkSyscall for remaining linux platforms
+ 2021-03-03 f2df1e3c34 cmd/compile: retrieve Args from registers
+ 2021-03-03 06c72f3627 A+C: change email address for Baokun Lee
+ 2021-03-03 84ca4949a7 cmd/compile: remove 8-byte alignment requirement of stack slot on mips64
+ 2021-03-03 77973863c3 cmd/compile: use abiutils for all rcvr/in/out frame offsets.
+ 2021-03-03 aea1259a72 cmd/link: disable flaky Darwin "symbols" test
+ 2021-03-02 312fd9937d cmd/go: remove -insecure flag on go get
+ 2021-03-02 2a2f99eefb cmd/go/internal/modload: do not resolve an arbitrary version for 'go list --versions'
+ 2021-03-02 b65091c11d cmd/go: add a test case that reproduces #44296
+ 2021-03-02 e9eed78dc3 cmd/go: resolve std-vendored dependencies as std packages except in 'go get' and 'go mod'
+ 2021-03-02 09f4ef4fa7 cmd/go/internal/mvs: prune spurious dependencies in Downgrade
+ 2021-03-02 c6374f5162 dist: generate stub go.mod in workdir
+ 2021-03-02 97b32a6724 cmd/compile: better version of check frame offsets against abi
+ 2021-03-02 2b50ab2aee cmd/compile: optimize single-precision floating point square root
+ 2021-03-02 ebb92dfed9 internal/poll, runtime: handle netpollopen error in poll_runtime_pollOpen
+ 2021-03-02 4c1a7ab49c cmd/go: reject relative paths in GOMODCACHE environment
+ 2021-03-02 580636a78a all: fix spelling
+ 2021-03-02 a6eeb4add4 go/parser,go/types: hide API changes related to type parameters
+ 2021-03-02 ff5cf4ced3 cmd/link,debug/elf: mips32, add .gnu.attributes and .MIPS.abiflags sections
+ 2021-03-01 700b73975e runtime: use entersyscall in syscall_syscallX on Darwin
+ 2021-03-01 a69c45213d go/types: review of expr.go
+ 2021-03-01 b98ce3b606 cmd/compile:  import empty closure function correctly
+ 2021-03-01 97bdac03ae cmd: upgrade golang.org/x/mod to relax import path check
+ 2021-03-01 f6a74c6568 cmd/compile/internal/ir: fix up stale comment
+ 2021-03-01 87beecd6df cmd/go: add missing newline to retraction warning message
+ 2021-03-01 a400eb3261 Revert "cmd/compile: check frame offsets against abi"
+ 2021-03-01 5fafc0bbd4 cmd/go/internal/modload: don't query when fixing canonical versions
+ 2021-03-01 2a8df4488e os: mark pipes returned by os.Pipe() as inheritable by default
+ 2021-02-27 5ff7ec98b7 cmd/compile: check frame offsets against abi
+ 2021-02-27 a429926159 cmd/compile: fix escape analysis of heap-allocated results
+ 2021-02-27 998fe70b68 cmd/compile: fixed which-result confusion in presence of 0-width types
+ 2021-02-27 d9fd38e68b time: correct unusual extension string cases
+ 2021-02-26 cda8ee095e reflect: fix register ABI spill space calculation
+ 2021-02-26 d8e33d558e cmd/compile: deal with closures in generic functions and instantiated function values
+ 2021-02-26 19f96e73bf syscall: introduce SysProcAttr.ParentProcess on Windows
+ 2021-02-26 3146166baa syscall: introduce SysProcAttr.AdditionalInheritedHandles on Windows
+ 2021-02-26 2d760816ff syscall: restrict inherited handles on Windows
+ 2021-02-26 ba9168bd07 syscall: add support for proc thread attribute lists
+ 2021-02-26 f41460145e cmd/link: recognize ARM64 PE files and relocations
+ 2021-02-26 a655208c9e cmd/link: handle types as converted to interface when dynlink
+ 2021-02-26 23943a6737 cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer
+ 2021-02-26 e25040d162 cmd/compile: change StaticCall to return a "Results"
+ 2021-02-26 9a555fc24c cmd/compile:  fix missing descend in Addrtaken for closures.
+ 2021-02-25 a61524d103 cmd/internal/obj: add Prog.SetFrom3{Reg,Const}
+ 2021-02-25 5f15af111c syscall: comment on fields omitted from the win32finddata1 struct
+ 2021-02-25 9a7fe196e4 Revert "cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer"
+ 2021-02-25 b83d073e9e reflect: add Method.IsExported and StructField.IsExported methods
+ 2021-02-25 7fcf9893f7 cmd/internal/obj: fix typo in docs
+ 2021-02-25 6c3bcda866 cmd/compile: declare inlined result params early for empty returns
+ 2021-02-25 526ee96f49 os: avoid allocation in File.WriteString
+ 2021-02-25 194b636f8f database/sql: close driver.Connector if it implements io.Closer
+ 2021-02-25 4ebb6f5110 cmd/compile: automate resultInArg0 register checks
+ 2021-02-25 1a3e968b1f cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer
+ 2021-02-25 ee2a45e5fb runtime: use pipe2 for nonblockingPipe on dragonfly
+ 2021-02-25 1f7a01459b runtime: batch moving gFree list between local p and global schedt
+ 2021-02-25 bcac57f89c cmd: upgrade golang.org/x/mod to fix go.mod parser
+ 2021-02-25 3137da82fd cmd/go: add a script test corresponding to the downhiddenartifact MVS test
+ 2021-02-25 2c4c189bba cmd/go/internal/mvs: add test cases for downgrade interaction with hidden versions
+ 2021-02-25 9fe8ebf9b4 test: add test case that failed with gccgo
+ 2021-02-25 ad17b65b34 testing/fstest: treat dash specially when building glob
+ 2021-02-25 37ca84a9cd syscall: return error if GetQueuedCompletionStatus truncates key
+ 2021-02-25 76c0003cd5 syscall, os: use pipe2 syscall on DragonflyBSD instead of pipe
+ 2021-02-25 666ad85df4 cmd/compile: fix typo in rewrite_test.go
+ 2021-02-25 d822ffebc5 test: fix inline.go test for linux-amd64-noopt
+ 2021-02-25 ff614b13d9 runtime: subtract one from ip when determining abort
+ 2021-02-24 dbbc5ec7e8 syscall: restore broken GetQueuedCompletionStatus signature but make it not crash
+ 2021-02-24 d0d21b7c4c cmd/compile: plumb abi info into expandCalls
+ 2021-02-24 8027343b63 cmd/compile: disable inlining functions with closures for now
+ 2021-02-24 6c3f8a2f47 cmd/link: use ctxt.Logf instead of package log
+ 2021-02-24 3ee32439b5 cmd/compile: ARM64 optimize []float64 and []float32 access
+ 2021-02-24 80ddc17ae1 cmd/compile/internal-abi: fix ABI0-equivalence for zero-sized values
+ 2021-02-24 3deb528199 cmd/compile/internal-abi: update internal ABI spec for g register
+ 2021-02-24 478277f812 cmd/compile/internal-abi: use x87 mode, not MMX mode
+ 2021-02-24 bf48163e8f cmd/compile: add rule to coalesce writes
+ 2021-02-24 b7f62daa59 cmd/internal/goobj: add test case for object file reader
+ 2021-02-24 c9d9b40b13 context: avoid importing context package twice
+ 2021-02-24 dc4698f52b syscall: do not overflow key memory in GetQueuedCompletionStatus
+ 2021-02-24 7a2f3273c5 cmd/compile: plumb abi info into ssagen/ssa
+ 2021-02-24 adb467ffd2 cmd/compile: reduce inline cost of OCONVOP
+ 2021-02-24 27684ea195 testing: print late arriving log line in panic
+ 2021-02-24 ae1fa08e41 context: reduce contention in cancelCtx.Done
+ 2021-02-24 691ac806d2 cmd/go: fix version validation in 'go mod edit -exclude'
+ 2021-02-24 b97b1456ae cmd/go, cmd/cgo: pass -mfp32 and -mhard/soft-float to MIPS GCC
+ 2021-02-24 07c658316b io/ioutil: forward TempFile and TempDir to os package
+ 2021-02-24 04edf418d2 encoding/json: reduce allocated space in Unmarshal
+ 2021-02-24 e496120891 database: remove race in TestTxContextWait
+ 2021-02-24 26001d109e go/types: review of call.go
+ 2021-02-24 35b80eac7d hash/maphash: remove duplicate from Hash documentation
+ 2021-02-24 eb863240dc runtime: remove unused const stackSystem on dragonfly
+ 2021-02-24 084b07d6f6 spec: improve sentence structure for passing a slice
+ 2021-02-24 6ba4a300d8 docs: fix spelling
+ 2021-02-24 43652dc46f bufio, bytes, strings: handle negative runes in WriteRune
+ 2021-02-24 3780529255 unicode: correctly handle negative runes
+ 2021-02-24 0694fb3d78 image: resolve the TODO of doc comment style
+ 2021-02-23 6cc8aa7ece go/types: minor updates to comments to align with types2
+ 2021-02-23 42b9e3a8df context: fix XTestInterlockedCancels
+ 2021-02-23 aaed6cbced testing/race: fixing intermittent test failure
+ 2021-02-23 fbed561f8a runtime: reset stack poison flag accidentally set
+ 2021-02-23 0458d8c983 go/types, types2: constraints may be parenthesized and that includes "any"
+ 2021-02-23 74903553bc doc: start draft go1.17 release notes, move go1.16 to x/website
+ 2021-02-23 fa40c0232c cmd/go: reproduce issue #44497 in TestScript/mod_edit
+ 2021-02-23 a4dac8bd22 runtime: use BX instead of R15 in race detector
+ 2021-02-23 c49c7a675a runtime: save R15 before checking AVX state
+ 2021-02-23 d2911d7612 cmd/compile: fold MOV*nop and MOV*const
+ 2021-02-23 d434c2338b runtime: clarify GC fractional mode description
+ 2021-02-23 a671e33c6d all: use more precise build tags
+ 2021-02-23 c584f42dcf cmd/compile: change riscv64 Eq32/Neq32 to zero extend before subtraction
+ 2021-02-23 080119799b runtime: fix usleep on windows/arm
+ 2021-02-23 74cac8d479 cmd/compile: add AMD64 parameter register defs, Arg ops, plumb to ssa.Config
+ 2021-02-23 42cd40ee74 cmd/compile: improve bit test code
+ 2021-02-23 f1562c7610 cmd/go: recognize DLL magic from llvm binaries
+ 2021-02-23 bf5fa2d198 cmd/compile: guard special register usage with GOEXPERIMENT=regabi
+ 2021-02-23 c7f596f919 cmd/go: resolve TODO by replacing InDir() function
+ 2021-02-23 5e94fe9316 go/build/constraint: fix splitPlusBuild func doc comment
+ 2021-02-23 55d7dcc3cd runtime: optimize the memory padding in p struct
+ 2021-02-23 ab331c0254 runtime/cgo: use correct lean and mean macro
+ 2021-02-23 91cfbf39e4 cmd/link: set .ctors COFF section to writable and aligned
+ 2021-02-23 811167e2c9 cmd/link: do not pass -Bsymbolic for PE DLLs
+ 2021-02-23 a51daac840 cmd/link: set SizeOfRawData rather than VirtualSize in COFF files for .bss section
+ 2021-02-23 e5159b2a2f cmd/internal/dwarf: minor cleanups
+ 2021-02-23 b3b65f2176 runtime: enable race detector on openbsd/amd64
+ 2021-02-23 a78b0e6721 internal/poll: fix the verbose condition in splice
+ 2021-02-23 08543f0715 ios/fs: mention f.dir in (*subFS).fixErr godoc
+ 2021-02-23 0398a771d2 cmd/internal/obj/riscv: prevent constant loads that do not target registers
+ 2021-02-23 6525abddce cmd/internal/obj/riscv: clean up branch tests
+ 2021-02-23 c4b771348c runtime: fix windows/arm signal handling assembly
+ 2021-02-23 2a18e37c4e cmd/compile: remove backend's "scratch mem" support
+ 2021-02-23 e52149822b cmd/compile: simplify assert{E,I}2I{,2} calling conventions
+ 2021-02-23 86deb459de cmd/compile: remove selectnbrecv2
+ 2021-02-23 4048491234 cmd/compile,runtime: make selectnbrecv return two values
+ 2021-02-23 5e804ba17d cmd/compile: use transitive relations for slice len/cap in poset
+ 2021-02-23 6a40dd05d8 cmd/compile/internal/types2: review of sanitize.go
+ 2021-02-23 975ba6e2b2 cmd/compile: mark OpSB, OpSP as poor statement Op
+ 2021-02-23 a2e150c7cd go/types, cmd/compile/internal/types2: use regular type printing for unsafe.Pointer
+ 2021-02-23 5a0e4fc4e7 cmd/compile/internal/types2: review of conversions.go
+ 2021-02-23 89eb2b55b9 cmd/compile/internal/types2: review of issues_test.go
+ 2021-02-23 378f73e2d5 cmd/compile/internal/types2: enable TestIssue25627
+ 2021-02-23 1901e2647f test: add test for findTypeLoop with symbols from other packages
+ 2021-02-23 5f3dabbb79 cmd/compile: fix import of functions of multiple nested closure
+ 2021-02-23 7af821a661 all: faster midpoint computation in binary search
+ 2021-02-23 f113e9a14f cmd/dist: match goexperiment.regabi tag when GOEXPERIMENT is on
+ 2021-02-22 1126bbb82a go/parser: return ast.BadExpr for missing index operands
+ 2021-02-22 1678829d95 cmd/compile: correctly use X15 to zero frame
+ 2021-02-22 094048b938 cmd/compile/internal: loop opt
+ 2021-02-22 1391d4142c fix typo in issue16760.go
+ 2021-02-22 04903476fe cmd/compile: reject some rare looping CFGs in shortcircuit
+ 2021-02-22 87e984ab29 test: add test for issue 38698
+ 2021-02-22 b2bdadfe88 cmd/internal: cleanup ppc64 optab structure
+ 2021-02-21 0f66fb7b85 go/internal/gccgoimporter: fix up gccgo installation test
+ 2021-02-21 e78e04ce39 cmd/compile: fix panic in DWARF-gen handling obfuscated code
+ 2021-02-20 03d36d8198 syscall: add explicit ios build tag
+ 2021-02-20 40656f3a75 doc/1.16: fix link to fs.FileInfo
+ 2021-02-20 d4b2638234 all: go fmt std cmd (but revert vendor)
+ 2021-02-20 0625460f79 cmd/vet: update buildtag check for //go:build lines
+ 2021-02-20 9fd6cc105d go/printer: canonicalize //go:build and // +build lines while formatting
+ 2021-02-20 5b76343a10 go/build: prefer //go:build over // +build lines
+ 2021-02-20 a8942d2cff runtime/pprof: disable TestMorestack on darwin/arm64
+ 2021-02-20 078f08f0ee spec: every type has a method set (minor clarification)
+ 2021-02-19 26713b5fef go/types: don't write during sanitizeInfo if nothing has changed
+ 2021-02-19 9a99515c8f all: REVERSE MERGE dev.typeparams (7cdfa49) into master
+ 2021-02-19 7cdfa4969a [dev.typeparams] all: merge master (06b86e9) into dev.typeparams
+ 2021-02-19 6521c7b378 [dev.typeparams] cmd/compile/internal/types2: resolve decl cycle the same way as in go/types
+ 2021-02-19 06b86e9803 cmd/compile:  fix check to avoid creating new closure function when typechecking inline body
+ 2021-02-19 9322eec8a2 codereview.cfg: add codereview.cfg for master branch
+ 2021-02-19 02e5a8fdfc runtime: ignore SPWRITE in syscall functions
+ 2021-02-19 fa18f224c3 runtime/pprof: disable TestMorestack on macOS under race detector
+ 2021-02-19 01eb70e3dd os: fix hex exit code print on 32-bit windows
+ 2021-02-19 49add6ad90 runtime: fix spurious stack overflow detection
+ 2021-02-19 fce2a94d84 cmd/compile: fix buglet in inlined info abstract function dwarf-gen
+ 2021-02-19 dfe0ef961b [dev.typeparams] go/types, types2: revert fancy struct printing (fixes x/tools tests)
+ 2021-02-19 7764ee5614 runtime: fix invalid nil g check for for mips64x
+ 2021-02-19 2f37939a21 go/parser: improve error recovery from invalid selector exprs
+ 2021-02-19 8654db4555 [dev.typeparams] go/types: adjust printing of embedded struct fields (fixes x/tools/cmd/guru tests)
+ 2021-02-19 87f425da14 cmd/go/internal/mvs: split Reqs into narrower per-function interfaces
+ 2021-02-19 4da0188c6c cmd/go/internal/modget: split resolveCandidates into two methods
+ 2021-02-19 5f2e24efb3 cmd/internal/diff: skip over Cygwin warning in diff output
+ 2021-02-19 ee7038f6a5 net: disable Windows netsh tests when netsh won't run
+ 2021-02-19 40765ffa95 os/exec: disable failing LookPathTest on windows/arm64
+ 2021-02-19 b445d6ea34 runtime/pprof: expect tests to pass on macOS
+ 2021-02-19 b110a43628 runtime: delete gosave (dead code)
+ 2021-02-19 474d5f4f4d math: remove most 387 implementations
+ 2021-02-19 c7c6c113be runtime: convert windows/arm64 assembly
+ 2021-02-19 3527caa7d6 runtime: initial windows/arm64 implementation files
+ 2021-02-19 427bd7599d runtime: generate windows/arm64 callback asm
+ 2021-02-19 f6c4b4bf96 syscall: add windows/arm64 support
+ 2021-02-19 ac024a0c7b cmd/vendor: get golang.org/x/sys@beda7e5e158
+ 2021-02-19 a3b97e7628 test: disable nilptr on windows/arm64
+ 2021-02-19 985d087782 cmd/link: add windows/arm64 support
+ 2021-02-19 95a44d2409 cmd/internal/objfile: recognize Windows ARM64 executables
+ 2021-02-19 0ca0551f02 debug/pe: recognize arm64 executables
+ 2021-02-19 47e4b0739e Merge "[dev.typeparams] all: merge master (eb98272) into dev.typeparams" into dev.typeparams
+ 2021-02-19 0c633125f2 cmd/dist: add windows/arm64 support
+ 2021-02-19 bb6efb9609 build: set GOPATH consistently in run.bash, run.bat, run.rc
+ 2021-02-19 a1222b7535 cmd/link: add debug print in deadcode
+ 2021-02-19 1c659f2525 cmd/link: clean up windows PE generation
+ 2021-02-19 b6379f190b syscall: clean up windows a bit
+ 2021-02-19 09e059afb1 runtime: enable framepointer on all arm64
+ 2021-02-19 b19e7b518e runtime: clean up windows a bit
+ 2021-02-19 5421c37a1d runtime: fix windows/arm externalthreadhandler
+ 2021-02-19 91cc484ea9 runtime: fix time on windows/arm under WINE
+ 2021-02-19 38672d3dcf runtime: crash earlier on windows for runtime.abort
+ 2021-02-19 a1e9148e3d runtime: print hex numbers with hex prefixes in traceback debug
+ 2021-02-19 75e273fc2c runtime: fix windows/arm CONTEXT_CONTROL
+ 2021-02-19 76ab626bfc runtime: factor common code out of defs_windows_*.go
+ 2021-02-19 ece954d8b8 runtime: find g in Windows profiler using SP
+ 2021-02-19 a54f7fc0fd runtime: do not treat asmcgocall as a topofstack on g0
+ 2021-02-19 776ee4079a runtime: do not treat morestack as a topofstack
+ 2021-02-19 5ecd9e34df runtime: do not treat mcall as a topofstack
+ 2021-02-19 54da3ab385 runtime: use TOPFRAME to identify top-of-frame functions
+ 2021-02-19 fbe74dbf42 runtime: use FuncInfo SPWRITE flag to identify untraceable profile samples
+ 2021-02-19 4dd77bdc91 cmd/asm, cmd/link, runtime: introduce FuncInfo flag bits
+ 2021-02-19 aa0388f2ed runtime: remove unnecessary writes to gp.sched.g
+ 2021-02-19 6fe8981620 cmd/internal/obj/riscv: fix JMP name<>(SB)
+ 2021-02-19 01f05d8ff1 runtime: unify asmcgocall and systemstack traceback setup
+ 2021-02-19 229695a283 runtime: clean up funcID assignment
+ 2021-02-19 c80da0a33a runtime: handle nil gp in cpuprof
+ 2021-02-19 a78879ac67 runtime: move sys.DefaultGoroot to runtime.defaultGOROOT
+ 2021-02-19 8ac23a1f15 runtime: document, clean up internal/sys
+ 2021-02-19 678568a5cf runtime: delete windows setlasterror (unused)
+ 2021-02-19 0d94f989d1 runtime: clean up system calls during cgo callback init
+ 2021-02-19 e7ee3c1fa8 os: report Windows exit status in hex
+ 2021-02-18 a789be7814 [dev.typeparams] cmd/compile: use new converter functions rather than methods (fix build)
+ 2021-02-18 20050a15fe [dev.typeparams] cmd/compile:  support generic types (with stenciling of method calls)
+ 2021-02-18 e7493a9c74 [dev.typeparams] all: merge master (eb98272) into dev.typeparams
+ 2021-02-18 2ff1e05a4c [dev.typeparams] all: update parent repository
+ 2021-02-18 eb982727e3 cmd/go/internal/mvs: fix Downgrade to match Algorithm 4
+ 2021-02-18 3b7277d365 cmd/go: add a script test for artifacts resulting from 'go get -u'
+ 2021-02-18 8960ce7735 [dev.typeparams] cmd/compile/internal/types2: minor adjustments to match go/types more closely
+ 2021-02-18 6f3878b942 [dev.typeparams] cmd/compile/internal/types: review of typestring_test.go
+ 2021-02-18 d6bdd1aeef [dev.typeparams] cmd/compile/internal/types: review of typestring.go
+ 2021-02-18 c2314babb8 [dev.typeparams] cmd/compile/internal/types: review of type.go
+ 2021-02-18 099374b55e [dev.typeparams] cmd/compile/internal/types2: remove Type.Under method in favor of function
+ 2021-02-18 653386a89a [dev.typeparams] cmd/compile/internal/types2: replace Named, TypeParam methods with functions
+ 2021-02-18 5e4da8670b [dev.typeparams] cmd/compile/internal/types2: use converter functions rather than methods
+ 2021-02-18 5ecb9a7887 [dev.typeparams] go/types: use a new ast.ListExpr for multi-type instances
+ 2021-02-18 f3c2208e2c cmd/go: add script tests for potential upgrades due to downgrades
+ 2021-02-18 a5c8a15f64 cmd/go/internal/mvs: clarify and annotate test cases
+ 2021-02-18 a76efea1fe cmd/go/internal/mvs: don't emit duplicates from Req
+ 2021-02-18 609d82b289 cmd/dist: set GOARM=7 for windows/arm
+ 2021-02-18 7b679617f3 [dev.typeparams] go/types: conversions to type parameters are not constant
+ 2021-02-18 f0be3cc547 runtime: unbreak linux/riscv64 following regabi merge
+ 2021-02-18 07ef313525 runtime/cgo: add cast in C code to avoid C compiler warning
+ 2021-02-17 f5d0c653e6 [dev.typeparams] merge master (2f0da6d) into dev.typeparams
+ 2021-02-17 e196cb8258 [dev.typeparams] cmd/dist:  disable -G=3 on the std go tests for now
+ 2021-02-17 2f0da6d9e2 go/types: revert "no 'declared but not used' errors for invalid var decls"
+ 2021-02-17 70c37ee7d0 cmd/compile/internal/test: gofmt abiutils_test.go
+ 2021-02-16 84825599dc all: merge branch dev.regabi (d3cd4830ad) into master
+ 2021-02-16 d3cd4830ad [dev.regabi] test: run abi/regabipragma test with -c=1
+ 2021-02-16 03cea563d1 [dev.regabi] all: merge master (5faf941) into dev.regabi
+ 2021-02-16 b8fb049c7a [dev.regabi] cmd/go: copy internal/abi in TestNewReleaseRebuildsStalePackagesInGOPATH
+ 2021-02-16 5faf941df0 internal/goversion: update Version to 1.17
+ 2021-02-16 ed55da46ab [dev.regabi] go/types: overlapping embedded interfaces requires go1.14
+ 2021-02-16 7696c94334 [dev.regabi] go/types: type alias decl requires go1.9
+ 2021-02-16 c2358a1ae7 [dev.regabi] runtime: stub out spillArgs and unspillArgs
+ 2021-02-16 8cfbf34dd9 internal/abi: set register count constants to zero for regabi experiment
+ 2021-02-16 6f3da9d2f6 README: pull gopher image from website
+ 2021-02-16 d28aae26b0 [dev.regabi] cmd/link: recognize internal/abi as runtime package
+ 2021-02-16 098504c73f cmd/link: generate trampoline for inter-dependent packages
+ 2021-02-16 1004a7cb31 runtime/metrics: update documentation to current interface
+ 2021-02-16 6530f2617f doc/go1.16: remove draft notice
+ 2021-02-16 353e111455 doc/go1.16: fix mismatched id attribute
+ 2021-02-16 e0215315f5 [dev.regabi] reflect: support for register ABI on amd64 for reflect.(Value).Call
+ 2021-02-16 f0d23c9dbb internal/poll: netpollcheckerr before sendfile
+ 2021-02-16 0cb3415154 doc: remove all docs not tied to distribution
+ 2021-02-16 626ef08127 doc: remove install.html and install-source.html
+ 2021-02-16 30641e36aa internal/poll: if copy_file_range returns 0, assume it failed
+ 2021-02-15 33d72fd412 doc/faq: update generics entry to reflect accepted proposal
+ 2021-02-15 852ce7c212 cmd/go: provide a more helpful suggestion for "go vet -?"
+ 2021-02-13 66c27093d0 cmd/link: fix typo in link_test.go
+ 2021-02-13 b81efb7ec4 [dev.regabi] go/types: add support for language version checking
+ 2021-02-13 a7e9b4b948 [dev.regabi] go/types: untyped shift counts must fit into uint
+ 2021-02-13 060fa49bd2 [dev.regabi] go/types: refuse excessively long constants
+ 2021-02-12 a06bd9fecb [dev.typeparams] cmd/compile/internal/types: review of resolver_test.go
+ 2021-02-12 042f88fe30 [dev.typeparams] cmd/compile/internal/types: review of errors_test.go
+ 2021-02-12 0abd7b768b [dev.typeparams] cmd/compile/internal/types: review of universe.go
+ 2021-02-12 1b6f0bf1b2 [dev.typeparams] cmd/compile/internal/types: review of sizes_test.go
+ 2021-02-12 1758780181 [dev.typeparams] cmd/compile/internal/types: review of sizes.go
+ 2021-02-12 3aee461d5c [dev.typeparams] cmd/compile/internal/types: review of return.go
+ 2021-02-12 7428318af6 [dev.typeparams] cmd/compile/internal/types: review of object_test.go
+ 2021-02-12 b20f9e2da1 [dev.typeparams] cmd/compile/internal/types: review of object.go
+ 2021-02-12 20746b2f37 [dev.typeparams] cmd/compile/internal/types: review of labels.go
+ 2021-02-12 bab3461123 [dev.typeparams] cmd/compile/internal/types: review of infer.go
+ 2021-02-12 9168590977 [dev.typeparams] cmd/compile/internal/types: review of builtin_test.go
+ 2021-02-12 f1777cf84c [dev.typeparams] cmd/compile/internal/types: review of builtin.go
+ 2021-02-12 baa6c75dce [dev.regabi] internal/abi: add new internal/abi package for ABI constants
+ 2021-02-12 d1fd9a8863 [dev.regabi] all: merge master (ff0e93e) into dev.regabi
+ 2021-02-12 ff0e93ea31 doc/go1.16: note that package path elements beginning with '.' are disallowed
+ 2021-02-12 0f43973b4b [dev.typeparams] go/types: make predeclared "any" alias for interface{}
+ 2021-02-12 58758e0a21 [dev.typeparams] go/types: better error message for invalid ... use
+ 2021-02-11 c0aa7bd760 [dev.typeparams] cmd/compile: small fixes for stenciling
+ 2021-02-11 249da7ec02 CONTRIBUTORS: update for the Go 1.16 release
+ 2021-02-11 864d4f1c6b cmd/go: multiple small 'go help' fixes
+ 2021-02-11 26ceae85a8 spec: More precise wording in section on function calls.
+ 2021-02-11 930c2c9a68 cmd/go: reject embedded files that can't be packed into modules
+ 2021-02-11 e5b08e6d5c io/fs: allow backslash in ValidPath, reject in os.DirFS.Open
+ 2021-02-10 df23540dde [dev.typeparams] cmd/gofmt: add the -G flag to allow generic code
+ 2021-02-10 ed8079096f cmd/compile: mark concrete call of reflect.(*rtype).Method as REFLECTMETHOD
+ 2021-02-10 ddec18cf82 [dev.typeparams] cmd/compile/internal/types2: overlapping embedded interfaces requires go1.14
+ 2021-02-10 59703d53e2 [dev.regabi] cmd/link: stop using ABI aliases if wrapper is enabled
+ 2021-02-10 fdf3496fcc [dev.typeparams] cmd/compile:  make type conversions by type parameters work
+ 2021-02-10 12e15d430d [dev.typeparams] cmd/compile: handle calling a method on a type param in stenciling
+ 2021-02-09 e9c9683597 cmd/go: suppress errors from 'go get -d' for packages that only conditionally exist
+ 2021-02-09 168d6a49a5 [dev.regabi] go/types: use 512 bits as max. integer precision
+ 2021-02-09 0a62067708 [dev.regabi] go/types: adjust importer to match compiler importer
+ 2021-02-09 1c58fcf7ed [dev.regabi] go/types: handle untyped constant arithmetic overflow
+ 2021-02-09 493363ccff [dev.regabi] go/types: must not import a package called "init"
+ 2021-02-09 e0ac989cf3 archive/tar: detect out of bounds accesses in PAX records resulting from padded lengths
+ 2021-02-09 c48d1503ba [dev.regabi] go/types: report unused packages in source order
+ 2021-02-09 813958f13c [dev.regabi] go/types: factor out sorting of methods
+ 2021-02-09 11d15c171b [dev.regabi] go/types: convert untyped arguments to delete
+ 2021-02-08 ca18c42054 [dev.typeparams] merge dev.regabi (618e3c1) into dev.typeparams
+ 2021-02-09 c9d6f45fec runtime/metrics: fix a couple of documentation typpos
+ 2021-02-09 cea4e21b52 io/fs: backslash is always a glob meta character
+ 2021-02-08 dc725bfb3c doc/go1.16: mention new vet check for asn1.Unmarshal
+ 2021-02-08 618e3c15bd [dev.regabi] go/types: consistently report nil type as "untyped nil"
+ 2021-02-08 a360eeb528 [dev.typeparams] cmd/compile/internal/types2: conversions to type parameters are not constant
+ 2021-02-08 0fbde54ea6 [dev.typeparams] cmd/compile: allow generic funcs to call other generic funcs for stenciling
+ 2021-02-08 50449de66a [dev.regabi] all: merge master (1901853) into dev.regabi
+ 2021-02-08 7b0dfb177f [dev.regabi] runtime: use g register in some assembly functions on AMD64
+ 2021-02-08 2e60c00f56 [dev.regabi] cmd/internal/obj/x86: use g register in stack bounds check
+ 2021-02-08 22f9e1ccbc [dev.regabi] runtime: initialize special registers before sigpanic
+ 2021-02-08 5d7dc53888 [dev.regabi] cmd/compile, runtime: reserve R14 as g registers on AMD64
+ 2021-02-08 1901853098 runtime/metrics: fix panic in readingAllMetric example
+ 2021-02-08 ed3e4afa12 syscall/plan9: remove spooky fd action at a distance
+ 2021-02-08 a21de9ec73 [dev.regabi] cmd/link: resolve symbol ABI in shared linkage
+ 2021-02-05 724d0720b3 doc/go1.16: add missed heading tag in vet section
+ 2021-02-05 b54cd94d47 embed, io/fs: clarify that leading and trailing slashes are disallowed
+ 2021-02-05 4516afebed testing/fstest: avoid symlink-induced failures in tester
+ 2021-02-05 8fa84772ba [dev.regabi] runtime: delete gosave function
+ 2021-02-05 946351d5a2 [dev.regabi] runtime: zero X15 in racecall
+ 2021-02-05 397a46a10a [dev.regabi] cmd/asm: define g register on AMD64
+ 2021-02-05 e79c2fd428 [dev.regabi] runtime: mark racecallbackthunk as ABIInternal
+ 2021-02-05 7cc6de59f2 [dev.regabi] runtime: don't mark rt0_go ABIInternal
+ 2021-02-05 dcb5e0392e [dev.typeparams] cmd/compile: add stenciling of simple generic functions
+ 2021-02-05 63de211014 [dev.regabi] runtime/cgo: call setg_gcc in crosscall_amd64
+ 2021-02-04 f37b0c6c12 [dev.typeparams] cmd/compile/internal/types2: type alias decl requires go1.9
+ 2021-02-04 721488498a [dev.typeparams] cmd/compile: pass -lang flag value to new type checker
+ 2021-02-04 1ff2fdaaf1 [dev.typeparams] cmd/compile/internal/types2: add support for language version checking
+ 2021-02-04 370e9f5843 [dev.typeparams] cmd/compile/internal/types2: use 512 bits as max. integer precision
+ 2021-02-04 120b819f45 [dev.regabi] go/types: report error for invalid main function signature
+ 2021-02-04 52d5cb2822 [dev.regabi] cmd/internal/obj: access Attribute atomically
+ 2021-02-04 bc451b5770 [dev.regabi] go/types: port check_test.go ergonomics from dev.typeparams
+ 2021-02-04 afd67f3334 [dev.regabi] go/types: no "declared but not used" errors for invalid var decls
+ 2021-02-04 ca2f152893 [dev.typeparams] go/types: add missing test from dev.go2go
+ 2021-02-04 8869086d8f runtime: fix typo in histogram.go
+ 2021-02-03 401d7e5a24 [dev.regabi] cmd/compile: reserve X15 as zero register on AMD64
+ 2021-02-03 bfc7418e6d [dev.regabi] runtime, syscall, etc.: mark Darwin syscall wrappers as ABIInternal
+ 2021-02-03 dc122c7a9c [dev.typeparams] test: exclude a failing test again (fix 32bit builds)
+ 2021-02-03 c910fd7b77 [dev.typeparams] cmd/compile: refuse excessively long constants
+ 2021-02-03 3db6e18468 [dev.typeparams] test: enable more errorcheck tests
+ 2021-02-03 e491c6eea9 math/big: fix comment in divRecursiveStep
+ 2021-02-03 bb53a5ad43 [dev.typeparams] cmd/compile/internal/importer: adjust importer to match compiler importer
+ 2021-02-03 3f845b3b45 [dev.typeparams] cmd/compile: deal with inferred type arguments
+ 2021-02-03 e633f343ba [dev.typeparams] cmd/compile:  add OFUNCINST/OTYPEINST nodes for generic func/type instantiation
+ 2021-02-02 0d2d6c7464 [dev.typeparams] all: merge dev.regabi (23b0c1f) into dev.typeparams
+ 2021-02-02 3d5c715bf2 [dev.typeparams] Handling multiple type arguments for call via new node OLIST
+ 2021-02-02 23b0c1f76e [dev.regabi] all: merge master (fca94ab) into dev.regabi
+ 2021-02-02 fca94ab3ab spec: improve the example in Type assertions section
+ 2021-02-02 98f8454a73 cmd/link: don't decode type symbol in shared library in deadcode
+ 2021-02-02 1426a571b7 cmd/link: fix off-by-1 error in findShlibSection
+ 2021-02-01 13a7412983 [dev.typeparams] Parse a generic type arg for generic function call
+ 2021-02-01 32e789f4fb test: fix incorrectly laid out instructions in issue11656.go
+ 2021-02-01 ca6999e27c [dev.regabi] test: add a test for inlining closures
+ 2021-02-01 0b6cfea634 doc/go1.16: document that on OpenBSD syscalls are now made through libc
+ 2021-02-01 26e29aa15a cmd/link: disable TestPIESize if CGO isn't enabled
+ 2021-02-01 6ac91e460c doc/go1.16: minor markup fixes
+ 2021-01-30 0aafd69124 [dev.typeparams] cmd/compile: start translating type params in noder2
+ 2021-01-30 a59cb5109d [dev.typeparams] cmd/compile/internal/types2: handle untyped constant arithmetic overflow
+ 2021-01-29 44361140c0 embed: update docs for proposal tweaks
+ 2021-01-29 68058edc39 runtime: document pointer write atomicity for memclrNoHeapPointers
+ 2021-01-29 507e641963 [dev.typeparams] cmd/compile/internal/typecheck: declutter generated builtin.go (cleanup)
+ 2021-01-28 2440dd457a [dev.typeparams] cmd/compile:  start adding info needed for typeparams in types & ir
+ 2021-01-28 c8bd8010ff syscall: generate readlen/writelen for openbsd libc
+ 2021-01-28 41bb49b878 cmd/go: revert TestScript/build_trimpath to use ioutil.ReadFile
+ 2021-01-28 c0bf904ddf [dev.typeparams] cmd/compile/internal/types2: translate syntax to token constants via tables
+ 2021-01-28 f7d1c5990b [dev.typeparams] cmd/compile/internal/types2: must not import a package called "init"
+ 2021-01-28 725a642c2d runtime: correct syscall10/syscall10X on openbsd/amd64
+ 2021-01-28 4b068cafb5 doc/go1.16: document go/build/constraint package
+ 2021-01-28 376518d77f runtime,syscall: convert syscall on openbsd/arm64 to libc
+ 2021-01-27 aca22bddf2 [dev.regabi] cmd/compile: remove nested functions from expands_calls.go
+ 2021-01-27 667e08ba8c [dev.regabi] cmd/go: Use GOMAXPROCS to limit default build, compile parallelism
+ 2021-01-27 00f2ff5c94 api/go1.16: add go/build/constraint APIs
+ 2021-01-27 35334caf18 crypto/x509: remove leftover CertificateRequest field
+ 2021-01-27 a5a5e2c968 runtime: make sure to remove open-coded defer entries in all cases after a recover
+ 2021-01-27 217a461f56 [dev.typeparams] cmd/compile/internal/types2: report unused packages in source order
+ 2021-01-27 8cfa01943a runtime: block console ctrlhandler when the signal is handled
+ 2021-01-27 ff9e8364c6 cmd/go: skip issue33139 when the 'cc' script command is unavailable
+ 2021-01-27 cd176b3615 runtime: switch runtime to libc for openbsd/arm64
+ 2021-01-27 6c8fbfbdcf runtime: convert openbsd/arm64 locking to libc
+ 2021-01-27 5cdf0da1bf syscall: clean up mkasm related changes
+ 2021-01-27 210f70e298 doc/go1.16: fix closing brace in .Export format
+ 2021-01-27 0f797f168d math: fix typo in sqrt.go code comment
+ 2021-01-26 9b636feafe [dev.regabi] cmd/compile: missing last patch set for cl286013
+ 2021-01-26 f7dad5eae4 [dev.regabi] cmd/compile: remove leftover code form late call lowering work
+ 2021-01-26 08a598f8c1 [dev.typeparams] cmd/compile: fix MethodExpr handling with embedded fields
+ 2021-01-26 8634a234df runtime,syscall: convert syscall on openbsd/amd64 to libc
+ 2021-01-26 cecc1dfcba [dev.typeparams] test: enable excluded test fixedbugs/issue7742.go
+ 2021-01-26 e48d7d3b21 [dev.typeparams] go/constant: faster match implementation
+ 2021-01-26 d39685e5e9 [dev.typeparams] go/constant: choose internal float representations more consistently
+ 2021-01-25 34704e374f [dev.typeparams] all: merge dev.regabi (5e4a0cd) into dev.typeparams
+ 2021-01-26 c97af0036b [dev.typeparams] cmd/compile: force untyped constants from types2 to expected kind
+ 2021-01-26 1d5e14632e os: further document limitations around naked file descriptors
+ 2021-01-25 5e4a0cdde3 [dev.regabi] all: merge master (bf0f7c9) into dev.regabi
+ 2021-01-26 cf263e9f77 os: correct names in CreateTemp and MkdirTemp doc comments
+ 2021-01-26 ce8b318624 net/http/fcgi: remove locking added to prevent a test-only race
+ 2021-01-25 bf0f7c9d78 doc/go1.16: mention os.DirFS in os section
+ 2021-01-25 deaf29a8a8 cmd/compile: fix order-of-assignment issue w/ defers
+ 2021-01-25 ad2ca26a52 doc/go1.16: mention os.DirEntry and types moved from os to io/fs
+ 2021-01-25 a51921fa5b doc/go1.16: mention new testing/iotest functions
+ 2021-01-25 3663a437a7 [dev.typeparams] go/constant: in ToFloat, convert to rational numbers, not floats
+ 2021-01-25 e6b6d107f7 doc/go1.16: mention deprecation of io/ioutil
+ 2021-01-25 7eaaf28cae [dev.regabi] cmd/compile: disallow taking address of SSA'd values
+ 2021-01-25 96a276363b doc/go1.16: mention go/build changes
+ 2021-01-25 3d85c69a0b html/template: revert "avoid race when escaping updates template"
+ 2021-01-25 54514c6b28 cmd/go: fix TestScript/cgo_path, cgo_path_space when CC set
+ 2021-01-25 6f5e79f470 [dev.regabi] cmd/compile/internal: specify memory layout
+ 2021-01-25 cabffc199d [dev.regabi] cmd/compile/internal: add internal ABI specification
+ 2021-01-25 6de8443f3b doc/asm: add a section on go_asm.h, clean up go_tls.h section
+ 2021-01-25 6a4739ccc5 [dev.regabi] cmd/compile: enable rational constant arithmetic
+ 2021-01-25 be9612a832 [dev.regabi] os: disable TestDirFS until #42637 is fixed
+ 2021-01-25 3432d24bab Merge "[dev.typeparams] all: merge dev.regabi (063c72f) into dev.typeparams" into dev.typeparams
+ 2021-01-25 493eb6e6ec [dev.typeparams] cmd/compile: fix -G=3 handling of blank methods
+ 2021-01-25 13f02018af [dev.typeparams] test: enable more errorcheck tests w/ -G=3
+ 2021-01-25 8ee3d39838 [dev.regabi] cmd/go: workaround -race issue on ppc64le
+ 2021-01-25 54b251f542 lib/time, time/tzdata: update tzdata to 2021a
+ 2021-01-25 5a76c3d548 [dev.regabi] cmd/compile: modify abiutils for recently updated ABI
+ 2021-01-25 ff82cc971a os: force consistent mtime before running fstest on directory on Windows
+ 2021-01-25 044f937a73 doc/go1.16: fix WalkDir and Walk links
+ 2021-01-24 6d8d118762 [dev.typeparams] all: merge dev.regabi (063c72f) into dev.typeparams
+ 2021-01-25 063c72f06d [dev.regabi] cmd/compile: backport changes from dev.typeparams (9456804)
+ 2021-01-24 9456804e86 [dev.typeparams] test: fix excluded files lookup so it works on Windows
+ 2021-01-23 b634f5d97a doc/go1.16: add crypto/x509 memory optimization
+ 2021-01-23 9897655c61 doc/go1.16: reword ambiguously parsable sentence
+ 2021-01-23 cd99385ff4 cmd/internal/obj/arm64: fix VMOVQ instruction encoding error
+ 2021-01-23 d05d6fab32 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA 2
+ 2021-01-23 7947df436d [dev.typeparams] test: set -G=3 and enable more errorcheck tests in run.go
+ 2021-01-23 66ee8b158f runtime: restore cgo_import_dynamic for libc.so on openbsd
+ 2021-01-23 48badc5fa8 [dev.regabi] cmd/compile: fix escape analysis problem with closures
+ 2021-01-23 a49e941027 [dev.typeparams] cmd/compile/internal/types2: remove MethodSet code - not used by types2
+ 2021-01-23 5347241b5e [dev.typeparams] cmd/compile/internal/types2: use same sort criteria for methods as compiler
+ 2021-01-23 2b95c28b18 [dev.typeparams] cmd/compile: refactor SelectorExpr code into helpers
+ 2021-01-23 1946a77e69 Merge "[dev.typeparams] all: merge dev.regabi (7e0a81d) into dev.typeparams" into dev.typeparams
+ 2021-01-23 6923019a71 [dev.typeparams] cmd/compile/internal/types2: factor out sorting of methods
+ 2021-01-22 6e46c8fbb5 [dev.typeparams] all: merge dev.regabi (7e0a81d) into dev.typeparams
+ 2021-01-23 51e1819a8d [dev.regabi] cmd/compile: scan body of closure in tooHairy to check for disallowed nodes
+ 2021-01-22 25c39e4fb5 io/ioutil: fix example test for WriteFile to allow it to run in the playground
+ 2021-01-22 eb21b31e48 runtime: define dummy msanmove
+ 2021-01-22 3a778ff50f runtime: check for g0 stack last in signal handler
+ 2021-01-22 a2cef9b544 cmd/go: don't lookup the path for CC when invoking cgo
+ 2021-01-22 7e0a81d280 [dev.regabi] all: merge master (dab3e5a) into dev.regabi
+ 2021-01-22 e4ef30a667 [dev.typeparams] cmd/compile: refactor irgen's handling of ":="
+ 2021-01-22 dab3e5affe runtime: switch runtime to libc for openbsd/amd64
+ 2021-01-22 a1b53d85da cmd/go: add documentation for test and xtest fields output by go list
+ 2021-01-22 626406b703 [dev.typeparams] go/types: import api_test.go changes from dev.go2go
+ 2021-01-22 b268b60774 runtime: remove pthread_kill/pthread_self for openbsd
+ 2021-01-22 12cd9cf7e0 [dev.typeparams] cmd/compile: disambiguate OXDOT in noder using types2 Selection info
+ 2021-01-22 ec4051763d runtime: fix typo in mgcscavenge.go
+ 2021-01-22 7ece3a7b17 net/http: fix flaky TestDisableKeepAliveUpgrade
+ 2021-01-22 50cba0506f time: clarify Timer.Reset behavior on AfterFunc Timers
+ 2021-01-22 cf10e69f17 doc/go1.16: mention net/http.Transport.GetProxyConnectHeader
+ 2021-01-22 ec1b945265 doc/go1.16: mention path/filepath.WalkDir
+ 2021-01-22 11def3d40b doc/go1.16: mention syscall.AllThreadsSyscall
+ 2021-01-22 f8654579cd [dev.typeparams] cmd/compile/internal/types2: adjust errors in branch checking code, fix a bug
+ 2021-01-21 07b0235609 doc/go1.16: add notes about package-specific fs.FS changes
+ 2021-01-21 e2b4f1fea5 doc/go1.16: minor formatting fix
+ 2021-01-21 9f43a9e07b doc/go1.16: mention new debug/elf constants
+ 2021-01-21 3c2f11ba5b cmd/go: overwrite program name with full path
+ 2021-01-21 953d1feca9 all: introduce and use internal/execabs
+ 2021-01-21 b186e4d70d cmd/go: add test case for cgo CC setting
+ 2021-01-21 5a8a2265fb cmd/cgo: report exec errors a bit more clearly
+ 2021-01-21 46e2e2e9d9 cmd/go: pass resolved CC, GCCGO to cgo
+ 2021-01-21 3d40895e36 runtime: switch openbsd/arm64 to pthreads
+ 2021-01-21 d95ca91380 crypto/elliptic: fix P-224 field reduction
+ 2021-01-21 d7e71c01ad [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for dwarf
+ 2021-01-21 5248f59a22 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA
+ 2021-01-21 970d8b6cb2 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet in inlining
+ 2021-01-21 18bd7aa625 [dev.typeparams] cmd/compile: use nil instead of syntax.ImplicitOne
+ 2021-01-21 68a4664475 [dev.regabi] cmd/compile: remove tempAssigns in walkCall1
+ 2021-01-21 fd9a391cdd [dev.regabi] cmd/compile: remove CallExpr.Rargs
+ 2021-01-21 19a6db6b63 [dev.regabi] cmd/compile: make sure mkcall* passed non-nil init
+ 2021-01-21 9f036844db [dev.regabi] cmd/compile: use ir.DoChildren directly in inlining
+ 2021-01-21 213c3905e9 [dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSelect
+ 2021-01-21 2427f6e6c0 [dev.typeparams] cmd/compile: directly set some simple expression types
+ 2021-01-21 455c29af83 [dev.typeparams] cmd/compile/internal/types2: convert untyped arguments to delete
+ 2021-01-21 f03f934ede [dev.typeparams] cmd/compile/internal/types2: make predeclared "any" alias for interface{}
+ 2021-01-20 0f054c5be0 [dev.typeparams] cmd/dist: add -G=3 test coverage
+ 2021-01-20 1760d736f6 [dev.regabi] cmd/compile: exporting, importing, and inlining functions with OCLOSURE
+ 2021-01-20 89ec17be9a [dev.typeparams] cmd/compile: simplify how irgen handles qualified idents
+ 2021-01-20 ecf4ebf100 cmd/internal/moddeps: check content of all modules in GOROOT
+ 2021-01-20 92cb157cf3 [dev.regabi] cmd/compile: late expansion of return values
+ 2021-01-20 d2d155d1ae runtime: don't adjust timer pp field in timerWaiting status
+ 2021-01-20 803d18fc6c cmd/go: set Incomplete field on go list output if no files match embed
+ 2021-01-20 6e243ce71d cmd/go: have go mod vendor copy embedded files in subdirs
+ 2021-01-20 fa01ade41e [dev.typeparams] go/types: add tests from dev.go2go
+ 2021-01-20 734cb8be0a [dev.typeparams] go/types: refactor untyped conversion for typeparams
+ 2021-01-20 be28e5abc5 cmd/go: fix mod_get_fallback test
+ 2021-01-20 928bda4f4a runtime: convert openbsd/amd64 locking to libc
+ 2021-01-20 d8796b5670 [dev.typeparams] cmd/compile/internal/types2: report type of nil based on context
+ 2021-01-19 48a3cb399d [dev.typeparams] go/types: fix some merge errors in call.go
+ 2021-01-19 3e15bf7716 [dev.typeparams] go/types: don't modify Named.underlying in validType
+ 2021-01-19 f38f862417 [dev.typeparams] go/types: strip annotations from errors
+ 2021-01-19 2e64511ac9 [dev.typeparams] go/types: unify methods in missingMethod
+ 2021-01-19 958927c824 [dev.typeparams] go/parser: error for type instances without ParseTypeParams
+ 2021-01-19 90bfc73071 [dev.typeparams] cmd/compile: cache mapped types during irgen
+ 2021-01-19 3c0a39c964 [dev.typeparams] cmd/compile/internal/types: minor fixes/cleanups around testing
+ 2021-01-19 824f2d635c cmd/go: allow go fmt to complete when embedded file is missing
+ 2021-01-19 0575e35e50 cmd/compile: require 'go 1.16' go.mod line for //go:embed
+ 2021-01-19 9423d50d53 [dev.regabi] cmd/compile: use '%q' for printing rune values less than 128
+ 2021-01-19 ccb2e90688 cmd/link: exit before Asmb2 if error
+ 2021-01-19 ca5774a5a5 embed: treat uninitialized FS as empty
+ 2021-01-19 d047c91a6c cmd/link,runtime: switch openbsd/amd64 to pthreads
+ 2021-01-19 61debffd97 runtime: factor out usesLibcall
+ 2021-01-19 9fed39d281 runtime: factor out mStackIsSystemAllocated
+ 2021-01-19 a2f825c542 [dev.regabi] cmd/compile: directly create go.map and go.track symbols
+ 2021-01-19 4a4212c0e5 [dev.regabi] cmd/compile: refactor Linksym creation
+ 2021-01-19 4f5c603c0f [dev.regabi] cmd/compile: cleanup callTargetLSym
+ 2021-01-18 dbab079835 runtime: free Windows event handles after last lock is dropped
+ 2021-01-18 5a8fbb0d2d os: do not close syscall.Stdin in TestReadStdin
+ 2021-01-18 422f38fb6c [dev.regabi] cmd/compile: move stack objects to liveness
+ 2021-01-18 6113db0bb4 [dev.regabi] cmd/compile: convert OPANIC argument to interface{} during typecheck
+ 2021-01-18 4c835f9169 [dev.regabi] cmd/compile: use LinksymOffsetExpr in TypePtr/ItabAddr
+ 2021-01-18 0ffa1ead6e [dev.regabi] cmd/compile: use *obj.LSym instead of *ir.Name for staticdata functions
+ 2021-01-17 7e0fa38aad [dev.regabi] cmd/compile: remove unneeded packages from ir.Pkgs
+ 2021-01-17 99a5db11ac [dev.regabi] cmd/compile: use LinksymOffsetExpr in walkConvInterface
+ 2021-01-17 87845d14f9 [dev.regabi] cmd/compile: add ir.TailCallStmt
+ 2021-01-17 e3027c6828 [dev.regabi] cmd/compile: fix linux-amd64-noopt builder
+ 2021-01-17 59ff93fe64 [dev.regabi] cmd/compile: rename NameOffsetExpr to LinksymOffsetExpr
+ 2021-01-17 82b9cae700 [dev.regabi] cmd/compile: change ir.NameOffsetExpr to use *obj.LSym instead of *Name
+ 2021-01-17 88956fc4b1 [dev.regabi] cmd/compile: stop analyze NameOffsetExpr.Name_ in escape analysis
+ 2021-01-17 7ce2a8383d [dev.regabi] cmd/compile: simplify stack temp initialization
+ 2021-01-17 ba0e8a92fa [dev.regabi] cmd/compile: refactor temp construction in walk
+ 2021-01-17 78e5aabcdb [dev.regabi] cmd/compile: replace Node.HasCall with walk.mayCall
+ 2021-01-16 6de9423445 [dev.regabi] cmd/compile: cleanup OAS2FUNC ordering
+ 2021-01-16 a956a0e909 [dev.regabi] cmd/compile, runtime: fix up comments/error messages from recent renames
+ 2021-01-16 ab3b67abfd [dev.regabi] cmd/compile: remove ONEWOBJ
+ 2021-01-16 c9b1445ac8 [dev.regabi] cmd/compile: remove TypeAssertExpr {Src,Dst}Type fields
+ 2021-01-15 682a1d2176 runtime: detect errors in DuplicateHandle
+ 2021-01-15 9f83418b83 cmd/link: remove GOROOT write in TestBuildForTvOS
+ 2021-01-15 ec9470162f cmd/compile: allow embed into any string or byte slice type
+ 2021-01-15 54198b04db cmd/compile: disallow embed of var inside func
+ 2021-01-15 b386c735e7 cmd/go: fix go generate docs
+ 2021-01-15 502198c8dc [dev.typeparams] cmd/compile/internal/types2: consistently report nil type as "untyped nil"
+ 2021-01-15 bb5075a525 syscall: remove RtlGenRandom and move it into internal/syscall
+ 2021-01-15 1deae0b597 os: invoke processKiller synchronously in testKillProcess
+ 2021-01-15 03a875137f [dev.regabi] cmd/compile: unexport reflectdata.WriteType
+ 2021-01-15 14537e6e54 [dev.regabi] cmd/compile: move stkobj symbol generation to SSA
+ 2021-01-15 ab523fc510 [dev.regabi] cmd/compile: don't promote Byval CaptureVars if Addrtaken
+ 2021-01-15 ff196c3e84 crypto/x509: update iOS bundled roots to version 55188.40.9
+ 2021-01-15 b7a698c73f [dev.regabi] test: disable test on windows because expected contains path separators.
+ 2021-01-15 4be7af23f9 [dev.regabi] cmd/compile: fix ICE during ir.Dump
+ 2021-01-14 e125ccd10e cmd/go: in 'go mod edit', validate versions given to -retract and -exclude
+ 2021-01-14 eb330020dc cmd/dist, cmd/go: pass -arch for C compilation on Darwin
+ 2021-01-14 84e8a06f62 cmd/cgo: remove unnecessary space in cgo export header
+ 2021-01-14 82c3f0a358 [dev.typeparams] cmd/compile/internal/types2: untyped shift counts must fit into uint
+ 2021-01-14 0c86b999c3 cmd/test2json: document passing -test.paniconexit0
+ 2021-01-14 67bf62d939 [dev.typeparams] cmd/compile/internal/types2: better error message for invalid ... use
+ 2021-01-14 9135795891 cmd/go/internal/load: report positions for embed errors
+ 2021-01-14 35b9c66601 [dev.regabi] cmd/compile,cmd/link: additional code review suggestions for CL 270863
+ 2021-01-14 d9b79e53bb cmd/compile: fix wrong complement for arm64 floating-point comparisons
+ 2021-01-14 c73232d08f cmd/go/internal/load: refactor setErrorPos to PackageError.setPos
+ 2021-01-14 6aa28d3e06 go/build: report positions for go:embed directives
+ 2021-01-14 9734fd482d [dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSwitch
+ 2021-01-14 f97983249a [dev.regabi] cmd/compile: move more PAUTOHEAP to SSA construction
+ 2021-01-14 4476300425 [dev.regabi] cmd/compile: use byte for CallExpr.Use
+ 2021-01-14 5a5ab24689 [dev.regabi] cmd/compile: do not rely on CallExpr.Rargs for detect already walked calls
+ 2021-01-14 ef5285fbd0 [dev.typeparams] cmd/compile: add types2-based noder
+ 2021-01-14 983ac4b086 [dev.regabi] cmd/compile: fix ICE when initializing blank vars
+ 2021-01-13 7eb31d999c cmd/go: add hints to more missing sum error messages
+ 2021-01-13 d6d4673728 [dev.regabi] cmd/compile: fix GOEXPERIMENT=regabi builder
+ 2021-01-13 c41b999ad4 [dev.regabi] cmd/compile: refactor abiutils from "gc" into new "abi"
+ 2021-01-13 861707a8c8 [dev.regabi] cmd/compile: added limited //go:registerparams pragma for new ABI dev
+ 2021-01-13 c1370e918f [dev.regabi] cmd/compile: add code to support register ABI spills around morestack calls
+ 2021-01-13 2abd24f3b7 [dev.regabi] test: make run.go error messages slightly more informative
+ 2021-01-13 9a19481acb [dev.regabi] cmd/compile: make ordering for InvertFlags more stable
+ 2021-01-12 f065ff221b [dev.typeparams] all: merge dev.regabi (d9acf6f) into dev.typeparams
+ 2021-01-12 d9acf6f3a3 [dev.regabi] cmd/compile: remove Func.ClosureType
+ 2021-01-12 41352fd401 [dev.regabi] cmd/compile: transform closures during walk
+ 2021-01-12 d6ad88b4db [dev.regabi] cmd/compile: compile functions before closures
+ 2021-01-12 432f9ffb11 [dev.regabi] cmd/compile: unindent compileFunctions
+ 2021-01-12 cc90e7a51e [dev.regabi] cmd/compile: always use the compile queue
+ 2021-01-12 cd5b74d2df [dev.regabi] cmd/compile: call NeedFuncSym in InitLSym
+ 2021-01-12 ba76567bc2 cmd/go/internal/modload: delete unused *mvsReqs.next method
+ 2021-01-12 665def2c11 encoding/asn1: document unmarshaling behavior for IMPLICIT string fields
+ 2021-01-12 95acd8121b [dev.regabi] cmd/compile: remove Name.Typegen
+ 2021-01-12 12ee55ba7b [dev.regabi] cmd/compile: stop using Vargen for import/export
+ 2021-01-12 b4d2a0445b [dev.regabi] cmd/compile: refactor closure var setup/teardown
+ 2021-01-12 099599662d [dev.typeparams] cmd/compile: refactor import logic
+ 2021-01-12 106aa941df [dev.typeparams] cmd/compile: refactor DWARF scope marking
+ 2021-01-12 6a56c6c870 [dev.typeparams] go/types: import dev.go2go changes to check tests
+ 2021-01-12 f57f484053 [dev.regabi] cmd/compile: decouple escape analysis from Name.Vargen
+ 2021-01-11 81ea89adf3 cmd/go: fix non-script staleness checks interacting badly with GOFLAGS
+ 2021-01-11 9e746e4255 [dev.typeparams] cmd/compile: refactor varEmbed logic
+ 2021-01-11 3e1a87ac2a [dev.typeparams] cmd/compile: extract posMap from noder
+ 2021-01-11 2e8f29b79d [dev.typeparams] cmd/compile: add types2.Sizes implementation
+ 2021-01-11 759309029f doc: update editors.html for Go 1.16
+ 2021-01-11 44d1a8523a [dev.typeparams] cmd/compile/internal/types2: fixes for all.bash
+ 2021-01-11 8123bc90b8 [dev.typeparams] cmd/go: relax test expectation
+ 2021-01-11 8c5aa42c79 [dev.typeparams] cmd/compile: calculate variable sizes in walk
+ 2021-01-11 1ce0854157 [dev.typeparams] import stmt changes from dev.go2go
+ 2021-01-11 eb53a6c7cf [dev.typeparams] import operand.go changes from dev.go2go
+ 2021-01-11 81cd99858d [dev.typeparams] go/types: import expr changes from dev.go2go
+ 2021-01-11 c3b4c7093a cmd/internal/objfile: don't require runtime.symtab symbol for XCOFF
+ 2021-01-10 7fd84c6e46 [dev.regabi] cmd/compile: remove OCLOSUREREAD
+ 2021-01-10 c9c26d7ffb [dev.regabi] cmd/compile: use ClosureVars for method value wrappers
+ 2021-01-10 950cf4d46c [dev.regabi] cmd/compile: bind closure vars during SSA constructions
+ 2021-01-10 8b2efa990b [dev.regabi] cmd/compile: deref PAUTOHEAPs during SSA construction
+ 2021-01-08 59bfc18e34 cmd/go: add hint to read 'go help vcs' to GOVCS errors
+ 2021-01-08 6ee9b118a2 [dev.regabi] cmd/compile: remove fmt_test code; it has outlived its usefulness
+ 2021-01-08 822aeacd9e [dev.typeparams] cmd/compile/internal/syntax: remove ShortString, use String instead
+ 2021-01-08 cd6f3a54e4 cmd/go: revise 'go help' documentation for modules
+ 2021-01-08 6192b98751 cmd/go: make hints in error messages more consistent
+ 2021-01-08 25886cf4bd cmd/go: preserve sums for indirect deps fetched by 'go mod download'
+ 2021-01-08 6250833911 runtime/metrics: mark histogram metrics as cumulative
+ 2021-01-08 8f6a9acbb3 runtime/metrics: remove unused StopTheWorld Description field
+ 2021-01-08 d017a1b649 [dev.typeparams] cmd/compile/internal/syntax: add Walk node vistor from types2
+ 2021-01-08 7903214fcc [dev.typeparams] cmd/compile/internal/syntax: add ShortString tests
+ 2021-01-08 0aede1205b [dev.typeparams] cmd/compile/internal/types2: use syntax printer to print expressions
+ 2021-01-08 934f9dc0ef [dev.typeparams] cmd/compile/internal/syntax: clean up node printing API
+ 2021-01-08 6598c65646 cmd/compile: fix exponential-time init-cycle reporting
+ 2021-01-08 fefad1dc85 test: fix timeout code for invoking compiler
+ 2021-01-08 6728118e0a cmd/go: pass signals forward during "go tool"
+ 2021-01-08 e65c543f3c go/build/constraint: add parser for build tag constraint expressions
+ 2021-01-08 0c5afc4fb7 testing/fstest,os: clarify racy behavior of TestFS
+ 2021-01-08 32afcc9436 runtime/metrics: change unit on *-by-size metrics to match bucket unit
+ 2021-01-08 c6513bca5a io/fs: minor corrections to Glob doc
+ 2021-01-08 b241938e04 [dev.regabi] cmd/compile: fix some methods error text
+ 2021-01-08 304f769ffc cmd/compile: don't short-circuit copies whose source is volatile
+ 2021-01-08 ae97717133 runtime,runtime/metrics: use explicit histogram boundaries
+ 2021-01-08 a9ccd2d795 go/build: skip string literal while findEmbed
+ 2021-01-08 d92f8add32 archive/tar: fix typo in comment
+ 2021-01-08 cab1202183 cmd/link: accept extra blocks in TestFallocate
+ 2021-01-08 ee4d32249b io/fs: minor corrections to Glob release date
+ 2021-01-08 54bd1ccce2 cmd: update to latest golang.org/x/tools
+ 2021-01-07 9ec21a8f34 Revert "reflect: support multiple keys in struct tags"
+ 2021-01-07 091414b5b7 io/fs: correct WalkDirFunc documentation
+ 2021-01-07 9b55088d6b doc/go1.16: add release note for disallowing non-ASCII import paths
+ 2021-01-07 5b9152de57 [dev.typeparams] all: merge dev.regabi (cb05a0a) into dev.typeparams
+ 2021-01-07 fa90aaca7d cmd/compile: fix late expand_calls leaf type for OpStructSelect/OpArraySelect
+ 2021-01-07 7cee66d4cb cmd/go: add documentation for Embed fields in go list output
+ 2021-01-07 e60cffa4ca html/template: attach functions to namespace
+ 2021-01-07 6da2d3b7d7 cmd/link: fix typo in asm.go
+ 2021-01-07 7e689f86e3 [dev.typeparams] go/types: move use and useLHS to match dev.go2go
+ 2021-01-07 df81a15819 runtime: check mips64 VDSO clock_gettime return code
+ 2021-01-06 4787e906cf crypto/x509: rollback new CertificateRequest fields
+ 2021-01-06 c9658bee93 cmd/go: make module suggestion more friendly
+ 2021-01-06 4c668b25c6 runtime/metrics: fix panic message for Float64Histogram
+ 2021-01-06 d76cefed1f [dev.typeparams] go/types: remove disabled code related to type lists
+ 2021-01-06 0e286579c5 [dev.typeparams] go/types: import typexpr.go from dev.go2go
+ 2021-01-06 9546596d77 [dev.typeparams] cmd/compile/internal/types2: remove disabled code related to type lists
+ 2021-01-06 196102d046 [dev.typeparams] cmd/compile/internal/types2: review of typexpr.go
+ 2021-01-06 d2131704a6 net/http/httputil: fix deadlock in DumpRequestOut
+ 2021-01-05 3e1e13ce6d cmd/go: set cfg.BuildMod to "readonly" by default with no module root
+ 2021-01-05 0b0d004983 cmd/go: pass embedcfg to gccgo if supported
+ 2021-01-05 cb05a0aa6a [dev.regabi] cmd/compile: remove toolstash scaffolding
+ 2021-01-05 9821838832 [dev.regabi] cmd/compile: remove CaptureVars
+ 2021-01-05 fd43831f44 [dev.regabi] cmd/compile: reimplement capture analysis
+ 2021-01-05 fb69c67cad [dev.regabi] test: enable finalizer tests on !amd64
+ 2021-01-05 1b85e7c057 cmd/go: don't scan gccgo standard library packages for imports
+ 2021-01-05 81f4f0e912 [dev.regabi] cmd/compile: remove race-y check in Name.Canonical
+ 2021-01-05 6b37b15d95 runtime: don't take allglock in tracebackothers
+ 2021-01-05 4a9d9adea4 [dev.regabi] cmd/compile: remove initname function
+ 2021-01-05 a8fe098a12 [dev.typeparams] all: merge dev.regabi (77365c5) into dev.typeparams
+ 2021-01-05 77365c5ed7 [dev.regabi] cmd/compile: add Name.Canonical and move Byval
+ 2021-01-05 e09783cbc0 [dev.regabi] cmd/compile: make ir.StaticValue safer
+ 2021-01-05 9aa950c407 [dev.regabi] cmd/compile: make ir.OuterValue safer
+ 2021-01-05 eb626409d1 [dev.regabi] cmd/compile: simplify CaptureVars
+ 2021-01-05 c28ca67a96 [dev.regabi] cmd/compile: fix ir.Dump for []*CaseClause, etc
+ 2021-01-04 9eef49cfa6 math/rand: fix typo in comment
+ 2021-01-04 b01fb2af9e testing/fstest: fix typo in error message
+ 2021-01-04 f24e40c14a [dev.regabi] cmd/compile: remove Name.Class_ accessors
+ 2021-01-04 d89705e087 [dev.regabi] cmd/compile: fix re-export of parameters
+ 2021-01-04 290b4154b7 [dev.regabi] cmd/compile: fix ICE due to large uint64 constants
+ 2021-01-04 a30fd52884 [dev.regabi] cmd/compile: use ir.NewNameAt in SubstArgTypes
+ 2021-01-03 8fc44cf0fa [dev.regabi] cmd/compile: remove a couple CloneName calls
+ 2021-01-03 907a4bfdc7 [dev.regabi] cmd/compile: fix map assignment order
+ 2021-01-03 f2e6dab048 [dev.regabi] cmd/compile: remove walkReturn "common case" path
+ 2021-01-03 d36a6bf44d [dev.regabi] cmd/compile: improve walkReturn common case
+ 2021-01-03 a317067d65 [dev.regabi] cmd/compile: improve ascompatee
+ 2021-01-03 5d80a590a2 [dev.regabi] cmd/compile: simplify walkReturn
+ 2021-01-03 bb1b6c95c2 [dev.regabi] cmd/compile: remove Node.{,Set}Walkdef
+ 2021-01-03 57c426c9a5 [dev.regabi] cmd/compile: tighten typecheckdef to *ir.Name
+ 2021-01-03 b1747756e3 [dev.regabi] cmd/compile: reorganize escape analysis somewhat
+ 2021-01-02 f2538033c0 [dev.regabi] cmd/compile: remove Nodes.Set [generated]
+ 2021-01-02 2f2d4b4e68 [dev.regabi] cmd/compile: remove {Ptr,Set}Init from Node interface
+ 2021-01-01 3dd5867605 doc: 2021 is the Year of the Gopher
+ 2021-01-01 1544a03198 [dev.regabi] cmd/compile: refactor redundant type conversion [generated]
+ 2021-01-01 7958a23ea3 [dev.regabi] cmd/compile: use *ir.Name where possible in inl.go
+ 2021-01-01 bfa97ba48f [dev.regabi] test: add another closure test case
+ 2021-01-01 67ad695416 [dev.regabi] cmd/compile: split escape analysis state
+ 2021-01-01 fad9a8b528 [dev.regabi] cmd/compile: simplify inlining of closures
+ 2021-01-01 7d55669847 [dev.regabi] cmd/compile: simplify dwarfgen.declPos
+ 2021-01-01 9ed1577779 [dev.regabi] cmd/compile: remove Func.ClosureEnter
+ 2021-01-01 ece345aa69 [dev.regabi] cmd/compile: expand documentation for Func.Closure{Vars,Enter}
+ 2021-01-01 6ddbc75efd [dev.regabi] cmd/compile: earlier deadcode removal
+ 2021-01-01 68e6fa4f68 [dev.regabi] cmd/compile: fix package-initialization order
+ 2021-01-01 3a4474cdfd [dev.regabi] cmd/compile: some more manual shuffling
+ 2021-01-01 0f1d2129c4 [dev.regabi] cmd/compile: reshuffle type-checking code [generated]
+ 2021-01-01 b8fd3440cd [dev.regabi] cmd/compile: report unused variables during typecheck
+ 2021-01-01 fd22df9905 [dev.regabi] cmd/compile: remove idempotent Name() calls [generated]
+ 2020-12-31 dfbcff80c6 [dev.regabi] cmd/compile: make copyExpr return *ir.Name directly
+ 2020-12-31 77fd81a3e6 [dev.regabi] cmd/compile: use names for keep alive variables in function call
+ 2020-12-31 8fe1197654 [dev.regabi] cmd/compile: remove Name.orig
+ 2020-12-31 477b049060 [dev.regabi] cmd/compile: fix printing of method expressions
+ 2020-12-31 95ce805d14 io/fs: remove darwin/arm64 special condition
+ 2020-12-30 20d0991b86 lib/time, time/tzdata: update tzdata to 2020f
+ 2020-12-30 ed301733bb misc/cgo/testcarchive: remove special flags for Darwin/ARM
+ 2020-12-30 0ae2e032f2 misc/cgo/test: enable TestCrossPackageTests on darwin/arm64
+ 2020-12-30 178c667db2 [dev.regabi] cmd/compile: fix OSLICEARR comments
+ 2020-12-30 f0d99def5b [dev.regabi] cmd/compile: add newline to ir.Dump
+ 2020-12-30 451693af71 [dev.regabi] cmd/compile: simplify typecheckdef
+ 2020-12-30 0c1a899a6c [dev.regabi] cmd/compile: fix defined-pointer method call check
+ 2020-12-30 f9b67f76a5 [dev.regabi] cmd/compile: change ir.DoChildren to use bool result type
+ 2020-12-30 499851bac8 [dev.regabi] cmd/compile: generalize ir/mknode.go
+ 2020-12-30 82ab3d1448 [dev.regabi] cmd/compile: use *ir.Name for Decl.X
+ 2020-12-30 9958b7ed3e [dev.regabi] cmd/compile: unexport ir.FmtNode
+ 2020-12-29 780b4de16b misc/ios: fix wording for command line instructions
+ 2020-12-29 b4a71c95d2 doc/go1.16: reference misc/ios/README for how to build iOS programs
+ 2020-12-29 f83e0f6616 misc/ios: add to README how to build ios executables
+ 2020-12-29 f5816624cd [dev.regabi] cmd/compile: change AddrExpr.Alloc to AddrExpr.Prealloc
+ 2020-12-29 850aa7c60c [dev.regabi] cmd/compile: use *ir.Name instead of ir.Node for CaseClause.Var
+ 2020-12-29 37babc97bb [dev.regabi] cmd/compile: allow visitor visits *ir.Name
+ 2020-12-29 5cf3c87fa6 [dev.regabi] cmd/compile: generate case/comm clause functions in mknode.go
+ 2020-12-29 b3e1ec97fd [dev.regabi] cmd/compile: move new addrtaken bit back to the old name
+ 2020-12-29 0620c674dd [dev.regabi] cmd/compile: remove original addrtaken bit
+ 2020-12-29 0523d525ae [dev.regabi] cmd/compile: separate out address taken computation from typechecker
+ 2020-12-29 9ea272e5ec [dev.regabi] cmd/compile: simplify ir.Func somewhat
+ 2020-12-29 e40cb4d4ae [dev.regabi] cmd/compile: remove more unused code
+ 2020-12-29 6f30c95048 [dev.regabi] cmd/compile: remove unneeded indirection
+ 2020-12-29 171fc6f223 [dev.regabi] cmd/compile: remove workarounds for go/constant issues
+ 2020-12-29 33801cdc62 [dev.regabi] cmd/compile: use Ntype where possible
+ 2020-12-29 82ad3083f8 [dev.regabi] cmd/compile: remove typ from AssignOpStmt
+ 2020-12-29 e34c44a7c4 [dev.regabi] cmd/compile: refactoring typecheck arith
+ 2020-12-29 a5ec920160 [dev.regabi] cmd/compile: more Linksym cleanup
+ 2020-12-29 ec59b197d5 [dev.regabi] cmd/compile: rewrite to use linksym helpers [generated]
+ 2020-12-29 25c613c02d [dev.regabi] cmd/compile: add Linksym helpers
+ 2020-12-29 289da2b33e [dev.regabi] cmd/compile: move Node.Opt to Name
+ 2020-12-29 6acbae4fcc [dev.regabi] cmd/compile: address some ir TODOs
+ 2020-12-29 4629f6a51d [dev.regabi] cmd/compile: merge {Selector,CallPart,Method}Expr
+ 2020-12-29 e563715b30 [dev.regabi] cmd/compile: remove Sym.Importdef
+ 2020-12-29 3f370b75fb [dev.regabi] cmd/compile: cleanup //go:generate directives
+ 2020-12-28 4fd9455882 io/fs: fix typo in comment
+ 2020-12-28 a800acaae1 [dev.typeparams] all: merge dev.regabi (07569da) into dev.typeparams
+ 2020-12-28 07569dac4e [dev.regabi] all: merge master (1d78139) into dev.regabi
+ 2020-12-28 76136be027 [dev.regabi] cmd/compile: check for recursive import in ImportBody
+ 2020-12-28 fda7ec3a3f [dev.regabi] cmd/compile: remove Name.IsDDD, etc
+ 2020-12-28 098a6490b9 [dev.regabi] cmd/compile: remove Declare in makepartialcall
+ 2020-12-28 137f0d2e06 [dev.regabi] cmd/compile: remove unnecessary Name.Sym call
+ 2020-12-28 3383b5c74a [dev.regabi] cmd/compile: flatten dependency graph [generated]
+ 2020-12-28 f8afb8216a [dev.regabi] cmd/compile: rename CommStmt and CaseStmt [generated]
+ 2020-12-28 5f3bd59a0d [dev.regabi] cmd/compile: remove some unneeded code in package ir
+ 2020-12-28 3bdafb0d82 [dev.regabi] cmd/compile: remove CommStmt.List
+ 2020-12-28 2ecf52b841 [dev.regabi] cmd/compile: separate CommStmt from CaseStmt
+ 2020-12-28 ed9772e130 [dev.regabi] cmd/compile: add explicit file name in types generation
+ 2020-12-28 a59d26603f [dev.regabi] cmd/compile: use []*CaseStmt in {Select,Switch}Stmt
+ 2020-12-28 fbc4458c06 [dev.regabi] cmd/compile: simplify some tree traversal code
+ 2020-12-28 6c67677541 [dev.regabi] cmd/compile: simplify FuncName and PkgFuncName
+ 2020-12-28 676d794b81 [dev.regabi] cmd/compile: remove refersToCommonName
+ 2020-12-28 c98548e110 [dev.regabi] cmd/compile: merge ascompatee, ascompatee1, and reorder3
+ 2020-12-28 4c215c4fa9 [dev.regabi] cmd/compile: simplify and optimize reorder3
+ 2020-12-28 e6c973198d [dev.regabi] cmd/compile: stop mangling SelectorExpr.Sel for ODOTMETH
+ 2020-12-28 135ce1c485 [dev.regabi] cmd/compile: desugar OMETHEXPR into ONAME during walk
+ 2020-12-28 0f732f8c91 [dev.regabi] cmd/compile: minor walkExpr cleanups
+ 2020-12-28 0de8eafd98 [dev.regabi] cmd/compile: remove SelectorExpr.Offset field
+ 2020-12-28 a4f335f420 [dev.regabi] cmd/compile: always use a Field for ODOTPTR expressions
+ 2020-12-27 dd40bbc57b [dev.typeparams] cmd/compile: re-enable internal/types2 test
+ 2020-12-26 1d78139128 runtime/cgo: fix Android build with NDK 22
+ 2020-12-25 2018b68a65 net/mail: don't use MDT in test
+ 2020-12-25 e4f293d853 [dev.regabi] cmd/compile: fix OCALLMETH desugaring
+ 2020-12-25 1d9a1f67d5 [dev.regabi] cmd/compile: don't emit reflect data for method types
+ 2020-12-25 396b6c2e7c [dev.regabi] cmd/compile: cleanup assignment typechecking
+ 2020-12-25 e24d2f3d05 [dev.regabi] cmd/compile: remove typ from RangeStmt
+ 2020-12-25 2785c691c2 [dev.regabi] cmd/compile: cleanup devirtualization docs
+ 2020-12-25 4b1d0fe66f [dev.regabi] cmd/compile: new devirtualization pkg [generated]
+ 2020-12-24 082cc8b7d9 [dev.regabi] cmd/compile: change ir.IsAssignable -> ir.IsAddressable
+ 2020-12-24 27b248b307 [dev.regabi] cmd/compile: separate range stmt Vars to Key, Value nodes
+ 2020-12-23 40818038bf [dev.regabi] cmd/compile: change CaseStmt.Vars to Var
+ 2020-12-23 b116404444 runtime: shift timeHistogram buckets and allow negative durations
+ 2020-12-23 8db7e2fecd runtime: fix allocs-by-size and frees-by-size buckets
+ 2020-12-23 fb96f07e1a runtime: fix nStackRoots comment about stack roots
+ 2020-12-23 d1502b3c72 lib/time, time/tzdata: update tzdata to 2020e
+ 2020-12-23 30c99cbb7a cmd/go: add the Retract field to 'go help mod edit' definition of the GoMod struct
+ 2020-12-23 49d0b239cb doc: fix a typo in contribute.html
+ 2020-12-23 9eeed291bc [dev.regabi] cmd/compile: eliminate usage of ir.Node in liveness
+ 2020-12-23 d1d64e4cea [dev.regabi] cmd/compile: split SliceExpr.List into separate fields
+ 2020-12-23 98a73030b0 cmd/go: in 'go get', promote named implicit dependencies to explicit
+ 2020-12-23 d19018e8f1 [dev.regabi] cmd/compile: split SliceHeaderExpr.LenCap into separate fields
+ 2020-12-23 53f082b0ee [dev.regabi] cmd/compile: cleanup export code further
+ 2020-12-23 31267f82e1 [dev.regabi] cmd/compile: simplify function/interface/struct typechecking
+ 2020-12-23 addade2cce [dev.regabi] cmd/compile: prefer types constructors over typecheck
+ 2020-12-23 18ebfb49e9 [dev.regabi] cmd/compile: cleanup noder
+ 2020-12-23 87a592b356 [dev.regabi] cmd/compile: cleanup import/export code
+ 2020-12-23 5898025026 [dev.regabi] cmd/compile: update mkbuiltin.go to use new type constructors
+ 2020-12-23 63c96c2ee7 [dev.regabi] cmd/compile: update mkbuiltin.go and re-enable TestBuiltin
+ 2020-12-23 d99dd17827 [dev.typeparams] all: merge dev.regabi (37f138d) into dev.typeparams
+ 2020-12-23 37f138df6b [dev.regabi] cmd/compile: split out package test [generated]
+ 2020-12-23 3d8a3cb06b [dev.regabi] cmd/compile: split out package pkginit [generated]
+ 2020-12-23 3f04d964ab [dev.regabi] cmd/compile: split up walkexpr1, walkstmt [generated]
+ 2020-12-23 e4895ab4c0 [dev.regabi] cmd/compile: split out package walk [generated]
+ 2020-12-23 01fd2d05c8 [dev.regabi] cmd/compile: split out package dwarfgen [generated]
+ 2020-12-23 6c34d2f420 [dev.regabi] cmd/compile: split out package ssagen [generated]
+ 2020-12-23 de65151e50 [dev.regabi] cmd/compile: split out package reflectdata [generated]
+ 2020-12-23 4dfb5d91a8 [dev.regabi] cmd/compile: split out package staticdata [generated]
+ 2020-12-23 fbc82f03b1 [dev.regabi] cmd/compile: split out package noder [generated]
+ 2020-12-23 de454eef5f [dev.regabi] cmd/compile: split out package escape [generated]
+ 2020-12-23 071ab0a14c [dev.regabi] cmd/compile: split out package liveness [generated]
+ 2020-12-23 0ced54062e [dev.regabi] cmd/compile: split out package objw [generated]
+ 2020-12-23 575fd6ff0a [dev.regabi] cmd/compile: split out package inline [generated]
+ 2020-12-23 0256ba99a8 [dev.regabi] cmd/compile: split up typecheck1 [generated]
+ 2020-12-23 b9693d7627 [dev.regabi] cmd/compile: split out package typecheck [generated]
+ 2020-12-23 dac0de3748 [dev.regabi] cmd/compile: move type size calculations into package types [generated]
+ 2020-12-23 527a1895d6 [dev.regabi] cmd/compile: move helpers into package ir [generated]
+ 2020-12-23 65c4c6dfb2 [dev.regabi] cmd/compile: group known symbols, packages, names [generated]
+ 2020-12-23 9ee309255a [dev.regabi] cmd/compile: move helpers into package types [generated]
+ 2020-12-23 ead4957892 [dev.regabi] cmd/compile: move helpers into package base [generated]
+ 2020-12-23 440308ffd7 [dev.regabi] cmd/compile: simplify Nodes usage [generated]
+ 2020-12-23 f9d373720e [dev.regabi] cmd/compile: remove Left, Right etc methods [generated]
+ 2020-12-23 14d667341f [dev.regabi] cmd/compile: remove Node.Left etc [generated]
+ 2020-12-23 6f27d29be0 [dev.regabi] cmd/compile: remove ir.Nod [generated]
+ 2020-12-23 fd6ba1c8a2 os/signal: fix a deadlock with syscall.AllThreadsSyscall() use
+ 2020-12-23 69cf39089f [dev.regabi] cmd/compile: do not die in early base.FlushErrors
+ 2020-12-22 8b1fbd8215 [dev.typeparams] all: merge dev.regabi (6d03cde) into dev.typeparams
+ 2020-12-23 6d03cde88a [dev.regabi] cmd/dist: automatically bootstrap cmd subdirs
+ 2020-12-23 b0b0d98283 runtime: linux iscgo support for not blocking nptl signals
+ 2020-12-22 23922cf83b [dev.typeparams] all: merge dev.regabi (d1d1099) into dev.typeparams
+ 2020-12-23 788dad53c5 [dev.typeparams] cmd/compile/internal/types2: disable external test temporarily
+ 2020-12-23 d1d1099c91 [dev.regabi] cmd/compile: fixes for big rewrite
+ 2020-12-22 223331fc0c cmd/go/internal/modload: add hint for missing implicit dependency
+ 2020-12-22 91cc51e005 [dev.typeparams] all: merge dev.regabi (ec741b0) into dev.typeparams
+ 2020-12-22 ec741b0447 [dev.regabi] all: merge master (c9fb4eb) into dev.regabi
+ 2020-12-22 e02a007ffd [dev.typeparams] codereview.cfg: add config for dev.typeparams
+ 2020-12-22 acc32ea124 [dev.regabi] codereview.cfg: add config for dev.regabi
+ 2020-12-22 c9fb4eb0a2 cmd/link: handle grouped resource sections
+ 2020-12-22 c40934b33d [dev.regabi] cmd/compile: adjust one case in walkexpr
+ 2020-12-22 280e7fd1ee [dev.regabi] cmd/compile: only access Func method on concrete types
+ 2020-12-22 51ba53f5c2 [dev.regabi] cmd/compile: separate misc for gc split
+ 2020-12-22 572f168ed2 [dev.regabi] cmd/compile: separate various from Main
+ 2020-12-22 3b12c6dc08 [dev.regabi] cmd/compile: separate typecheck more cleanly
+ 2020-12-22 7c8f5356ab [dev.regabi] cmd/compile: separate dowidth better
+ 2020-12-22 c06a354bcc test: trigger SIGSEGV instead of SIGTRAP in issue11656.go
+ 2020-12-22 0aa9b4709a cmd/pack: r command create output file if not exist
+ 2020-12-22 cb28c96be8 [dev.regabi] cmd/compile,cmd/link: initial support for ABI wrappers
+ 2020-12-22 41e7901ca4 [dev.typeparams] cmd/compile/internal/types2: report error for invalid main function signature
+ 2020-12-22 53c4c17b09 [dev.typeparams] all: merge dev.regabi into dev.typeparams
+ 2020-12-22 c8610e4700 [dev.regabi] cmd/compile: add ir.BasicLit to represent literals
+ 2020-12-22 3512cde10a [dev.regabi] cmd/compile: stop reusing Ntype for OSLICELIT length
+ 2020-12-22 2755361e6a [dev.regabi] cmd/compile: change noder.declNames to returns ir.Names
+ 2020-12-22 301af2cb71 [dev.regabi] runtime/race: adjust test pattern match for ABI wrapper
+ 2020-12-22 306b2451c8 [dev.regabi] runtime: fix ABI targets in runtime.panic{Index,Slice} shims
+ 2020-12-21 94cfeca0a5 [dev.regabi] cmd/compile: stop using ONONAME with Name
+ 2020-12-21 cb4898a77d [dev.regabi] cmd/compile: simplify declaration importing
+ 2020-12-21 06915ac14d [dev.regabi] cmd/compile: move itabname call out of implements
+ 2020-12-21 4e8f681eff Merge "[dev.regabi] all: merge master into dev.regabi" into dev.regabi
+ 2020-12-21 1a523c8ab0 [dev.regabi] cmd/compile: separate nowritebarrierrec from main
+ 2020-12-21 e999c17022 [dev.regabi] cmd/compile: separate ssa from other phases
+ 2020-12-21 4836e28ac0 [dev.regabi] cmd/compile: separate noder more cleanly
+ 2020-12-21 85ce6ecfe3 [dev.regabi] cmd/compile: separate exportsym more cleanly
+ 2020-12-21 1a3b036b83 [dev.regabi] cmd/compile: collect global compilation state
+ 2020-12-21 2153a99914 [dev.regabi] cmd/compile: setup to move Addrconst, Patch into cmd/internal/obj
+ 2020-12-21 0bb0baf683 [dev.regabi] cmd/compile: cleanup for concrete types - more
+ 2020-12-21 ca8e17164e [dev.regabi] all: merge master into dev.regabi
+ 2020-12-18 c45313bf45 [dev.regabi] cmd/compile: remove prealloc map
+ 2020-12-18 ffb0cb7044 [dev.regabi] cmd/compile: remove uses of Name.Offset, Name.copy
+ 2020-12-18 c76be2a24e [dev.regabi] cmd/compile: add ONAMEOFFSET, delete to-be-deleted fields
+ 2020-12-18 4e8f1e139f [dev.regabi] cmd/compile: cleanup for concrete types - sinit
+ 2020-12-18 27aba22651 [dev.regabi] cmd/compile: cleanup for concrete types - walk
+ 2020-12-18 0b9cb63b8d [dev.regabi] cmd/compile: rename ir.Find to ir.Any and update uses
+ 2020-12-17 060cdbc7b5 [dev.typeparams] go/types: import object resolution from dev.go2go
+ 2020-12-17 c4f0da5750 [dev.typeparams] cmd/compile/internal/types2: remove code for implicit type arguments
+ 2020-12-17 aeedc9f804 [dev.regabi] cmd/compile: remove OSELRECV
+ 2020-12-17 0328c3b660 [dev.regabi] cmd/compile: use OSELRECV2 for all <-c variants
+ 2020-12-17 88e1415d08 [dev.regabi] cmd/compile: add type assertion in regabi test
+ 2020-12-17 9c384e881e [dev.regabi] cmd/compile: cleanup for concrete types - mop-up
+ 2020-12-17 be64c8bece [dev.regabi] cmd/compile: cleanup for concrete types - noder
+ 2020-12-17 5024396563 [dev.regabi] cmd/compile: cleanup for concrete types - subr
+ 2020-12-17 dd67b13d07 [dev.regabi] cmd/compile: cleanup for concrete types - range, select, swt
+ 2020-12-17 42fec2ded4 [dev.regabi] cmd/compile: cleanup for concrete types - const
+ 2020-12-17 389ae3d5ba [dev.regabi] cmd/compile: cleanup for concrete types - inl
+ 2020-12-17 5fe64298a4 [dev.regabi] cmd/compile: cleanup for concrete types - import/export
+ 2020-12-17 aa55d4e54b [dev.regabi] cmd/compile: cleanup for concrete types - escape
+ 2020-12-17 846740c17f [dev.regabi] cmd/compile: cleanup for concrete types - ssa
+ 2020-12-17 bf9bbbd6ed [dev.regabi] cmd/compile: cleanup for concrete types - order
+ 2020-12-17 4ac6a6317b [dev.regabi] cmd/compile: cleanup for concrete types - typecheck
+ 2020-12-17 f6efa3d4a4 [dev.regabi] cmd/compile: simplify ir.Find, replace ir.Inspect with ir.Visit
+ 2020-12-17 f6d2834f8f [dev.regabi] cmd/compile: limit Implicit method to nodes where it is defined
+ 2020-12-17 7fde0d2b50 [dev.regabi] cmd/compile: remove use of Initorder, Offset Node fields for initorder
+ 2020-12-17 114af2a044 [dev.regabi] cmd/compile: change Nodes to be a slice
+ 2020-12-17 4dfc7333f4 [dev.regabi] cmd/compile: update ir/fmt for concrete types
+ 2020-12-17 a997543292 [dev.regabi] cmd/compile: fix potential closure waste in Order
+ 2020-12-17 578fbbe3aa [dev.regabi] cmd/compile: rewrite some generic ir.Nod calls
+ 2020-12-17 5ae70b85c6 [dev.regabi] cmd/compile: cleanup preparing for concrete types, 2
+ 2020-12-17 fa06894b36 [dev.regabi] cmd/compile: cleanup preparing for concrete types
+ 2020-12-16 068dd0470b [dev.typeparams] cmd/compile/internal/syntax: don't panic when providing -verify
+ 2020-12-16 7909d6ec28 [dev.typeparams] cmd/compile/internal/syntax: type parameters must always be named
+ 2020-12-16 3b5918c757 [dev.typeparams] cmd/compile/internal/types2: review of predicates.go
+ 2020-12-16 09abd23d9e [dev.typeparams] go/types: import predicates.go from dev.go2go
+ 2020-12-16 f38da2cbb6 [dev.typeparams] cmd/compile/internal/types2: review of unify.go
+ 2020-12-16 ceb77db24f [dev.typeparams] go/types: import some support functions from dev.go2go
+ 2020-12-15 a4d4c10340 [dev.typeparams] go/types: import lookup logic from dev.go2go
+ 2020-12-15 1306435103 [dev.typeparams] go/types: import changes to types.Info from dev.go2go
+ 2020-12-15 6b18081d01 [dev.typeparams] cmd/compile/internal/types2: don't crash if import path is missing
+ 2020-12-15 14e4267c34 [dev.typeparams] cmd/compile/internal/types2: report error for invalid (but empty) expr switch
+ 2020-12-15 96999296e6 [dev.typeparams] go/types: import unify.go and infer.go from dev.go2go
+ 2020-12-15 4c2d66f642 [dev.regabi] cmd/compile: use ir.Ident for imported identifiers
+ 2020-12-15 305d93ef84 [dev.regabi] cmd/compile: type check externdcl earlier
+ 2020-12-15 9f16620f46 [dev.regabi] cmd/compile: fix latent Sym.SetPkgDef issue
+ 2020-12-15 5aff757efc [dev.typeparams] cmd/compile/internal/gc: provide types2 selection info to noder
+ 2020-12-14 fea898a4b0 [dev.regabi] cmd/compile: intercept the making of OADDR nodes
+ 2020-12-14 c8e73489c3 go/types: import instance.expand and subst.go from dev.go2go
+ 2020-12-14 3a912f279f [dev.typeparams] cmd/compile/internal/syntax: export NewName and use it
+ 2020-12-14 617383377f [dev.regabi] cmd/compile: reorg generated array hash loop
+ 2020-12-14 8ec9e89000 [dev.typeparams] cmd/compile/internal/types2: fix stray ')' in error
+ 2020-12-14 8fe8e29c9f [dev.typeparams] cmd/compile/internal/types2: report error for invalid type expression
+ 2020-12-14 f8930a2413 [dev.typeparams] cmd/compile/internal/types2: report invalid ... in conversions
+ 2020-12-14 5aca6e7857 [dev.typeparams] test: finish triaging all outstanding failing tests
+ 2020-12-14 df58f3368e [dev.typeparams] cmd/compile/internal/types2: don't report two errors for bad strings
+ 2020-12-14 91803a2df3 [dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams'
+ 2020-12-14 89f38323fa [dev.regabi] cmd/compile: add register ABI analysis utilities
+ 2020-12-14 8ce37e4110 [dev.regabi] cmd/compile: fix noopt builder
+ 2020-12-14 7e17b46c58 [dev.regabi] cmd/compile/internal/types: add IsScalar query method
+ 2020-12-14 2b76429eb0 [dev.regabi] cmd/compile: refactor type initialization code into helper
+ 2020-12-14 9c5241e520 [dev.regabi] cmd/compile: remove unnecessary String methods
+ 2020-12-14 267975dc47 Merge branch 'master' into dev.regabi
+ 2020-12-11 a20021227e [dev.typeparams] cmd/compile/internal/types2: bring over subst.go changes from go/types
+ 2020-12-10 ddf44904f1 [dev.typeparams] test: exclude 32bit-specific test that fails on 32bit platforms (fix build)
+ 2020-12-10 dbce27d29c [dev.typeparams] cmd/compile/internal/types2: report correct line number for missing key
+ 2020-12-09 edf80c4209 [dev.typeparams] cmd/compile/internal/types2: adjusted more error messages for compiler
+ 2020-12-09 43c7b214db [dev.typeparams] cmd/compile/internal/types2: adjusted qualified identifier error message for compiler
+ 2020-12-09 6812eae2e2 [dev.typeparams] cmd/compile/internal/types2: adjust init cycle error message for compiler
+ 2020-12-09 810957b155 [dev.typeparams] cmd/compile/internal/types2: adjusted array error message for compiler
+ 2020-12-09 63bc23b545 [dev.regabi] cmd/compile: first start towards using Ident
+ 2020-12-09 eae8fd519b [dev.regabi] cmd/compile: iexport debug crumbs for toolstash
+ 2020-12-09 837b35cc55 [dev.regabi] cmd/compile: adjust IR representations
+ 2020-12-09 0c49440664 [dev.regabi] cmd/compile: arrange for walkstmt, walkexpr, to return from switch cases
+ 2020-12-09 4090af83c5 [dev.regabi] cmd/compile: use reflection in ir.Dump
+ 2020-12-09 e2d278bfeb [dev.regabi] cmd/compile: two small fixes
+ 2020-12-09 c32566c336 [dev.typeparams] cmd/compile/internal/types2: avoid endless recursion in Comparable predicate
+ 2020-12-08 6015c4e543 [dev.typeparams] go/*: add TODOs from CLs importing dev.go2go changes
+ 2020-12-08 b6e678573d [dev.typeparams] go/types: import universe changes from dev.go2go
+ 2020-12-08 14dc2d2345 [dev.typeparams] go/types: import the Type API from dev.go2go
+ 2020-12-08 dbf2fc8cff [dev.regabi] cmd/compile: replace many uses of ir.Node with *ir.Name
+ 2020-12-08 bb31c75343 [dev.regabi] cmd/compile: ir.Node is no longer an ssa.Aux
+ 2020-12-08 6db970e20a [dev.regabi] cmd/compile: rewrite Aux uses of ir.Node to *ir.Name [generated]
+ 2020-12-08 1c8943a6ad [dev.regabi] cmd/compile: introduce FwdRefAux for wrapping ir.Node as ssa.Aux
+ 2020-12-08 dcec658f6c [dev.regabi] cmd/compile: change LocalSlot.N to *ir.Name
+ 2020-12-08 1a98ab0e2d [dev.regabi] cmd/compile: add ssa.Aux tag interface for Value.Aux
+ 2020-12-07 63722da46b [dev.regabi] cmd/compile: fix comment
+ 2020-12-07 6d783e7440 [dev.regabi] cmd/compile: export all Node fields [generated]
+ 2020-12-07 2de0af3b1b [dev.regabi] cmd/compile: prepare mknode for rename of Func.body
+ 2020-12-07 724374f859 [dev.regabi] cmd/compile: rewrite stale format strings
+ 2020-12-07 61889ba680 [dev.regabi] cmd/compile: simplify fmtmap
+ 2020-12-07 6ea2b8c54c [dev.regabi] cmd/compile: clean up and document formatting
+ 2020-12-07 bb4a37bd93 [dev.regabi] cmd/compile: move Type, Sym printing to package types [generated]
+ 2020-12-07 70155cca81 [dev.regabi] cmd/compile: untangle FmtFlag, FmtMode
+ 2020-12-07 3904a62829 [dev.regabi] cmd/compile: remove mode.Sprintf etc in printer
+ 2020-12-07 fb17dfa43d [dev.regabi] cmd/compile: narrow interface between ir and types
+ 2020-12-07 3b25f3c150 [dev.regabi] cmd/compile: simplify Op, Node, Nodes printing
+ 2020-12-07 8ce2605c5b [dev.regabi] cmd/compile: untangle ir.Dump printing
+ 2020-12-07 158c9dd131 [dev.regabi] cmd/compile: reorganize ir/fmt.go
+ 2020-12-07 a79742f39a [dev.regabi] cmd/compile: remove "short" node header mode
+ 2020-12-07 ef5964dd6b [dev.regabi] cmd/compile: arrange for typecheck1 to end in switch
+ 2020-12-07 dcc640e839 [dev.regabi] test: add exhaustive test of evaluated but not used
+ 2020-12-07 2cec6c4a8c [dev.regabi] cmd/compile: generate Node methods using program
+ 2020-12-07 cd15a48036 [dev.typeparams] cmd/compile/internal/types2: correct error position for inherited const init expression
+ 2020-12-07 d90b199e9c [dev.regabi] cmd/compile: silence errors about missing blank methods
+ 2020-12-06 e885df2731 [dev.regabi] cmd/compile: change iexport to avoid map[ir.Node]
+ 2020-12-06 2d4c95565a [dev.regabi] cmd/compile: change nowritebarrierrec to use map[*ir.Func]
+ 2020-12-06 1b5eed8982 [dev.regabi] cmd/compile: replace NodeQueue with NameQueue
+ 2020-12-06 6c5967e528 [dev.regabi] cmd/compile: change NodeSet to NameSet
+ 2020-12-04 02820d61a9 [dev.typeparams] test: enable some more errorcheck tests
+ 2020-12-04 46b6e70e3b [dev.regabi] cmd/compile: replace ir.Node with *ir.Name in Order
+ 2020-12-04 b75f51c645 [dev.regabi] cmd/compile: replace ir.Node with *ir.Name in Liveness
+ 2020-12-04 133b03e1c3 [dev.regabi] cmd/compile: rewrite code to use DeclaredBy
+ 2020-12-04 d9cb84c84b [dev.regabi] cmd/compile: add SameSource, Uses, and DeclaredBy helpers
+ 2020-12-04 5dbd2e8e44 [dev.regabi] cmd/compile: remove DeepCopyNode interface
+ 2020-12-04 9ab3d854ad [dev.regabi] cmd/compile: avoid general traversal in deadcode
+ 2020-12-04 bb5aa2b664 [dev.regabi] cmd/compile: implement editChildren for nodes
+ 2020-12-04 4725c3ffd1 [dev.regabi] cmd/compile: implement doChildren for nodes
+ 2020-12-04 18f2df7e81 [dev.regabi] cmd/compile: implement copy for nodes
+ 2020-12-04 d855b30fe4 [dev.regabi] cmd/compile: use ir.EditChildren for inline rewriting
+ 2020-12-04 b9df26d7a8 [dev.regabi] cmd/compile: use ir.Find for "search" traversals
+ 2020-12-04 0d1b44c645 [dev.regabi] cmd/compile: introduce IR visitors
+ 2020-12-04 7fcf5b994c [dev.regabi] cmd/compile: replace inlcopy with ir.DeepCopy
+ 2020-12-04 989a3f5041 [dev.regabi] cmd/compile: adjustments to Copy and DeepCopy
+ 2020-12-04 99ecfcae31 [dev.regabi] cmd/compile: swap inlining order of if then vs else blocks
+ 2020-12-04 84cb51d7d7 [dev.regabi] cmd/compile: eliminate more SetOrig
+ 2020-12-03 9ff27e9fad [dev.typeparams] test: run all errorcheck tests that pass compiler with -G flag
+ 2020-12-03 351bc2f38c [dev.regabi] cmd/compile: store types.Field on {Selector,CallPart}Expr
+ 2020-12-03 a2058bac21 [dev.regabi] cmd/compile: add ConstExpr
+ 2020-12-03 beb5e05404 [dev.regabi] cmd/compile: refactoring prep for ConstExpr
+ 2020-12-03 7a1aa7dfaf [dev.typeparams] test: adjust more test cases to match compiler -G output
+ 2020-12-03 7e81135be7 [dev.regabi] cmd/compile: rename addinit(n, init) to initExpr(init, n)
+ 2020-12-03 6e30fc10fc [dev.regabi] all: merge master (d0c0dc682c) into dev.regabi
+ 2020-12-03 07d32c8183 [dev.typeparams] cmd/compile/internal/types: adjust some error messages to match the compiler
+ 2020-12-03 59b8916d48 [dev.regabi] cmd/compile: handle OCONVNOP better in ssa
+ 2020-12-03 00e5727790 [dev.regabi] cmd/compile: remove okAs
+ 2020-12-03 5a3b6796cd [dev.regabi] cmd/compile: remove extra typ field in Name struct
+ 2020-12-03 6b4da14dd3 [dev.typeparams] cmd/compile: provide scaffolding to get types2 types during noding
+ 2020-12-02 64bc656aed [dev.regabi] cmd/compile: use explicit block statements for init
+ 2020-12-02 72cc2353f0 [dev.typeparams] go/printer: adapt changes from dev.go2go
+ 2020-12-02 ecc8d15bc5 [dev.regabi] cmd/compile: delete OEMPTY
+ 2020-12-02 ec5f349b22 [dev.regabi] cmd/compile: merge OBLOCK and OEMPTY
+ 2020-12-02 c769d393de [dev.regabi] cmd/compile: add ir.NewDeclNameAt
+ 2020-12-02 c10b0ad628 [dev.regabi] cmd/compile: add Pkg parameter to type constructors
+ 2020-12-02 42e46f4ae0 [dev.regabi] cmd/compile: comment out //go:linkname warning
+ 2020-12-02 77a71e0057 [dev.regabi] cmd/compile: add Interface, Signature, and Struct constructors
+ 2020-12-02 15085f8974 [dev.regabi] cmd/compile: tweak hash bucket type descriptor
+ 2020-12-02 ab18125567 [dev.typeparams] cmd/compile/internal/types2: no "declared but not used" errors for invalid var decls
+ 2020-12-02 036245862a [dev.typeparams] cmd/compile/internal/types2: set compiler error message for undeclared variable
+ 2020-12-01 1408d26ccc [dev.regabi] cmd/compile: cleanup some leftover cruft
+ 2020-12-01 bdc4ffe9a8 [dev.typeparams] cmd/compile/internal/types2: add Config.IgnoreBranches flag
+ 2020-12-01 72ad2f44ea [dev.typeparams] test: add scaffolding to run.go to check compiler with -G flag
+ 2020-12-01 87bc85a846 [dev.typeparams] cmd/compile/internal/types2: adjustments toward matching compiler error messages
+ 2020-12-01 5ffa275f3c [dev.regabi] cmd/compile: first pass at abstracting Type
+ 2020-12-01 6ca23a45fe [dev.regabi] cmd/compile: only save ONAMEs on Curfn.Dcl
+ 2020-12-01 a17c5e2fce [dev.regabi] cmd/compile: add NewBasic and cleanup universe
+ 2020-12-01 f37aa5e4e2 [dev.regabi] cmd/compile: add NewNamed
+ 2020-12-01 63a6f08b39 [dev.regabi] cmd/compile: move setUnderlying to package types
+ 2020-12-01 f2311462ab [dev.regabi] cmd/compile: cleanup type-checking of defined types
+ 2020-12-01 2d6ff998ed [dev.regabi] cmd/compile: process //go:linknames after declarations
+ 2020-12-01 ecff7628ea [dev.regabi] cmd/compile: unexport Node.RawCopy
+ 2020-12-01 4da41fb3f8 [dev.regabi] cmd/compile: use ir.Copy instead of direct use of RawCopy
+ 2020-12-01 fbc4c6a3ae [dev.typeparams] cmd/compile/internal/types2: remove support for type parameter pointer designation
+ 2020-12-01 dadfc80bc1 [dev.regabi] cmd/compile: improve findTypeLoop
+ 2020-12-01 45f3b646d4 [dev.regabi] cmd/compile: add OSTMTEXPR Op
+ 2020-12-01 9a5a11adfa [dev.regabi] cmd/compile: add custom expression Node implementations
+ 2020-12-01 0f9f27287b [dev.regabi] cmd/compile: remove types.InitSyms
+ 2020-11-30 41ad4dec99 [dev.regabi] cmd/compile: fix -h
+ 2020-11-30 ffa68716a0 [dev.regabi] cmd/compile: add custom statement Node implementations
+ 2020-11-30 2bc814cd18 [dev.regabi] cmd/compile: clean up ONEW node
+ 2020-11-30 b7f67b75d2 [dev.regabi] cmd/compile: clean up in preparation for expression Nodes
+ 2020-11-30 5fc192af56 [dev.regabi] cmd/compile: clean up Order.copyExpr TODO
+ 2020-11-30 7c9b6b1ca2 [dev.regabi] cmd/compile: clean up in preparation for statement Nodes
+ 2020-11-30 c6de5d8d1f [dev.regabi] cmd/compile: simplify export data representation of nil
+ 2020-11-30 ae1a337809 [dev.regabi] cmd/compile: remove ODCLFIELD and ODDD ops
+ 2020-11-30 4e7685ef1a [dev.regabi] cmd/compile: add custom type syntax Node implementations
+ 2020-11-30 d40869fced [dev.regabi] cmd/compile: move gc.treecopy to ir.DeepCopy
+ 2020-11-30 f0001e8867 [dev.regabi] cmd/compile: add OTSLICE Op
+ 2020-11-30 1b84aabb01 [dev.regabi] cmd/compile: move typenod, typenodl to ir.TypeNode, ir.TypeNodeAt [generated]
+ 2020-11-30 e5c6463e20 [dev.regabi] cmd/compile: add ir.CallPartExpr
+ 2020-11-30 4eaef981b5 [dev.regabi] cmd/compile: add ir.Closure, ir.ClosureRead
+ 2020-11-30 e84b27bec5 [dev.regabi] cmd/compile: clean up Name and Func uses
+ 2020-11-30 c4bd0b7474 [dev.regabi] cmd/compile: make ir.Func the ODCLFUNC Node implementation
+ 2020-11-30 65ae15ac5d [dev.regabi] cmd/compile: move func code from node.go to func.go
+ 2020-11-30 862f638a89 [dev.regabi] cmd/compile: make ir.Name the ONAME Node implementation
+ 2020-11-30 f6106d195d [dev.regabi] cmd/compile: add ir.PkgName
+ 2020-11-30 420809ab08 [dev.regabi] cmd/compile: move name code from node.go to name.go
+ 2020-11-30 be3d8b40b5 [dev.regabi] cmd/compile: ir.BranchStmt, add ir.EmptyStmt, ir.LabelStmt
+ 2020-11-30 b09dbc6913 [dev.regabi] cmd/compile: remove SetOp(OEMPTY) calls
+ 2020-11-30 171787efcd [dev.regabi] cmd/compile: remove Orig, SetOrig from Node interface
+ 2020-11-30 79a3d5ce15 [dev.regabi] cmd/compile: setup for new Node implementations
+ 2020-11-30 0c65a2f317 [dev.regabi] cmd/compile: drop Node.HasOpt method
+ 2020-11-30 65f4ec2fae [dev.regabi] cmd/compile: cleanup label handling
+ 2020-11-25 88e33f6ecb [dev.regabi] cmd/compile: fix latent import/export issue with break/continue
+ 2020-11-25 ba9c35aa12 [dev.typeparams] merge dev.regabi 40f5bc4d55 into dev.typeparams
+ 2020-11-25 40f5bc4d55 [dev.regabi] merge master 4481ad6eb6 into dev.regabi
+ 2020-11-25 5c2e14872c [dev.typeparams] merge dev.regabi 41f3af9d04 into dev.typeparams
+ 2020-11-25 41f3af9d04 [dev.regabi] cmd/compile: replace *Node type with an interface Node [generated]
+ 2020-11-25 4d0d9c2c5c [dev.regabi] cmd/compile: introduce ir.INode interface for *ir.Node
+ 2020-11-25 c26aead50c [dev.regabi] cmd/compile: convert types.Node (a pointer) to types.IRNode (an interface)
+ 2020-11-25 acb4d1cef1 [dev.regabi] cmd/compile: use Node getters and setters [generated]
+ 2020-11-25 41ab6689ed [dev.regabi] cmd/compile: rewrite a few ++/--/+=/-= to prep for getters/setters [generated]
+ 2020-11-25 048debb224 [dev.regabi] cmd/compile: remove gc ↔ ssa cycle hacks
+ 2020-11-25 2c25cd5ba7 [dev.typeparams] cmd/compile/internal/types2: a type parameter is a valid type case in a type switch
+ 2020-11-25 84e2bd611f [dev.regabi] cmd/compile: introduce cmd/compile/internal/ir [generated]
+ 2020-11-25 331b8b4797 [dev.regabi] cmd/compile: move okforconst into its own declaration
+ 2020-11-25 26b66fd60b [dev.regabi] cmd/compile: introduce cmd/compile/internal/base [generated]
+ 2020-11-25 eb3086e5a8 [dev.regabi] cmd/compile: finish cleanup of Debug parsing
+ 2020-11-25 3c240f5d17 [dev.regabi] cmd/compile: clean up debug flag (-d) handling [generated]
+ 2020-11-25 756661c82a [dev.regabi] cmd/compile: finish cleanup of Flag initialization
+ 2020-11-25 259fd8adbb [dev.regabi] cmd/compile: fix reporting of overflow
+ 2020-11-25 18573aea3c [dev.regabi] cmd/compile: clean up flag handling [generated]
+ 2020-11-25 6e583d65ab [dev.regabi] cmd/compile: simplify fmt handling of Nodes
+ 2020-11-25 d166ef6876 [dev.regabi] cmd/compile: add Node field getters and setters
+ 2020-11-25 9262909764 [dev.regabi] cmd/compile: rewrite problematic use of Node fields
+ 2020-11-25 9e0e43d84d [dev.regabi] cmd/compile: remove uses of dummy
+ 2020-11-25 4a6b4fd139 [dev.regabi] add FatalfAt and fix Fatalf docs
+ 2020-11-25 484449c641 [dev.regabi] cmd/compile: remove file mistakenly added by CL 272248
+ 2020-11-25 7d72951229 [dev.regabi] cmd/compile: replace Val with go/constant.Value
+ 2020-11-24 6826287c6b [dev.regabi] cmd/compile: replace evconst with non-mutating version
+ 2020-11-24 c22bc745c3 [dev.regabi] cmd/compile: delete n.List after collapsing OADDSTR to OLITERAL
+ 2020-11-24 ee6132a698 [dev.regabi] cmd/compile: introduce OMETHEXPR instead of overloading ONAME
+ 2020-11-24 4f9d54e41d [dev.regabi] cmd/compile: add OMETHEXPR
+ 2020-11-24 fd11a32c92 [dev.regabi] cmd/compile: clean up Node.Func
+ 2020-11-24 8e2106327c [dev.regabi] cmd/compile: clean up tests to know less about Node
+ 2020-11-24 742c05e3bc [dev.regabi] cmd/compile: prep refactoring for switching to go/constant
+ 2020-11-24 0fb733b7f7 [dev.typeparams] go/parser: support the ParseTypeParams mode
+ 2020-11-24 b56762129e [dev.typeparams] import go2go changes to parse type parameters
+ 2020-11-24 015423a15b [dev.regabi] strconv: add to bootstrap packages
+ 2020-11-24 c767d73227 [dev.regabi] cmd/compile: remove CTRUNE
+ 2020-11-24 6dae48fb0b [dev.regabi] cmd/compile: refactor type/value assertions
+ 2020-11-24 88a9e2f9ad [dev.regabi] cmd/compile: replace CTNIL with ONIL
+ 2020-11-24 4af2decf30 [dev.regabi] cmd/compile: add (unused) ONIL constant
+ 2020-11-24 668e3a598f [dev.regabi] cmd/compile: cleanup type switch typechecking
+ 2020-11-24 96f3fb7244 [dev.regabi] go/constant: avoid heap allocations in match
+ 2020-11-24 1abb12fc97 [dev.regabi] go/constant: optimize BitLen
+ 2020-11-24 228b732ad9 [dev.regabi] cmd/compile: prepare for package ir
+ 2020-11-24 e37597f7f0 [dev.regabi] cmd/compile: rename a few 'base' identifiers
+ 2020-11-24 357c576878 [dev.regabi] cmd/compile: clean up error API
+ 2020-11-24 5fd949e4bd [dev.regabi] cmd/compile: initialize importMap lazily
+ 2020-11-24 7b144ed4f7 [dev.regabi] cmd/compile: rewrite concurrentFlagOk to be clearer
+ 2020-11-24 c754f25241 [dev.regabi] cmd/compile/internal/types: remove Func.Nname
+ 2020-11-24 c50c7a8c06 [dev.regabi] cmd/compile/internal/gc: refactor to use stop using Func.Nname
+ 2020-11-24 d5928847de [dev.regabi] cmd/compile/internal/gc: prep for Func.Nname removal refactoring
+ 2020-11-24 a324aebb7d [dev.typeparams] go/types, cmd/compile/internal/types2: fix incorrect string(int) conversion (regression)
+ 2020-11-24 b30c7a8044 [dev.regabi] cmd/compile/internal/gc: add MethodName for getting referenced method
+ 2020-11-24 e1047302bd [dev.regabi] cmd/compile/internal/types: add pos/sym/typ params to NewField
+ 2020-11-20 8fbdacf64c [dev.typeparams] cmd/compile/internal/types2: report constant overflow in binary ops
+ 2020-11-19 b1ae0a0646 [dev.typeparams] Merge branch 'master' into dev.typeparams
+ 2020-11-19 0123c9b321 [dev.typeparams] cmd/compile/internal/types2: report an error for invalid constant values
+ 2020-11-18 2140049172 [dev.typeparams] cmd/compile/internal/types2: port of https://golang.org/cl/270957
+ 2020-11-11 6877ee1e07 [dev.typeparams] cmd/compile: use existing findpkg algorithm when importing through types2
+ 2020-11-03 165ceb09f9 [dev.typeparams] merge master into dev.typeparams
+ 2020-10-28 41ff51ae00 [dev.typeparams] cmd/compile/internal/types2: review of scopes.go
+ 2020-10-27 9392b82919 [dev.typeparams] cmd/compile/internal/types: review of objset.go
+ 2020-10-27 c32ac6c15f [dev.typeparams] cmd/compile/internal/types: review of selection.go
+ 2020-10-27 ff6ab114c9 [dev.typeparams] cmd/compile/internal/types: review of gccgosizes.go
+ 2020-10-27 abb31c2558 [dev.typeparams] cmd/compile/internal/types2: review of hilbert_test.go
+ 2020-10-27 6e98406ac3 [dev.typeparams] cmd/compile/internal/types2: review of initorder.go
+ 2020-10-27 38af45b4cb [dev.typeparams] cmd/compile/internal/types2: review of package.go
+ 2020-10-27 87eab74628 [dev.typeparams] cmd/compile: enable type-checking of generic code
+ 2020-10-23 5bfd2964a6 [dev.typeparams] merge master into dev.typeparams
+ 2020-10-22 a10fe9f6e7 go/ast: import AST changes supporting typeparams from dev.go2go
+ 2020-10-21 7a8a720c80 [dev.typeparams] cmd/compile/internal/types2: add *.go2 (generic) tests
+ 2020-10-21 755d6de1d8 [dev.typeparams] cmd/compile/internal/types2: add some more tests
+ 2020-10-21 1d07306a44 [dev.typeparams] cmd/compile/internal/types2: adjust tests, enable Testdata tests
+ 2020-10-21 befc62a2c4 [dev.typeparams] cmd/compile/internal/types2: add testdata directory
+ 2020-10-21 ca36ba83ab [dev.typeparams] cmd/compile/internal/importer, types2: initial check-in of types2 and importer
+ 2020-10-20 6ff16fe3ee [dev.typeparams] cmd/compile/internal/syntax: add utility functions for testing
+ 2020-10-19 5e46c6a10f [dev.typeparams] cmd/compile/internal/syntax: add Pos method
+ 2020-10-15 e9e58a4d49 [dev.typeparams] cmd/compile/internal/syntax: fix printing of channel types
+ 2020-10-14 73f529845c [dev.typeparams] cmd/compile/internal/syntax: always use IndexExpr node for type instantiation
+ 2020-10-13 48755e06aa [dev.typeparams] cmd/compile: enable parsing of generic code with new -G flag
+ 2020-10-13 7668f02dec [dev.typeparams] cmd/compile/internal/syntax: add type parameter tests
+ 2020-10-13 b627988b0c [dev.typeparams] cmd/compile/internal/syntax: implement parsing of type parameters
+ 2020-10-13 617b633917 [dev.typeparams] cmd/compile/internal/syntax: prepare syntax nodes for type parameters
+ 2020-10-12 986cad14e2 [dev.typeparams] merge master into dev.typeparams

Change-Id: Ie2a2f6e4e2c862a02a9905f48e0eb464e99c0204
This commit is contained in:
Jay Conrod 2021-07-06 10:59:05 -07:00
commit aa4da4f189
4213 changed files with 257011 additions and 161368 deletions

1
.gitignore vendored
View file

@ -37,6 +37,7 @@ _testmain.go
/src/cmd/internal/objabi/zbootstrap.go
/src/go/build/zcgo.go
/src/go/doc/headscan
/src/internal/buildcfg/zbootstrap.go
/src/runtime/internal/sys/zversion.go
/src/unicode/maketables
/test.out

View file

@ -41,7 +41,7 @@ Aeneas Rekkas (arekkas) <aeneas@ory.am>
Afanasev Stanislav <phpprogger@gmail.com>
Agis Anastasopoulos <agis.anast@gmail.com>
Agniva De Sarker <agnivade@yahoo.co.in>
Ahmed Wahed <oneofone@gmail.com>
Ahmed W. Mones <oneofone@gmail.com>
Ahmet Soormally <ahmet@mangomm.co.uk>
Ahmy Yulrizka <yulrizka@gmail.com>
Aiden Scandella <ai@uber.com>
@ -145,7 +145,7 @@ Andy Davis <andy@bigandian.com>
Andy Finkenstadt <afinkenstadt@zynga.com>
Andy Lindeman <andy@lindeman.io>
Andy Maloney <asmaloney@gmail.com>
Andy Pan <panjf2000@gmail.com>
Andy Pan <panjf2000@gmail.com> <panjf2000@golangcn.org> <i@andypan.me>
Andy Walker <walkeraj@gmail.com>
Anfernee Yongkun Gui <anfernee.gui@gmail.com>
Angelo Bulfone <mbulfone@gmail.com>
@ -195,7 +195,7 @@ Ayanamist Yang <ayanamist@gmail.com>
Aymerick Jéhanne <aymerick@jehanne.org>
Azat Kaumov <kaumov.a.r@gmail.com>
Baiju Muthukadan <baiju.m.mail@gmail.com>
Baokun Lee <nototon@gmail.com>
Baokun Lee <nototon@gmail.com> <bk@golangcn.org>
Bartosz Grzybowski <melkorm@gmail.com>
Bastian Ike <bastian.ike@gmail.com>
Ben Burkert <ben@benburkert.com>
@ -1425,6 +1425,7 @@ Wèi Cōngruì <crvv.mail@gmail.com>
Wei Fu <fhfuwei@163.com>
Wei Guangjing <vcc.163@gmail.com>
Weichao Tang <tevic.tt@gmail.com>
Weixie Cui <cuiweixie@gmail.com> <523516579@qq.com>
Wembley G. Leach, Jr <wembley.gl@gmail.com>
Will Faught <will.faught@gmail.com>
Will Storey <will@summercat.com>

View file

@ -30,6 +30,7 @@ Aaron Bieber <deftly@gmail.com>
Aaron Cannon <cannona@fireantproductions.com>
Aaron France <aaron.l.france@gmail.com>
Aaron Jacobs <jacobsa@google.com>
Aaron Jensen <jensen.aaro@gmail.com>
Aaron Kemp <kemp.aaron@gmail.com>
Aaron Patterson <tenderlove@ruby-lang.org>
Aaron Stein <aaronstein12@gmail.com>
@ -66,14 +67,16 @@ Aeneas Rekkas (arekkas) <aeneas@ory.am>
Afanasev Stanislav <phpprogger@gmail.com>
Agis Anastasopoulos <agis.anast@gmail.com>
Agniva De Sarker <agnivade@yahoo.co.in>
Ahmed Wahed <oneofone@gmail.com>
Ahmed W. Mones <oneofone@gmail.com>
Ahmet Alp Balkan <ahmetb@google.com>
Ahmet Soormally <ahmet@mangomm.co.uk>
Ahmy Yulrizka <yulrizka@gmail.com>
Ahsun Ahmed <ahmed.ahsun@gmail.com>
Aidan Coyle <packrat386@gmail.com>
Aiden Scandella <ai@uber.com>
Ainar Garipov <gugl.zadolbal@gmail.com>
Aishraj Dahal <aishraj@users.noreply.github.com>
Ajanthan Balachandran <balaajanthan@gmail.com>
Akhil Indurti <aindurti@gmail.com>
Akihiro Suda <suda.kyoto@gmail.com>
Akshat Kumar <seed@mail.nanosouffle.net>
@ -104,9 +107,11 @@ Alex Buchanan <buchanae@gmail.com>
Alex Carol <alex.carol.c@gmail.com>
Alex Gaynor <alex@alloy.us>
Alex Harford <alex.harford@saucelabs.com>
Alex Hays <alex.hays@leftfieldlabs.com>
Alex Jin <toalexjin@gmail.com>
Alex Kohler <alexjohnkohler@gmail.com>
Alex Myasoedov <msoedov@gmail.com>
Alex Opie <amtopie@gmail.com>
Alex Plugaru <alex@plugaru.org> <alexandru.plugaru@gmail.com>
Alex Schroeder <alex@gnu.org>
Alex Sergeyev <abc@alexsergeyev.com>
@ -119,6 +124,7 @@ Alexander F Rødseth <alexander.rodseth@appeartv.com>
Alexander Greim <alexxx@iltempo.de>
Alexander Guz <kalimatas@gmail.com>
Alexander Kauer <alexander@affine.space>
Alexander Klauer <Alexander.Klauer@googlemail.com>
Alexander Kucherenko <alxkchr@gmail.com>
Alexander Larsson <alexander.larsson@gmail.com>
Alexander Lourier <aml@rulezz.ru>
@ -150,16 +156,19 @@ Alexey Naidonov <alexey.naidyonov@gmail.com>
Alexey Neganov <neganovalexey@gmail.com>
Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
Alexey Semenyuk <alexsemenyuk88@gmail.com>
Alexey Vilenskiy <bynovhack@gmail.com>
Alexis Hildebrandt <surryhill@gmail.com>
Alexis Hunt <lexer@google.com>
Alexis Imperial-Legrand <ail@google.com>
Ali Farooq <ali.farooq0@pm.me>
Ali Rizvi-Santiago <arizvisa@gmail.com>
Aliaksandr Valialkin <valyala@gmail.com>
Alice Merrick <amerrick@google.com>
Alif Rachmawadi <subosito@gmail.com>
Allan Simon <allan.simon@supinfo.com>
Allen Li <ayatane@google.com>
Alok Menghrajani <alok.menghrajani@gmail.com>
Alwin Doss <alwindoss84@gmail.com>
Aman Gupta <aman@tmm1.net>
Amarjeet Anand <amarjeetanandsingh@gmail.com>
Amir Mohammad Saied <amir@gluegadget.com>
@ -168,6 +177,8 @@ Amrut Joshi <amrut.joshi@gmail.com>
An Long <aisk1988@gmail.com>
An Xiao <hac@zju.edu.cn>
Anand K. Mistry <anand@mistry.ninja>
Ananya Saxena <ananyasaxena1@gmail.com>
Anatol Pomozov <anatol.pomozov@gmail.com>
Anders Pearson <anders@columbia.edu>
Anderson Queiroz <contato@andersonq.eti.br>
André Carvalho <asantostc@gmail.com>
@ -199,6 +210,7 @@ Andrew G. Morgan <agm@google.com>
Andrew Gerrand <adg@golang.org>
Andrew Harding <andrew@spacemonkey.com>
Andrew Jackura <ajackura@google.com>
Andrew Kemm <andrewkemm@gmail.com>
Andrew Louis <alouis@digitalocean.com>
Andrew Lutomirski <andy@luto.us>
Andrew Medvedev <andrew.y.medvedev@gmail.com>
@ -216,6 +228,7 @@ Andrew Werner <andrew@upthere.com> <awerner32@gmail.com>
Andrew Wilkins <axwalk@gmail.com>
Andrew Williams <williams.andrew@gmail.com>
Andrew Z Allen <me@andrewzallen.com>
Andrey Bokhanko <andreybokhanko@gmail.com>
Andrey Mirtchovski <mirtchovski@gmail.com>
Andrey Petrov <andrey.petrov@shazow.net>
Andrii Soldatenko <andrii.soldatenko@gmail.com>
@ -227,9 +240,10 @@ Andy Davis <andy@bigandian.com>
Andy Finkenstadt <afinkenstadt@zynga.com>
Andy Lindeman <andy@lindeman.io>
Andy Maloney <asmaloney@gmail.com>
Andy Pan <panjf2000@gmail.com>
Andy Pan <panjf2000@gmail.com> <panjf2000@golangcn.org> <i@andypan.me>
Andy Walker <walkeraj@gmail.com>
Andy Wang <cbeuw.andy@gmail.com>
Andy Williams <andy@andy.xyz>
Andzej Maciusovic <andzej.maciusovic@gmail.com>
Anfernee Yongkun Gui <anfernee.gui@gmail.com>
Angelo Bulfone <mbulfone@gmail.com>
@ -274,6 +288,7 @@ Arne Hormann <arnehormann@gmail.com>
Arnout Engelen <arnout@bzzt.net>
Aron Nopanen <aron.nopanen@gmail.com>
Artem Alekseev <artem.alekseev@intel.com>
Artem Khvastunov <artem.khvastunov@jetbrains.com>
Artem Kolin <artemkaxboy@gmail.com>
Arthur Fabre <arthur@arthurfabre.com>
Arthur Khashaev <arthur@khashaev.ru>
@ -281,8 +296,10 @@ Artyom Pervukhin <artyom.pervukhin@gmail.com>
Arvindh Rajesh Tamilmani <art@a-30.net>
Ashish Gandhi <ag@ashishgandhi.org>
Asim Shankar <asimshankar@gmail.com>
Assel Meher <asselmeher@gmail.com>
Atin Malaviya <amalaviy@akamai.com>
Ato Araki <ato.araki@gmail.com>
Atsushi Toyama <atsushi.tohyama.160.333@gmail.com>
Audrey Lim <audreylh@gmail.com>
Audrius Butkevicius <audrius.butkevicius@gmail.com>
Augusto Roman <aroman@gmail.com>
@ -291,6 +308,7 @@ Aurélien Rainone <aurelien.rainone@gmail.com>
Aurélio A. Heckert <aurium@gmail.com>
Austin Clements <austin@google.com> <aclements@csail.mit.edu>
Avi Flax <avi@timehop.com>
Aviv Klasquin Komissar <avivklas@gmail.com>
awaw fumin <awawfumin@gmail.com>
Awn Umar <awn@cryptolosophy.io>
Axel Wagner <axel.wagner.hh@googlemail.com>
@ -298,20 +316,23 @@ Ayan George <ayan@ayan.net>
Ayanamist Yang <ayanamist@gmail.com>
Ayke van Laethem <aykevanlaethem@gmail.com>
Aymerick Jéhanne <aymerick@jehanne.org>
Ayzat Sadykov <ayzat.ziko.93@gmail.com>
Azat Kaumov <kaumov.a.r@gmail.com>
Baiju Muthukadan <baiju.m.mail@gmail.com>
Balaram Makam <bmakam.qdt@qualcommdatacenter.com>
Balazs Lecz <leczb@google.com>
Baokun Lee <nototon@gmail.com>
Baokun Lee <nototon@gmail.com> <bk@golangcn.org>
Barnaby Keene <accounts@southcla.ws>
Bartosz Grzybowski <melkorm@gmail.com>
Bartosz Oler <brtsz@google.com>
Bastian Ike <bastian.ike@gmail.com>
Ben Burkert <ben@benburkert.com>
Ben Cartwright-Cox <Ben@Benjojo.co.uk>
Ben Eitzen <eitzenb@golang.org>
Ben Fried <ben.fried@gmail.com>
Ben Haines <bhainesva@gmail.com>
Ben Hoyt <benhoyt@gmail.com>
Ben Kraft <benkraft@khanacademy.org>
Ben Laurie <ben@links.org> <benl@google.com>
Ben Lubar <ben.lubar@gmail.com>
Ben Lynn <benlynn@gmail.com>
@ -319,6 +340,7 @@ Ben Olive <sionide21@gmail.com>
Ben Schwartz <bemasc@google.com>
Ben Shi <powerman1st@163.com>
Ben Toews <mastahyeti@gmail.com>
Benjamin Barenblat <bbaren@google.com>
Benjamin Black <b@b3k.us>
Benjamin Cable <cable.benjamin@gmail.com>
Benjamin Hsieh <tanookiben@users.noreply.github.com>
@ -356,6 +378,7 @@ Bobby Powers <bobbypowers@gmail.com>
Boqin Qin <bobbqqin@gmail.com>
Boris Nagaev <nagaev@google.com>
Borja Clemente <borja.clemente@gmail.com>
Boshi Lian <bolian@microsoft.com>
Brad Burch <brad.burch@gmail.com>
Brad Erickson <bderickson@gmail.com>
Brad Fitzpatrick <bradfitz@golang.org> <bradfitz@gmail.com>
@ -368,10 +391,12 @@ Bradford Lamson-Scribner <brad.lamson@gmail.com>
Bradley Falzon <brad@teambrad.net>
Brady Catherman <brady@gmail.com>
Brady Sullivan <brady@bsull.com>
Branden J. Brown <zephyrtronium@gmail.com>
Brandon Bennett <bbennett@fb.com>
Brandon Gilmore <varz@google.com>
Brandon Philips <brandon@ifup.org>
Brandon Ryan <bjryan19@gmail.com>
Brave Cow <rsr715@gmail.com>
Brayden Cloud <bcloud@google.com>
Brendan Daniel Tracey <tracey.brendan@gmail.com>
Brendan O'Dea <bod@golang.org>
@ -389,6 +414,7 @@ Brian Slesinsky <skybrian@google.com>
Brian Smith <ohohvi@gmail.com>
Brian Starke <brian.starke@gmail.com>
Bryan Alexander <Kozical@msn.com>
Bryan Boreham <bjboreham@gmail.com>
Bryan C. Mills <bcmills@google.com>
Bryan Chan <bryan.chan@ca.ibm.com>
Bryan Ford <brynosaurus@gmail.com>
@ -407,6 +433,7 @@ Carl Mastrangelo <notcarl@google.com>
Carl Shapiro <cshapiro@google.com> <cshapiro@golang.org>
Carlisia Campos <carlisia@grokkingtech.io>
Carlo Alberto Ferraris <cafxx@strayorange.com>
Carlos Alexandro Becker <caarlos0@gmail.com>
Carlos Amedee <carlos@golang.org>
Carlos Castillo <cookieo9@gmail.com>
Carlos Cirello <uldericofilho@gmail.com>
@ -422,6 +449,7 @@ Casey Callendrello <squeed@gmail.com>
Casey Marshall <casey.marshall@gmail.com>
Catalin Nicutar <cnicutar@google.com>
Catalin Patulea <catalinp@google.com>
Cathal O'Callaghan <cathalsocallaghan@gmail.com>
Cedric Staub <cs@squareup.com>
Cezar Sá Espinola <cezarsa@gmail.com>
Chad Rosier <mrosier.qdt@qualcommdatacenter.com>
@ -434,10 +462,14 @@ Charles Kenney <charlesc.kenney@gmail.com>
Charles L. Dorian <cldorian@gmail.com>
Charles Lee <zombie.fml@gmail.com>
Charles Weill <weill@google.com>
Charlotte Brandhorst-Satzkorn <catzkorn@gmail.com>
Chauncy Cullitan <chauncyc@google.com>
Chen Zhidong <njutczd@gmail.com>
Chen Zhihan <energiehund@gmail.com>
Cherry Zhang <cherryyz@google.com>
Cherry Mui <cherryyz@google.com>
Chew Choon Keat <choonkeat@gmail.com>
Chiawen Chen <golopot@gmail.com>
Chirag Sukhala <cchirag77@gmail.com>
Cholerae Hu <choleraehyq@gmail.com>
Chotepud Teo <AlexRouSg@users.noreply.github.com>
Chris Ball <chris@printf.net>
@ -460,6 +492,8 @@ Chris Raynor <raynor@google.com>
Chris Roche <rodaine@gmail.com>
Chris Smith <chrsmith@users.noreply.github.com>
Chris Stockton <chrisstocktonaz@gmail.com>
Chris Taylor <taylorza@gmail.com>
Chris Waldon <christopher.waldon.dev@gmail.com>
Chris Zou <chriszou@ca.ibm.com>
Christian Alexander <christian@linux.com>
Christian Couder <chriscool@tuxfamily.org>
@ -467,6 +501,7 @@ Christian Himpel <chressie@googlemail.com> <chressie@gmail.com>
Christian Muehlhaeuser <muesli@gmail.com>
Christian Pellegrin <chri@evolware.org>
Christian R. Petrin <christianpetrin@gmail.com>
Christian Svensson <blue@cmd.nu>
Christine Hansmann <chhansmann@gmail.com>
Christoffer Buchholz <christoffer.buchholz@gmail.com>
Christoph Blecker <admin@toph.ca>
@ -474,6 +509,7 @@ Christoph Hack <christoph@tux21b.org>
Christopher Cahoon <chris.cahoon@gmail.com>
Christopher Guiney <chris@guiney.net>
Christopher Henderson <chris@chenderson.org>
Christopher Hlubek <christopher.hlubek@networkteam.com>
Christopher Koch <chrisko@google.com>
Christopher Loessl <cloessl+github@gmail.com>
Christopher Nelson <nadiasvertex@gmail.com>
@ -506,7 +542,10 @@ Costin Chirvasuta <ctin@google.com>
Craig Citro <craigcitro@google.com>
Cristian Staretu <unclejacksons@gmail.com>
Cuihtlauac ALVARADO <cuihtlauac.alvarado@orange.com>
Cuong Manh Le <cuong@orijtech.com>
Curtis La Graff <curtis@lagraff.me>
Cyrill Schumacher <cyrill@schumacher.fm>
Dai Jie <gzdaijie@gmail.com>
Daisuke Fujita <dtanshi45@gmail.com>
Daisuke Suzuki <daisuzu@gmail.com>
Daker Fernandes Pinheiro <daker.fernandes.pinheiro@intel.com>
@ -525,12 +564,14 @@ Dan Peterson <dpiddy@gmail.com>
Dan Pupius <dan@medium.com>
Dan Scales <danscales@google.com>
Dan Sinclair <dan.sinclair@gmail.com>
Daniel Cohen <dcohen@gatech.edu>
Daniel Cormier <danielc@knowbe4.com>
Daniël de Kok <me@danieldk.eu>
Daniel Fleischman <danielfleischman@gmail.com>
Daniel Ingram <ingramds@appstate.edu>
Daniel Johansson <dajo2002@gmail.com>
Daniel Kerwin <d.kerwin@gini.net>
Daniel Kessler <dkess@google.com>
Daniel Krech <eikeon@eikeon.com>
Daniel Kumor <rdkumor@gmail.com>
Daniel Langner <s8572327@gmail.com>
@ -538,10 +579,12 @@ Daniel Lidén <daniel.liden.87@gmail.com>
Daniel Lublin <daniel@lublin.se>
Daniel Mangum <georgedanielmangum@gmail.com>
Daniel Martí <mvdan@mvdan.cc>
Daniel McCarney <cpu@letsencrypt.org>
Daniel Morsing <daniel.morsing@gmail.com>
Daniel Nadasi <dnadasi@google.com>
Daniel Nephin <dnephin@gmail.com>
Daniel Ortiz Pereira da Silva <daniel.particular@gmail.com>
Daniel S. Fava <danielsfava@gmail.com>
Daniel Skinner <daniel@dasa.cc>
Daniel Speichert <daniel@speichert.pl>
Daniel Theophanes <kardianos@gmail.com>
@ -563,6 +606,7 @@ Dave Cheney <dave@cheney.net>
Dave Day <djd@golang.org>
Dave Grijalva <dgrijalva@ngmoco.com>
Dave MacFarlane <driusan@gmail.com>
Dave Pifke <dave@pifke.org>
Dave Russell <forfuncsake@gmail.com>
David Anderson <danderson@google.com>
David Barnett <dbarnett@google.com>
@ -593,6 +637,7 @@ David McLeish <davemc@google.com>
David Ndungu <dnjuguna@gmail.com>
David NewHamlet <david@newhamlet.com>
David Presotto <presotto@gmail.com>
David Qu <davidqu12345@gmail.com>
David R. Jenni <david.r.jenni@gmail.com>
David Sansome <me@davidsansome.com>
David Stainton <dstainton415@gmail.com>
@ -642,6 +687,7 @@ Diwaker Gupta <diwakergupta@gmail.com>
Dmitri Goutnik <dgoutnik@gmail.com>
Dmitri Popov <operator@cv.dp-net.com>
Dmitri Shuralyov <dmitshur@golang.org> <dmitri@shuralyov.com>
Dmitrii Okunev <xaionaro@gmail.com>
Dmitriy Cherchenko <dcherchenko@gmail.com>
Dmitriy Dudkin <dudkin.dmitriy@gmail.com>
Dmitriy Shelenin <deemok@googlemail.com> <deemok@gmail.com>
@ -655,6 +701,7 @@ Dmitry Yakunin <nonamezeil@gmail.com>
Doga Fincan <doga@icloud.com>
Domas Tamašauskas <puerdomus@gmail.com>
Domen Ipavec <domen@ipavec.net>
Dominic Della Valle <ddvpublic@Gmail.com>
Dominic Green <dominicgreen1@gmail.com>
Dominik Honnef <dominik.honnef@gmail.com>
Dominik Vogt <vogt@linux.vnet.ibm.com>
@ -696,6 +743,7 @@ Elias Naur <mail@eliasnaur.com> <elias.naur@gmail.com>
Elliot Morrison-Reed <elliotmr@gmail.com>
Ellison Leão <ellisonleao@gmail.com>
Emerson Lin <linyintor@gmail.com>
Emil Bektimirov <lefelys@gmail.com>
Emil Hessman <emil@hessman.se>
Emil Mursalimov <mursalimovemeel@gmail.com>
Emilien Kenler <hello@emilienkenler.com>
@ -760,6 +808,7 @@ Fatih Arslan <fatih@arslan.io>
Fazal Majid <majid@apsalar.com>
Fazlul Shahriar <fshahriar@gmail.com>
Federico Bond <federicobond@gmail.com>
Federico Guerinoni <guerinoni.federico@gmail.com>
Federico Simoncelli <fsimonce@redhat.com>
Fedor Indutny <fedor@indutny.com>
Fedor Korotkiy <dartslon@gmail.com>
@ -781,6 +830,7 @@ Florin Patan <florinpatan@gmail.com>
Folke Behrens <folke@google.com>
Ford Hurley <ford.hurley@gmail.com>
Francesc Campoy <campoy@golang.org>
Francesco Guardiani <francescoguard@gmail.com>
Francesco Renzi <rentziass@gmail.com>
Francisco Claude <fclaude@recoded.cl>
Francisco Rojas <francisco.rojas.gallegos@gmail.com>
@ -811,8 +861,10 @@ Gabriel Russell <gabriel.russell@gmail.com>
Gareth Paul Jones <gpj@foursquare.com>
Garret Kelly <gdk@google.com>
Garrick Evans <garrick@google.com>
Garry McNulty <garrmcnu@gmail.com>
Gary Burd <gary@beagledreams.com> <gary.burd@gmail.com>
Gary Elliott <garyelliott@google.com>
Gaurav Singh <gaurav1086@gmail.com>
Gaurish Sharma <contact@gaurishsharma.com>
Gautham Thambidorai <gautham.dorai@gmail.com>
Gauthier Jolly <gauthier.jolly@gmail.com>
@ -827,6 +879,7 @@ Georg Reinke <guelfey@gmail.com>
George Gkirtsou <ggirtsou@gmail.com>
George Hartzell <hartzell@alerce.com>
George Shammas <george@shamm.as> <georgyo@gmail.com>
George Tsilias <tsiliasg@gmail.com>
Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com>
Gerasimos Dimitriadis <gedimitr@gmail.com>
Gergely Brautigam <skarlso777@gmail.com>
@ -862,6 +915,7 @@ GitHub User @frennkie (6499251) <mail@rhab.de>
GitHub User @geedchin (11672310) <geedchin@gmail.com>
GitHub User @GrigoriyMikhalkin (3637857) <grigoriymikhalkin@gmail.com>
GitHub User @hengwu0 (41297446) <41297446+hengwu0@users.noreply.github.com>
GitHub User @hitzhangjie (3725760) <hit.zhangjie@gmail.com>
GitHub User @itchyny (375258) <itchyny@hatena.ne.jp>
GitHub User @jinmiaoluo (39730824) <jinmiaoluo@icloud.com>
GitHub User @jopbrown (6345470) <msshane2008@gmail.com>
@ -873,6 +927,7 @@ GitHub User @LotusFenn (13775899) <fenn.lotus@gmail.com>
GitHub User @ly303550688 (11519839) <yang.liu636@gmail.com>
GitHub User @madiganz (18340029) <zacharywmadigan@gmail.com>
GitHub User @maltalex (10195391) <code@bit48.net>
GitHub User @markruler (38225900) <csu0414@gmail.com>
GitHub User @Matts966 (28551465) <Matts966@users.noreply.github.com>
GitHub User @micnncim (21333876) <micnncim@gmail.com>
GitHub User @mkishere (224617) <224617+mkishere@users.noreply.github.com>
@ -886,6 +941,8 @@ GitHub User @ramenjuniti (32011829) <ramenjuniti@gmail.com>
GitHub User @saitarunreddy (21041941) <saitarunreddypalla@gmail.com>
GitHub User @shogo-ma (9860598) <Choroma194@gmail.com>
GitHub User @skanehira (7888591) <sho19921005@gmail.com>
GitHub User @soolaugust (10558124) <soolaugust@gmail.com>
GitHub User @surechen (7249331) <surechen17@gmail.com>
GitHub User @tatsumack (4510569) <tatsu.mack@gmail.com>
GitHub User @tell-k (26263) <ffk2005@gmail.com>
GitHub User @tennashi (10219626) <tennashio@gmail.com>
@ -908,6 +965,7 @@ Gordon Tyler <gordon@doxxx.net>
Graham King <graham4king@gmail.com>
Graham Miller <graham.miller@gmail.com>
Grant Griffiths <ggp493@gmail.com>
Green Lightning <GreenLightning.git@googlemail.com>
Greg Poirier <greg.istehbest@gmail.com>
Greg Steuck <gnezdo+github@google.com>
Greg Thelen <gthelen@google.com>
@ -920,6 +978,7 @@ Guilherme Garnier <guilherme.garnier@gmail.com>
Guilherme Goncalves <guilhermeaugustosg@gmail.com>
Guilherme Rezende <guilhermebr@gmail.com>
Guillaume J. Charmes <guillaume@charmes.net>
Guillaume Sottas <guillaumesottas@gmail.com>
Günther Noack <gnoack@google.com>
Guobiao Mei <meiguobiao@gmail.com>
Guoliang Wang <iamwgliang@gmail.com>
@ -936,6 +995,8 @@ HAMANO Tsukasa <hamano@osstech.co.jp>
Han-Wen Nienhuys <hanwen@google.com>
Hang Qian <hangqian90@gmail.com>
Hanjun Kim <hallazzang@gmail.com>
Hanlin Shi <shihanlin9@gmail.com>
Haoran Luo <haoran.luo@chaitin.com>
Haosdent Huang <haosdent@gmail.com>
Harald Nordgren <haraldnordgren@gmail.com>
Hari haran <hariharan.uno@gmail.com>
@ -950,9 +1011,11 @@ Håvard Haugen <havard.haugen@gmail.com>
He Liu <liulonnie@gmail.com>
Hector Chu <hectorchu@gmail.com>
Hector Martin Cantero <hector@marcansoft.com>
Hein Khant Zaw <heinkhantzaw1@gmail.com>
Henning Schmiedehausen <henning@schmiedehausen.org>
Henrik Edwards <henrik.edwards@gmail.com>
Henrik Hodne <henrik@hodne.io>
Henrique Vicente <henriquevicente@gmail.com>
Henry Adi Sumarto <henry.adisumarto@gmail.com>
Henry Bubert <google@mindeco.de>
Henry Chang <mr.changyuheng@gmail.com>
@ -969,6 +1032,7 @@ Hironao OTSUBO <motemen@gmail.com>
Hiroshi Ioka <hirochachacha@gmail.com>
Hitoshi Mitake <mitake.hitoshi@gmail.com>
Holden Huang <ttyh061@gmail.com>
Songlin Jiang <hollowman@hollowman.ml>
Hong Ruiqi <hongruiqi@gmail.com>
Hongfei Tan <feilengcui008@gmail.com>
Horacio Duran <horacio.duran@gmail.com>
@ -990,6 +1054,7 @@ Ian Haken <ihaken@netflix.com>
Ian Kent <iankent85@gmail.com>
Ian Lance Taylor <iant@golang.org>
Ian Leue <ian@appboy.com>
Ian Tay <iantay@google.com>
Ian Zapolsky <ianzapolsky@gmail.com>
Ibrahim AshShohail <ibra.sho@gmail.com>
Icarus Sparry <golang@icarus.freeuk.com>
@ -997,9 +1062,11 @@ Iccha Sethi <icchasethi@gmail.com>
Idora Shinatose <idora.shinatose@gmail.com>
Ignacio Hagopian <jsign.uy@gmail.com>
Igor Bernstein <igorbernstein@google.com>
Igor Bolotnikov <igor.v.bolotnikov@gmail.com>
Igor Dolzhikov <bluesriverz@gmail.com>
Igor Vashyst <ivashyst@gmail.com>
Igor Zhilianin <igor.zhilianin@gmail.com>
Ikko Ashimine <eltociear@gmail.com>
Illya Yalovyy <yalovoy@gmail.com>
Ilya Sinelnikov <sidhmangh@gmail.com>
Ilya Tocar <ilya.tocar@intel.com>
@ -1037,6 +1104,7 @@ Jacob Blain Christen <dweomer5@gmail.com>
Jacob H. Haven <jacob@cloudflare.com>
Jacob Hoffman-Andrews <github@hoffman-andrews.com>
Jacob Walker <jacobwalker0814@gmail.com>
Jaden Teng <long.asyn@gmail.com>
Jae Kwon <jae@tendermint.com>
Jake B <doogie1012@gmail.com>
Jakob Borg <jakob@nym.se>
@ -1044,6 +1112,7 @@ Jakob Weisblat <jakobw@mit.edu>
Jakub Čajka <jcajka@redhat.com>
Jakub Kaczmarzyk <jakubk@mit.edu>
Jakub Ryszard Czarnowicz <j.czarnowicz@gmail.com>
Jakub Warczarek <jakub.warczarek@gmail.com>
Jamal Carvalho <jamal.a.carvalho@gmail.com>
James Aguilar <jaguilar@google.com>
James Bardin <j.bardin@gmail.com>
@ -1056,9 +1125,11 @@ James Eady <jmeady@google.com>
James Fysh <james.fysh@gmail.com>
James Gray <james@james4k.com>
James Hartig <fastest963@gmail.com>
James Kasten <jdkasten@google.com>
James Lawrence <jljatone@gmail.com>
James Meneghello <rawrz0r@gmail.com>
James Myers <jfmyers9@gmail.com>
James Naftel <james.naftel@gmail.com>
James Neve <jamesoneve@gmail.com>
James Nugent <james@jen20.com>
James P. Cooper <jamespcooper@gmail.com>
@ -1108,6 +1179,7 @@ Javier Kohen <jkohen@google.com>
Javier Revillas <jrevillas@massivedynamic.io>
Javier Segura <javism@gmail.com>
Jay Conrod <jayconrod@google.com>
Jay Lee <BusyJayLee@gmail.com>
Jay Taylor <outtatime@gmail.com>
Jay Weisskopf <jay@jayschwa.net>
Jean de Klerk <deklerk@google.com>
@ -1140,14 +1212,17 @@ Jeremy Jay <jeremy@pbnjay.com>
Jeremy Schlatter <jeremy.schlatter@gmail.com>
Jeroen Bobbeldijk <jerbob92@gmail.com>
Jeroen Simonetti <jeroen@simonetti.nl>
Jérôme Doucet <jerdct@gmail.com>
Jerrin Shaji George <jerrinsg@gmail.com>
Jess Frazelle <me@jessfraz.com>
Jesse Szwedko <jesse.szwedko@gmail.com>
Jesús Espino <jespinog@gmail.com>
Jia Zhan <jzhan@uber.com>
Jiacai Liu <jiacai2050@gmail.com>
Jiahao Lu <lujjjh@gmail.com>
Jianing Yu <jnyu@google.com>
Jianqiao Li <jianqiaoli@google.com>
Jiayu Yi <yijiayu@gmail.com>
Jie Ma <jienius@outlook.com>
Jihyun Yu <yjh0502@gmail.com>
Jim Cote <jfcote87@gmail.com>
@ -1183,6 +1258,7 @@ Joey Geiger <jgeiger@users.noreply.github.com>
Johan Brandhorst <johan.brandhorst@gmail.com>
Johan Euphrosine <proppy@google.com>
Johan Jansson <johan.jansson@iki.fi>
Johan Knutzen <johan@senri.se>
Johan Sageryd <j@1616.se>
John Asmuth <jasmuth@gmail.com>
John Beisley <huin@google.com>
@ -1210,6 +1286,7 @@ Johnny Luo <johnnyluo1980@gmail.com>
Jon Chen <jchen@justin.tv>
Jon Johnson <jonjohnson@google.com>
Jonas Bernoulli <jonas@bernoul.li>
Jonathan Albrecht <jonathan.albrecht@ibm.com>
Jonathan Allie <jonallie@google.com>
Jonathan Amsterdam <jba@google.com>
Jonathan Boulle <jonathanboulle@gmail.com>
@ -1223,6 +1300,7 @@ Jonathan Pentecost <pentecostjonathan@gmail.com>
Jonathan Pittman <jmpittman@google.com> <jonathan.mark.pittman@gmail.com>
Jonathan Rudenberg <jonathan@titanous.com>
Jonathan Stacks <jonstacks13@gmail.com>
Jonathan Swinney <jswinney@amazon.com>
Jonathan Wills <runningwild@gmail.com>
Jonathon Lacher <jonathon.lacher@gmail.com>
Jongmin Kim <atomaths@gmail.com>
@ -1233,6 +1311,7 @@ Jordan Krage <jmank88@gmail.com>
Jordan Lewis <jordanthelewis@gmail.com>
Jordan Liggitt <liggitt@google.com>
Jordan Rhee <jordanrh@microsoft.com>
Jordan Rupprecht <rupprecht@google.com>
Jordi Martin <jordimartin@gmail.com>
Jorge Araya <jorgejavieran@yahoo.com.mx>
Jorge L. Fatta <jorge.fatta@auth0.com>
@ -1276,6 +1355,7 @@ Julien Salleyron <julien.salleyron@gmail.com>
Julien Schmidt <google@julienschmidt.com>
Julio Montes <julio.montes@intel.com>
Jun Zhang <jim.zoumo@gmail.com>
Junchen Li <junchen.li@arm.com>
Junda Liu <junda@celer.network>
Jungho Ahn <jhahn@google.com>
Junya Hayashi <ledmonster@gmail.com>
@ -1287,6 +1367,7 @@ Justin Nuß <nuss.justin@gmail.com>
Justyn Temme <justyntemme@gmail.com>
Kai Backman <kaib@golang.org>
Kai Dong <dokia2357@gmail.com>
Kai Lüke <kai@kinvolk.io>
Kai Trukenmüller <ktye78@gmail.com>
Kale Blankenship <kale@lemnisys.com>
Kaleb Elwert <kelwert@atlassian.com>
@ -1314,6 +1395,7 @@ Kazuhiro Sera <seratch@gmail.com>
KB Sriram <kbsriram@google.com>
Keegan Carruthers-Smith <keegan.csmith@gmail.com>
Kei Son <hey.calmdown@gmail.com>
Keiichi Hirobe <chalenge.akane@gmail.com>
Keiji Yoshida <keijiyoshida.mail@gmail.com>
Keisuke Kishimoto <keisuke.kishimoto@gmail.com>
Keith Ball <inflatablewoman@gmail.com>
@ -1322,6 +1404,7 @@ Keith Rarick <kr@xph.us>
Kelly Heller <pestophagous@gmail.com>
Kelsey Hightower <kelsey.hightower@gmail.com>
Kelvin Foo Chuan Lyi <vmirage@gmail.com>
Kemal Elmizan <kemalelmizan@gmail.com>
Ken Friedenbach <kenliz@cruzio.com>
Ken Rockot <ken@oz.gs> <ken.rockot@gmail.com>
Ken Sedgwick <ken@bonsai.com>
@ -1331,6 +1414,7 @@ Kenji Kaneda <kenji.kaneda@gmail.com>
Kenji Yano <kenji.yano@gmail.com>
Kenneth Shaw <kenshaw@gmail.com>
Kenny Grant <kennygrant@gmail.com>
Kensei Nakada <handbomusic@gmail.com>
Kenta Mori <zoncoen@gmail.com>
Kerollos Magdy <kerolloz@yahoo.com>
Ketan Parmar <ketanbparmar@gmail.com>
@ -1342,10 +1426,12 @@ Kevin Gillette <extemporalgenome@gmail.com>
Kevin Kirsche <kev.kirsche@gmail.com>
Kevin Klues <klueska@gmail.com> <klueska@google.com>
Kevin Malachowski <chowski@google.com>
Kevin Parsons <kevpar@microsoft.com>
Kevin Ruffin <kruffin@gmail.com>
Kevin Vu <kevin.m.vu@gmail.com>
Kevin Zita <bleedgreenandgold@gmail.com>
Keyan Pishdadian <kpishdadian@gmail.com>
Keyuan Li <keyuanli123@gmail.com>
Kezhu Wang <kezhuw@gmail.com>
Khosrow Moossavi <khos2ow@gmail.com>
Kieran Colford <kieran@kcolford.com>
@ -1358,6 +1444,7 @@ Kirill Smelkov <kirr@nexedi.com>
Kirill Tatchihin <kirabsuir@gmail.com>
Kirk Han <kirk91.han@gmail.com>
Kirklin McDonald <kirklin.mcdonald@gmail.com>
KJ Tsanaktsidis <ktsanaktsidis@zendesk.com>
Klaus Post <klauspost@gmail.com>
Kodie Goodwin <kodiegoodwin@gmail.com>
Koichi Shiraishi <zchee.io@gmail.com>
@ -1371,6 +1458,7 @@ Kris Kwiatkowski <kris@cloudflare.com>
Kris Nova <kris@nivenly.com>
Kris Rousey <krousey@google.com>
Kristopher Watts <traetox@gmail.com>
Krzysztof Dąbrowski <krzysdabro@live.com>
Kshitij Saraogi <kshitijsaraogi@gmail.com>
Kun Li <likunarmstrong@gmail.com>
Kunpei Sakai <namusyaka@gmail.com>
@ -1412,8 +1500,10 @@ Leonardo Comelli <leonardo.comelli@gmail.com>
Leonel Quinteros <leonel.quinteros@gmail.com>
Lev Shamardin <shamardin@gmail.com>
Lewin Bormann <lewin.bormann@gmail.com>
Lewis Waddicor <nemesismk2@gmail.com>
Liam Haworth <liam@haworth.id.au>
Lily Chung <lilithkchung@gmail.com>
Lingchao Xin <douglarek@gmail.com>
Lion Yang <lion@aosc.xyz>
Liz Rice <liz@lizrice.com>
Lloyd Dewolf <foolswisdom@gmail.com>
@ -1427,6 +1517,7 @@ Luan Santos <cfcluan@gmail.com>
Lubomir I. Ivanov <neolit123@gmail.com>
Luca Bruno <luca.bruno@coreos.com>
Luca Greco <luca.greco@alcacoop.it>
Luca Spiller <luca@stackednotion.com>
Lucas Bremgartner <lucas.bremgartner@gmail.com>
Lucas Clemente <lclemente@google.com>
Lucien Stuker <lucien.stuker@gmail.com>
@ -1450,6 +1541,8 @@ Maarten Bezemer <maarten.bezemer@gmail.com>
Maciej Dębski <maciejd@google.com>
Madhu Rajanna <madhupr007@gmail.com>
Magnus Hiie <magnus.hiie@gmail.com>
Mahdi Hosseini Moghaddam <seyed.mahdi.hosseini.moghaddam@ibm.com>
Maia Lee <maia.lee@leftfieldlabs.com>
Maicon Costa <maiconscosta@gmail.com>
Mak Kolybabi <mak@kolybabi.com>
Maksym Trykur <maksym.trykur@gmail.com>
@ -1470,6 +1563,7 @@ Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
Marcel van Lohuizen <mpvl@golang.org>
Marcelo Cantos <marcelo.cantos@gmail.com>
Marcelo E. Magallon <marcelo.magallon@gmail.com>
Marco Gazerro <gazerro@open2b.com>
Marco Hennings <marco.hennings@freiheit.com>
Marcus Weiner <marcus.weiner@gmail.com>
Marcus Willock <crazcalm@gmail.com>
@ -1481,6 +1575,7 @@ Marius A. Eriksen <marius@grailbio.com>
Marius Nuennerich <mnu@google.com>
Mark Adams <mark@markadams.me>
Mark Bucciarelli <mkbucc@gmail.com>
Mark Dain <mark@markdain.net>
Mark Glines <mark@glines.org>
Mark Harrison <marhar@google.com>
Mark Percival <m@mdp.im>
@ -1533,6 +1628,7 @@ Máté Gulyás <mgulyas86@gmail.com>
Matej Baćo <matejbaco@gmail.com>
Mateus Amin <mateus.amin@gmail.com>
Mateusz Czapliński <czapkofan@gmail.com>
Matheus Alcantara <matheusssilv97@gmail.com>
Mathias Beke <git@denbeke.be>
Mathias Hall-Andersen <mathias@hall-andersen.dk>
Mathias Leppich <mleppich@muhqu.de>
@ -1566,6 +1662,7 @@ Matthew Waters <mwwaters@gmail.com>
Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
Matthieu Olivier <olivier.matthieu@gmail.com>
Matthijs Kooijman <matthijs@stdin.nl>
Max Drosdo.www <g1ran1q@gmail.com>
Max Riveiro <kavu13@gmail.com>
Max Schmitt <max@schmitt.mx>
Max Semenik <maxsem.wiki@gmail.com>
@ -1603,6 +1700,7 @@ Michael Hudson-Doyle <michael.hudson@linaro.org>
Michael Kasch <michael.kasch@gmail.com>
Michael Käufl <golang@c.michael-kaeufl.de>
Michael Kelly <mjk@google.com>
Michaël Lévesque-Dion <mlevesquedion@google.com>
Michael Lewis <mikelikespie@gmail.com>
Michael MacInnis <Michael.P.MacInnis@gmail.com>
Michael Marineau <michael.marineau@coreos.com>
@ -1624,6 +1722,7 @@ Michael Teichgräber <mteichgraeber@gmx.de> <mt4swm@googlemail.com>
Michael Traver <mtraver@google.com>
Michael Vetter <g.bluehut@gmail.com>
Michael Vogt <mvo@ubuntu.com>
Michail Kargakis <mkargaki@redhat.com>
Michal Bohuslávek <mbohuslavek@gmail.com>
Michal Cierniak <cierniak@google.com>
Michał Derkacz <ziutek@lnet.pl>
@ -1633,6 +1732,7 @@ Michal Pristas <michal.pristas@gmail.com>
Michal Rostecki <mrostecki@suse.de>
Michalis Kargakis <michaliskargakis@gmail.com>
Michel Lespinasse <walken@google.com>
Michele Di Pede <michele.di.pede@gmail.com>
Mickael Kerjean <mickael.kerjean@gmail.com>
Mickey Reiss <mickeyreiss@gmail.com>
Miek Gieben <miek@miek.nl> <remigius.gieben@gmail.com>
@ -1670,6 +1770,7 @@ Miquel Sabaté Solà <mikisabate@gmail.com>
Mirko Hansen <baaazen@gmail.com>
Miroslav Genov <mgenov@gmail.com>
Misty De Meo <mistydemeo@gmail.com>
Mohamed Attahri <mohamed@attahri.com>
Mohit Agarwal <mohit@sdf.org>
Mohit kumar Bajoria <mohitbajo36@gmail.com>
Mohit Verma <vmohit.93@gmail.com>
@ -1683,6 +1784,7 @@ Môshe van der Sterre <moshevds@gmail.com>
Mostyn Bramley-Moore <mostyn@antipode.se>
Mrunal Patel <mrunalp@gmail.com>
Muhammad Falak R Wani <falakreyaz@gmail.com>
Muhammad Hamza Farrukh <hamzafarrukh141@gmail.com>
Muhammed Uluyol <uluyol0@gmail.com>
Muir Manders <muir@mnd.rs>
Mukesh Sharma <sharma.mukesh439@gmail.com>
@ -1692,6 +1794,7 @@ Naman Aggarwal <aggarwal.nam@gmail.com>
Nan Deng <monnand@gmail.com>
Nao Yonashiro <owan.orisano@gmail.com>
Naoki Kanatani <k12naoki@gmail.com>
Natanael Copa <ncopa@mirantis.com>
Nate Wilkinson <nathanwilk7@gmail.com>
Nathan Cantelmo <n.cantelmo@gmail.com>
Nathan Caza <mastercactapus@gmail.com>
@ -1708,6 +1811,7 @@ Nathaniel Cook <nvcook42@gmail.com>
Naveen Kumar Sangi <naveenkumarsangi@protonmail.com>
Neeilan Selvalingam <neeilan96@gmail.com>
Neelesh Chandola <neelesh.c98@gmail.com>
Nehal J Wani <nehaljw.kkd1@gmail.com>
Neil Lyons <nwjlyons@googlemail.com>
Neuman Vong <neuman.vong@gmail.com>
Neven Sajko <nsajko@gmail.com>
@ -1760,6 +1864,7 @@ Noel Georgi <git@frezbo.com>
Norberto Lopes <nlopes.ml@gmail.com>
Norman B. Lancaster <qbradq@gmail.com>
Nuno Cruces <ncruces@users.noreply.github.com>
Obei Sideg <obei.sideg@gmail.com>
Obeyda Djeffal <djefobey@gmail.com>
Odin Ugedal <odin@ugedal.com>
Oleg Bulatov <dmage@yandex-team.ru>
@ -1769,12 +1874,17 @@ Oling Cat <olingcat@gmail.com>
Oliver Hookins <ohookins@gmail.com>
Oliver Powell <oliverpowell84@gmail.com>
Oliver Stenbom <ostenbom@pivotal.io>
Oliver Tan <otan@cockroachlabs.com>
Oliver Tonnhofer <olt@bogosoft.com>
Olivier Antoine <olivier.antoine@gmail.com>
Olivier Duperray <duperray.olivier@gmail.com>
Olivier Poitrey <rs@dailymotion.com>
Olivier Saingre <osaingre@gmail.com>
Olivier Wulveryck <olivier.wulveryck@gmail.com>
Omar Jarjur <ojarjur@google.com>
Onkar Jadhav <omjadhav2610@gmail.com>
Ori Bernstein <ori@eigenstate.org>
Ori Rawlings <orirawlings@gmail.com>
Oryan Moshe <iamoryanmoshe@gmail.com>
Osamu TONOMORI <osamingo@gmail.com>
Özgür Kesim <oec-go@kesim.org>
@ -1798,7 +1908,9 @@ Pat Moroney <pat@pat.email>
Patrick Barker <barkerp@vmware.com>
Patrick Crosby <patrick@stathat.com>
Patrick Gavlin <pgavlin@gmail.com>
Patrick Gundlach <gundlach@speedata.de>
Patrick Higgins <patrick.allen.higgins@gmail.com>
Patrick Jones <ithuriel@google.com>
Patrick Lee <pattyshack101@gmail.com>
Patrick Mézard <patrick@mezard.eu>
Patrick Mylund Nielsen <patrick@patrickmn.com>
@ -1811,6 +1923,9 @@ Paul Borman <borman@google.com>
Paul Boyd <boyd.paul2@gmail.com>
Paul Chang <paulchang@google.com>
Paul D. Weber <x0bdev@gmail.com>
Paul Davis <43160081+Pawls@users.noreply.github.com>
Paul E. Murphy <murp@ibm.com>
Paul Forgey <paulf@tessier-ashpool.net>
Paul Hammond <paul@paulhammond.org>
Paul Hankin <paulhankin@google.com>
Paul Jolly <paul@myitcv.org.uk>
@ -1836,7 +1951,9 @@ Pavel Zinovkin <pavel.zinovkin@gmail.com>
Pavlo Sumkin <ymkins@gmail.com>
Pawel Knap <pawelknap88@gmail.com>
Pawel Szczur <filemon@google.com>
Paweł Szulik <pawel.szulik@intel.com>
Pei Xian Chee <luciolas1991@gmail.com>
Pei-Ming Wu <p408865@gmail.com>
Percy Wegmann <ox.to.a.cart@gmail.com>
Perry Abbott <perry.j.abbott@gmail.com>
Petar Dambovaliev <petar.atanasov.1987@gmail.com>
@ -1876,6 +1993,7 @@ Philip Hofer <phofer@umich.edu>
Philip K. Warren <pkwarren@gmail.com>
Philip Nelson <me@pnelson.ca>
Philipp Stephani <phst@google.com>
Phillip Campbell <15082+phillc@users.noreply.github.com>
Pierre Carru <pierre.carru@eshard.com>
Pierre Durand <pierredurand@gmail.com>
Pierre Prinetti <pierreprinetti@gmail.com>
@ -1885,6 +2003,7 @@ Pieter Droogendijk <pieter@binky.org.uk>
Pietro Gagliardi <pietro10@mac.com>
Piyush Mishra <piyush@codeitout.com>
Plekhanov Maxim <kishtatix@gmail.com>
Poh Zi How <poh.zihow@gmail.com>
Polina Osadcha <polliosa@google.com>
Pontus Leitzler <leitzler@gmail.com>
Povilas Versockas <p.versockas@gmail.com>
@ -1904,14 +2023,17 @@ Quentin Perez <qperez@ocs.online.net>
Quentin Renard <contact@asticode.com>
Quentin Smith <quentin@golang.org>
Quey-Liang Kao <s101062801@m101.nthu.edu.tw>
Quim Muntal <quimmuntal@gmail.com>
Quinn Slack <sqs@sourcegraph.com>
Quinten Yearsley <qyearsley@chromium.org>
Quoc-Viet Nguyen <afelion@gmail.com>
Radek Simko <radek.simko@gmail.com>
Radek Sohlich <sohlich@gmail.com>
Radu Berinde <radu@cockroachlabs.com>
Rafal Jeczalik <rjeczalik@gmail.com>
Raghavendra Nagaraj <jamdagni86@gmail.com>
Rahul Chaudhry <rahulchaudhry@chromium.org>
Rahul Wadhwani <rahulwadhwani21@gmail.com>
Raif S. Naffah <go@naffah-raif.name>
Rajat Goel <rajat.goel2010@gmail.com>
Rajath Agasthya <rajathagasthya@gmail.com>
@ -1935,6 +2057,7 @@ Ren Ogaki <re.yuz77777@gmail.com>
Rens Rikkerink <Ikkerens@users.noreply.github.com>
Rhys Hiltner <rhys@justin.tv>
Ricardo Padilha <ricardospadilha@gmail.com>
Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
Ricardo Seriani <ricardo.seriani@gmail.com>
Richard Barnes <rlb@ipv.sx>
Richard Crowley <r@rcrowley.org>
@ -1991,6 +2114,7 @@ Roman Kollár <roman.kollar.0@gmail.com>
Roman Shchekin <mrqtros@gmail.com>
Ron Hashimoto <mail@h2so5.net>
Ron Minnich <rminnich@gmail.com>
Ronnie Ebrin <ebrin.ronnie@protonmail.com>
Ross Chater <rdchater@gmail.com>
Ross Kinsey <rossikinsey@gmail.com>
Ross Light <light@google.com> <rlight2@gmail.com>
@ -2010,6 +2134,7 @@ Ryan Brown <ribrdb@google.com>
Ryan Canty <jrcanty@gmail.com>
Ryan Dahl <ry@tinyclouds.org>
Ryan Hitchman <hitchmanr@gmail.com>
Ryan Kohler <ryankohler@google.com>
Ryan Lower <rpjlower@gmail.com>
Ryan Roden-Corrent <ryan@rcorre.net>
Ryan Seys <ryan@ryanseys.com>
@ -2023,7 +2148,9 @@ S.Çağlar Onur <caglar@10ur.org>
Sabin Mihai Rapan <sabin.rapan@gmail.com>
Sad Pencil <qh06@qq.com>
Sai Cheemalapati <saicheems@google.com>
Sai Kiran Dasika <kirandasika30@gmail.com>
Sakeven Jiang <jc5930@sina.cn>
Salaheddin M. Mahmud <salah.mahmud@gmail.com>
Salmān Aljammāz <s@0x65.net>
Sam Arnold <sarnold64@bloomberg.net>
Sam Boyer <tech@samboyer.org>
@ -2033,6 +2160,7 @@ Sam Ding <samding@ca.ibm.com>
Sam Hug <samuel.b.hug@gmail.com>
Sam Thorogood <thorogood@google.com> <sam.thorogood@gmail.com>
Sam Whited <sam@samwhited.com>
Sam Xie <xsambundy@gmail.com>
Sameer Ajmani <sameer@golang.org> <ajmani@gmail.com>
Sami Commerot <samic@google.com>
Sami Pönkänen <sami.ponkanen@gmail.com>
@ -2042,6 +2170,7 @@ Samuele Pedroni <pedronis@lucediurna.net>
Sander van Harmelen <sander@vanharmelen.nl>
Sanjay Menakuru <balasanjay@gmail.com>
Santhosh Kumar Tekuri <santhosh.tekuri@gmail.com>
Santiago De la Cruz <51337247+xhit@users.noreply.github.com>
Sarah Adams <shadams@google.com>
Sardorbek Pulatov <sardorbek.pulatov@outlook.com>
Sascha Brawer <sascha@brawer.ch>
@ -2062,6 +2191,7 @@ Sean Chittenden <seanc@joyent.com>
Sean Christopherson <sean.j.christopherson@intel.com>
Sean Dolphin <Sean.Dolphin@kpcompass.com>
Sean Harger <sharger@google.com>
Sean Hildebrand <seanwhildebrand@gmail.com>
Sean Liao <seankhliao@gmail.com>
Sean Rees <sean@erifax.org>
Sebastiaan van Stijn <github@gone.nl>
@ -2094,10 +2224,12 @@ Serhii Aheienko <serhii.aheienko@gmail.com>
Seth Hoenig <seth.a.hoenig@gmail.com>
Seth Vargo <sethvargo@gmail.com>
Shahar Kohanim <skohanim@gmail.com>
Shailesh Suryawanshi <ss.shailesh28@gmail.com>
Shamil Garatuev <garatuev@gmail.com>
Shane Hansen <shanemhansen@gmail.com>
Shang Jian Ding <sding3@ncsu.edu>
Shaozhen Ding <dsz0111@gmail.com>
Shaquille Que <shaquille@golang.org>
Shaquille Wyan Que <shaqqywyan@gmail.com>
Shaun Dunning <shaun.dunning@uservoice.com>
Shawn Elliott <selliott@microsoft.com>
@ -2108,8 +2240,11 @@ Shenghou Ma <minux@golang.org> <minux.ma@gmail.com>
Shengjing Zhu <zsj950618@gmail.com>
Shengyu Zhang <shengyu.zhang@chaitin.com>
Shi Han Ng <shihanng@gmail.com>
ShihCheng Tu <mrtoastcheng@gmail.com>
Shijie Hao <haormj@gmail.com>
Shin Fan <shinfan@google.com>
Shinji Tanaka <shinji.tanaka@gmail.com>
Shinnosuke Sawada <6warashi9@gmail.com>
Shintaro Kaneko <kaneshin0120@gmail.com>
Shivakumar GN <shivakumar.gn@gmail.com>
Shivani Singhal <shivani.singhal2804@gmail.com>
@ -2121,17 +2256,21 @@ Silvan Jegen <s.jegen@gmail.com>
Simarpreet Singh <simar@linux.com>
Simon Drake <simondrake1990@gmail.com>
Simon Ferquel <simon.ferquel@docker.com>
Simon Frei <freisim93@gmail.com>
Simon Jefford <simon.jefford@gmail.com>
Simon Rawet <simon@rawet.se>
Simon Rozman <simon@rozman.si>
Simon Ser <contact@emersion.fr>
Simon Thulbourn <simon+github@thulbourn.com>
Simon Whitehead <chemnova@gmail.com>
Sina Siadat <siadat@gmail.com>
Sjoerd Siebinga <sjoerd.siebinga@gmail.com>
Sokolov Yura <funny.falcon@gmail.com>
Song Gao <song@gao.io>
Songjiayang <songjiayang1@gmail.com>
Soojin Nam <jsunam@gmail.com>
Søren L. Hansen <soren@linux2go.dk>
Sparrow Li <liyuancylx@gmail.com>
Spencer Kocot <spencerkocot@gmail.com>
Spencer Nelson <s@spenczar.com>
Spencer Tung <spencertung@google.com>
@ -2140,12 +2279,14 @@ Srdjan Petrovic <spetrovic@google.com>
Sridhar Venkatakrishnan <sridhar@laddoo.net>
Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
StalkR <stalkr@stalkr.net>
Stan Hu <stanhu@gmail.com>
Stan Schwertly <stan@schwertly.com>
Stanislav Afanasev <php.progger@gmail.com>
Steeve Morin <steeve.morin@gmail.com>
Stefan Baebler <sbaebler@outbrain.com>
Stefan Nilsson <snilsson@nada.kth.se> <trolleriprofessorn@gmail.com>
Stepan Shabalin <neverliberty@gmail.com>
Stephan Klatt <stephan.klatt@gmail.com>
Stephan Renatus <srenatus@chef.io>
Stephan Zuercher <zuercher@gmail.com>
Stéphane Travostino <stephane.travostino@gmail.com>
@ -2163,13 +2304,16 @@ Steve Mynott <steve.mynott@gmail.com>
Steve Newman <snewman@google.com>
Steve Phillips <elimisteve@gmail.com>
Steve Streeting <steve@stevestreeting.com>
Steve Traut <straut@google.com>
Steven Buss <sbuss@google.com>
Steven Elliot Harris <seharris@gmail.com>
Steven Erenst <stevenerenst@gmail.com>
Steven Hartland <steven.hartland@multiplay.co.uk>
Steven Littiebrant <imgroxx@gmail.com>
Steven Maude <git@stevenmaude.co.uk>
Steven Wilkin <stevenwilkin@gmail.com>
Stuart Jansen <sjansen@buscaluz.org>
Subham Sarkar <sarkar.subhams2@gmail.com>
Sue Spence <virtuallysue@gmail.com>
Sugu Sougoumarane <ssougou@gmail.com>
Suharsh Sivakumar <suharshs@google.com>
@ -2193,6 +2337,7 @@ Taesu Pyo <pyotaesu@gmail.com>
Tai Le <letientai299@gmail.com>
Taj Khattra <taj.khattra@gmail.com>
Takashi Matsuo <tmatsuo@google.com>
Takashi Mima <tks.m1205@gmail.com>
Takayoshi Nishida <takayoshi.nishida@gmail.com>
Takeshi YAMANASHI <9.nashi@gmail.com>
Takuto Ikuta <tikuta@google.com>
@ -2221,6 +2366,7 @@ Thanatat Tamtan <acoshift@gmail.com>
The Hatsune Daishi <nao20010128@gmail.com>
Thiago Avelino <t@avelino.xxx>
Thiago Fransosi Farina <thiago.farina@gmail.com> <tfarina@chromium.org>
Thom Wiggers <thom@thomwiggers.nl>
Thomas Alan Copeland <talan.copeland@gmail.com>
Thomas Bonfort <thomas.bonfort@gmail.com>
Thomas Bouldin <inlined@google.com>
@ -2245,6 +2391,7 @@ Tim Ebringer <tim.ebringer@gmail.com>
Tim Heckman <t@heckman.io>
Tim Henderson <tim.tadh@gmail.com>
Tim Hockin <thockin@google.com>
Tim King <taking@google.com>
Tim Möhlmann <muhlemmer@gmail.com>
Tim Swast <swast@google.com>
Tim Wright <tenortim@gmail.com>
@ -2252,8 +2399,10 @@ Tim Xu <xiaoxubeii@gmail.com>
Timmy Douglas <timmyd983@gmail.com>
Timo Savola <timo.savola@gmail.com>
Timo Truyts <alkaloid.btx@gmail.com>
Timothy Gu <timothygu99@gmail.com>
Timothy Studd <tim@timstudd.com>
Tipp Moseley <tipp@google.com>
Tiwei Bie <tiwei.btw@antgroup.com>
Tobias Assarsson <tobias.assarsson@gmail.com>
Tobias Columbus <tobias.columbus@gmail.com> <tobias.columbus@googlemail.com>
Tobias Klauser <tklauser@distanz.ch>
@ -2268,11 +2417,13 @@ Tom Lanyon <tomlanyon@google.com>
Tom Levy <tomlevy93@gmail.com>
Tom Limoncelli <tal@whatexit.org>
Tom Linford <tomlinford@gmail.com>
Tom Panton <tom@tomandtally.co.uk>
Tom Parkin <tom.parkin@gmail.com>
Tom Payne <twpayne@gmail.com>
Tom Szymanski <tgs@google.com>
Tom Thorogood <me+google@tomthorogood.co.uk>
Tom Wilkie <tom@weave.works>
Tom Zierbock <tomzierbock@gmail.com>
Tomas Dabasinskas <tomas@dabasinskas.net>
Tommy Schaefer <tommy.schaefer@teecom.com>
Tomohiro Kusumoto <zabio1192@gmail.com>
@ -2298,6 +2449,7 @@ Tristan Colgate <tcolgate@gmail.com>
Tristan Ooohry <ooohry@gmail.com>
Tristan Rice <rice@fn.lc>
Troels Thomsen <troels@thomsen.io>
Trong Bui <trong.buiquoc@gmail.com>
Trung Nguyen <trung.n.k@gmail.com>
Tsuji Daishiro <dram.dt.shonan@gmail.com>
Tudor Golubenco <tudor.g@gmail.com>
@ -2308,6 +2460,7 @@ Tyler Bunnell <tylerbunnell@gmail.com>
Tyler Treat <ttreat31@gmail.com>
Tyson Andre <tysonandre775@gmail.com>
Tzach Shabtay <tzachshabtay@gmail.com>
Tzu-Chiao Yeh <su3g4284zo6y7@gmail.com>
Tzu-Jung Lee <roylee17@currant.com>
Udalov Max <re.udalov@gmail.com>
Ugorji Nwoke <ugorji@gmail.com>
@ -2316,6 +2469,7 @@ Ulrich Kunitz <uli.kunitz@gmail.com>
Umang Parmar <umangjparmar@gmail.com>
Uriel Mangado <uriel@berlinblue.org>
Urvil Patel <patelurvil38@gmail.com>
Utkarsh Dixit <53217283+utkarsh-extc@users.noreply.github.com>
Uttam C Pawar <uttam.c.pawar@intel.com>
Vadim Grek <vadimprog@gmail.com>
Vadim Vygonets <unixdj@gmail.com>
@ -2327,6 +2481,7 @@ Venil Noronha <veniln@vmware.com>
Veselkov Konstantin <kostozyb@gmail.com>
Viacheslav Poturaev <vearutop@gmail.com>
Victor Chudnovsky <vchudnov@google.com>
Victor Michel <victor@optimyze.cloud>
Victor Vrantchan <vrancean+github@gmail.com>
Vignesh Ramachandra <vickyramachandra@gmail.com>
Vikas Kedia <vikask@google.com>
@ -2341,6 +2496,7 @@ Visweswara R <r.visweswara@gmail.com>
Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
Vitor De Mario <vitordemario@gmail.com>
Vivek Sekhar <vsekhar@google.com>
Vivek V <iamvivekv96@gmail.com>
Vivian Liang <vliang88@gmail.com>
Vlad Krasnov <vlad@cloudflare.com>
Vladimir Evgrafov <evgrafov.vladimir@gmail.com>
@ -2370,6 +2526,7 @@ Wei Guangjing <vcc.163@gmail.com>
Wei Xiao <wei.xiao@arm.com>
Wei Xikai <xykwei@gmail.com>
Weichao Tang <tevic.tt@gmail.com>
Weixie Cui <cuiweixie@gmail.com> <523516579@qq.com>
Wembley G. Leach, Jr <wembley.gl@gmail.com>
Wenlei (Frank) He <wlhe@google.com>
Wenzel Lowe <lowewenzel@gmail.com>
@ -2392,6 +2549,7 @@ Wu Yunzhou <yunzhouwu@gmail.com>
Xi Ruoyao <xry23333@gmail.com>
Xia Bin <snyh@snyh.org>
Xiangdong Ji <xiangdong.ji@arm.com>
Xiaodong Liu <teaofmoli@gmail.com>
Xing Xing <mikespook@gmail.com>
Xingqang Bai <bxq2011hust@qq.com>
Xu Fei <badgangkiller@gmail.com>
@ -2459,6 +2617,7 @@ Zhou Peng <p@ctriple.cn>
Ziad Hatahet <hatahet@gmail.com>
Ziheng Liu <lzhfromustc@gmail.com>
Zorion Arrizabalaga <zorionk@gmail.com>
Zyad A. Ali <zyad.ali.me@gmail.com>
Максадбек Ахмедов <a.maksadbek@gmail.com>
Максим Федосеев <max.faceless.frei@gmail.com>
Роман Хавроненко <hagen1778@gmail.com>

View file

@ -3,7 +3,7 @@
Go is an open source programming language that makes it easy to build simple,
reliable, and efficient software.
![Gopher image](doc/gopher/fiveyears.jpg)
![Gopher image](https://golang.org/doc/gopher/fiveyears.jpg)
*Gopher image by [Renee French][rf], licensed under [Creative Commons 3.0 Attributions license][cc3-by].*
Our canonical Git repository is located at https://go.googlesource.com/go.
@ -19,22 +19,20 @@ BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install
or load [doc/install.html](./doc/install.html) in your web browser for installation
instructions.
for installation instructions.
#### Install From Source
If a binary distribution is not available for your combination of
operating system and architecture, visit
https://golang.org/doc/install/source or load [doc/install-source.html](./doc/install-source.html)
in your web browser for source installation instructions.
https://golang.org/doc/install/source
for source installation instructions.
### Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines:
https://golang.org/doc/contribute.html
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.html.
Note that the Go project uses the issue tracker for bug reports and
proposals only. See https://golang.org/wiki/Questions for a list of

View file

@ -1,4 +1,7 @@
pkg encoding/json, method (*RawMessage) MarshalJSON() ([]uint8, error)
pkg math, const MaxFloat64 = 1.79769e+308 // 179769313486231570814527423731704356798100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const SmallestNonzeroFloat32 = 1.4013e-45 // 17516230804060213386546619791123951641/12500000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const SmallestNonzeroFloat64 = 4.94066e-324 // 4940656458412465441765687928682213723651/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math/big, const MaxBase = 36
pkg math/big, type Word uintptr
pkg net, func ListenUnixgram(string, *UnixAddr) (*UDPConn, error)

View file

@ -1,15 +1,6 @@
pkg archive/zip, method (*ReadCloser) Open(string) (fs.File, error)
pkg archive/zip, method (*Reader) Open(string) (fs.File, error)
pkg crypto/x509, method (SystemRootsError) Unwrap() error
pkg crypto/x509, type CertificateRequest struct, BasicConstraintsValid bool
pkg crypto/x509, type CertificateRequest struct, ExtKeyUsage []ExtKeyUsage
pkg crypto/x509, type CertificateRequest struct, IsCA bool
pkg crypto/x509, type CertificateRequest struct, KeyUsage KeyUsage
pkg crypto/x509, type CertificateRequest struct, MaxPathLen int
pkg crypto/x509, type CertificateRequest struct, MaxPathLenZero bool
pkg crypto/x509, type CertificateRequest struct, PolicyIdentifiers []asn1.ObjectIdentifier
pkg crypto/x509, type CertificateRequest struct, SubjectKeyId []uint8
pkg crypto/x509, type CertificateRequest struct, UnknownExtKeyUsage []asn1.ObjectIdentifier
pkg debug/elf, const DT_ADDRRNGHI = 1879047935
pkg debug/elf, const DT_ADDRRNGHI DynTag
pkg debug/elf, const DT_ADDRRNGLO = 1879047680
@ -235,9 +226,41 @@ pkg embed, type FS struct
pkg flag, func Func(string, string, func(string) error)
pkg flag, method (*FlagSet) Func(string, string, func(string) error)
pkg go/build, type Package struct, EmbedPatterns []string
pkg go/build, type Package struct, EmbedPatternPos map[string][]token.Position
pkg go/build, type Package struct, IgnoredOtherFiles []string
pkg go/build, type Package struct, TestEmbedPatterns []string
pkg go/build, type Package struct, TestEmbedPatternPos map[string][]token.Position
pkg go/build, type Package struct, XTestEmbedPatterns []string
pkg go/build, type Package struct, XTestEmbedPatternPos map[string][]token.Position
pkg go/build/constraint, func IsGoBuild(string) bool
pkg go/build/constraint, func IsPlusBuild(string) bool
pkg go/build/constraint, func Parse(string) (Expr, error)
pkg go/build/constraint, func PlusBuildLines(Expr) ([]string, error)
pkg go/build/constraint, method (*AndExpr) Eval(func(string) bool) bool
pkg go/build/constraint, method (*AndExpr) String() string
pkg go/build/constraint, method (*NotExpr) Eval(func(string) bool) bool
pkg go/build/constraint, method (*NotExpr) String() string
pkg go/build/constraint, method (*OrExpr) Eval(func(string) bool) bool
pkg go/build/constraint, method (*OrExpr) String() string
pkg go/build/constraint, method (*SyntaxError) Error() string
pkg go/build/constraint, method (*TagExpr) Eval(func(string) bool) bool
pkg go/build/constraint, method (*TagExpr) String() string
pkg go/build/constraint, type AndExpr struct
pkg go/build/constraint, type AndExpr struct, X Expr
pkg go/build/constraint, type AndExpr struct, Y Expr
pkg go/build/constraint, type Expr interface, Eval(func(string) bool) bool
pkg go/build/constraint, type Expr interface, String() string
pkg go/build/constraint, type Expr interface, unexported methods
pkg go/build/constraint, type NotExpr struct
pkg go/build/constraint, type NotExpr struct, X Expr
pkg go/build/constraint, type OrExpr struct
pkg go/build/constraint, type OrExpr struct, X Expr
pkg go/build/constraint, type OrExpr struct, Y Expr
pkg go/build/constraint, type SyntaxError struct
pkg go/build/constraint, type SyntaxError struct, Err string
pkg go/build/constraint, type SyntaxError struct, Offset int
pkg go/build/constraint, type TagExpr struct
pkg go/build/constraint, type TagExpr struct, Tag string
pkg html/template, func ParseFS(fs.FS, ...string) (*Template, error)
pkg html/template, method (*Template) ParseFS(fs.FS, ...string) (*Template, error)
pkg io, func NopCloser(Reader) ReadCloser
@ -404,7 +427,6 @@ pkg runtime/metrics, type Description struct, Cumulative bool
pkg runtime/metrics, type Description struct, Description string
pkg runtime/metrics, type Description struct, Kind ValueKind
pkg runtime/metrics, type Description struct, Name string
pkg runtime/metrics, type Description struct, StopTheWorld bool
pkg runtime/metrics, type Float64Histogram struct
pkg runtime/metrics, type Float64Histogram struct, Buckets []float64
pkg runtime/metrics, type Float64Histogram struct, Counts []uint64
@ -437,10 +459,8 @@ pkg syscall (linux-arm-cgo), func AllThreadsSyscall(uintptr, uintptr, uintptr, u
pkg syscall (linux-arm-cgo), func AllThreadsSyscall6(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
pkg syscall (linux-arm-cgo), func Setegid(int) error
pkg syscall (linux-arm-cgo), func Seteuid(int) error
pkg syscall (windows-386), func RtlGenRandom(*uint8, uint32) error
pkg syscall (windows-386), method (*DLLError) Unwrap() error
pkg syscall (windows-386), type SysProcAttr struct, NoInheritHandles bool
pkg syscall (windows-amd64), func RtlGenRandom(*uint8, uint32) error
pkg syscall (windows-amd64), method (*DLLError) Unwrap() error
pkg syscall (windows-amd64), type SysProcAttr struct, NoInheritHandles bool
pkg testing/fstest, func TestFS(fs.FS, ...string) error

194
api/go1.17.txt Normal file
View file

@ -0,0 +1,194 @@
pkg archive/zip, method (*File) OpenRaw() (io.Reader, error)
pkg archive/zip, method (*Writer) Copy(*File) error
pkg archive/zip, method (*Writer) CreateRaw(*FileHeader) (io.Writer, error)
pkg compress/lzw, method (*Reader) Close() error
pkg compress/lzw, method (*Reader) Read([]uint8) (int, error)
pkg compress/lzw, method (*Reader) Reset(io.Reader, Order, int)
pkg compress/lzw, method (*Writer) Close() error
pkg compress/lzw, method (*Writer) Reset(io.Writer, Order, int)
pkg compress/lzw, method (*Writer) Write([]uint8) (int, error)
pkg compress/lzw, type Reader struct
pkg compress/lzw, type Writer struct
pkg crypto/tls, method (*CertificateRequestInfo) Context() context.Context
pkg crypto/tls, method (*ClientHelloInfo) Context() context.Context
pkg crypto/tls, method (*Conn) HandshakeContext(context.Context) error
pkg database/sql, method (*NullByte) Scan(interface{}) error
pkg database/sql, method (*NullInt16) Scan(interface{}) error
pkg database/sql, method (NullByte) Value() (driver.Value, error)
pkg database/sql, method (NullInt16) Value() (driver.Value, error)
pkg database/sql, type NullByte struct
pkg database/sql, type NullByte struct, Byte uint8
pkg database/sql, type NullByte struct, Valid bool
pkg database/sql, type NullInt16 struct
pkg database/sql, type NullInt16 struct, Int16 int16
pkg database/sql, type NullInt16 struct, Valid bool
pkg debug/elf, const SHT_MIPS_ABIFLAGS = 1879048234
pkg debug/elf, const SHT_MIPS_ABIFLAGS SectionType
pkg encoding/csv, method (*Reader) FieldPos(int) (int, int)
pkg go/build, type Context struct, ToolTags []string
pkg go/parser, const SkipObjectResolution = 64
pkg go/parser, const SkipObjectResolution Mode
pkg image, method (*Alpha) RGBA64At(int, int) color.RGBA64
pkg image, method (*Alpha) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*Alpha16) RGBA64At(int, int) color.RGBA64
pkg image, method (*Alpha16) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*CMYK) RGBA64At(int, int) color.RGBA64
pkg image, method (*CMYK) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*Gray) RGBA64At(int, int) color.RGBA64
pkg image, method (*Gray) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*Gray16) RGBA64At(int, int) color.RGBA64
pkg image, method (*Gray16) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*NRGBA) RGBA64At(int, int) color.RGBA64
pkg image, method (*NRGBA) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*NRGBA64) RGBA64At(int, int) color.RGBA64
pkg image, method (*NRGBA64) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*NYCbCrA) RGBA64At(int, int) color.RGBA64
pkg image, method (*Paletted) RGBA64At(int, int) color.RGBA64
pkg image, method (*Paletted) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*RGBA) RGBA64At(int, int) color.RGBA64
pkg image, method (*RGBA) SetRGBA64(int, int, color.RGBA64)
pkg image, method (*Uniform) RGBA64At(int, int) color.RGBA64
pkg image, method (*YCbCr) RGBA64At(int, int) color.RGBA64
pkg image, method (Rectangle) RGBA64At(int, int) color.RGBA64
pkg image, type RGBA64Image interface { At, Bounds, ColorModel, RGBA64At }
pkg image, type RGBA64Image interface, At(int, int) color.Color
pkg image, type RGBA64Image interface, Bounds() Rectangle
pkg image, type RGBA64Image interface, ColorModel() color.Model
pkg image, type RGBA64Image interface, RGBA64At(int, int) color.RGBA64
pkg image/draw, type RGBA64Image interface { At, Bounds, ColorModel, RGBA64At, Set, SetRGBA64 }
pkg image/draw, type RGBA64Image interface, At(int, int) color.Color
pkg image/draw, type RGBA64Image interface, Bounds() image.Rectangle
pkg image/draw, type RGBA64Image interface, ColorModel() color.Model
pkg image/draw, type RGBA64Image interface, RGBA64At(int, int) color.RGBA64
pkg image/draw, type RGBA64Image interface, Set(int, int, color.Color)
pkg image/draw, type RGBA64Image interface, SetRGBA64(int, int, color.RGBA64)
pkg io/fs, func FileInfoToDirEntry(FileInfo) DirEntry
pkg math, const MaxFloat64 = 1.79769e+308 // 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368
pkg math, const MaxInt = 9223372036854775807
pkg math, const MaxInt ideal-int
pkg math, const MaxUint = 18446744073709551615
pkg math, const MaxUint ideal-int
pkg math, const MinInt = -9223372036854775808
pkg math, const MinInt ideal-int
pkg math, const SmallestNonzeroFloat32 = 1.4013e-45 // 1/713623846352979940529142984724747568191373312
pkg math, const SmallestNonzeroFloat64 = 4.94066e-324 // 1/202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784
pkg net, method (*ParseError) Temporary() bool
pkg net, method (*ParseError) Timeout() bool
pkg net, method (IP) IsPrivate() bool
pkg net/http, func AllowQuerySemicolons(Handler) Handler
pkg net/url, method (Values) Has(string) bool
pkg reflect, func VisibleFields(Type) []StructField
pkg reflect, method (Method) IsExported() bool
pkg reflect, method (StructField) IsExported() bool
pkg runtime/cgo (darwin-amd64-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (darwin-amd64-cgo), method (Handle) Delete()
pkg runtime/cgo (darwin-amd64-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (darwin-amd64-cgo), type Handle uintptr
pkg runtime/cgo (freebsd-386-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (freebsd-386-cgo), method (Handle) Delete()
pkg runtime/cgo (freebsd-386-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (freebsd-386-cgo), type Handle uintptr
pkg runtime/cgo (freebsd-amd64-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (freebsd-amd64-cgo), method (Handle) Delete()
pkg runtime/cgo (freebsd-amd64-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (freebsd-amd64-cgo), type Handle uintptr
pkg runtime/cgo (freebsd-arm-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (freebsd-arm-cgo), method (Handle) Delete()
pkg runtime/cgo (freebsd-arm-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (freebsd-arm-cgo), type Handle uintptr
pkg runtime/cgo (linux-386-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (linux-386-cgo), method (Handle) Delete()
pkg runtime/cgo (linux-386-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (linux-386-cgo), type Handle uintptr
pkg runtime/cgo (linux-amd64-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (linux-amd64-cgo), method (Handle) Delete()
pkg runtime/cgo (linux-amd64-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (linux-amd64-cgo), type Handle uintptr
pkg runtime/cgo (linux-arm-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (linux-arm-cgo), method (Handle) Delete()
pkg runtime/cgo (linux-arm-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (linux-arm-cgo), type Handle uintptr
pkg runtime/cgo (netbsd-386-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (netbsd-386-cgo), method (Handle) Delete()
pkg runtime/cgo (netbsd-386-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (netbsd-386-cgo), type Handle uintptr
pkg runtime/cgo (netbsd-amd64-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (netbsd-amd64-cgo), method (Handle) Delete()
pkg runtime/cgo (netbsd-amd64-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (netbsd-amd64-cgo), type Handle uintptr
pkg runtime/cgo (netbsd-arm-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (netbsd-arm-cgo), method (Handle) Delete()
pkg runtime/cgo (netbsd-arm-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (netbsd-arm-cgo), type Handle uintptr
pkg runtime/cgo (netbsd-arm64-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (netbsd-arm64-cgo), method (Handle) Delete()
pkg runtime/cgo (netbsd-arm64-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (netbsd-arm64-cgo), type Handle uintptr
pkg runtime/cgo (openbsd-386-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (openbsd-386-cgo), method (Handle) Delete()
pkg runtime/cgo (openbsd-386-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (openbsd-386-cgo), type Handle uintptr
pkg runtime/cgo (openbsd-amd64-cgo), func NewHandle(interface{}) Handle
pkg runtime/cgo (openbsd-amd64-cgo), method (Handle) Delete()
pkg runtime/cgo (openbsd-amd64-cgo), method (Handle) Value() interface{}
pkg runtime/cgo (openbsd-amd64-cgo), type Handle uintptr
pkg strconv, func QuotedPrefix(string) (string, error)
pkg sync/atomic, method (*Value) CompareAndSwap(interface{}, interface{}) bool
pkg sync/atomic, method (*Value) Swap(interface{}) interface{}
pkg syscall (netbsd-386), const SYS_WAIT6 = 481
pkg syscall (netbsd-386), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-386), const WEXITED = 32
pkg syscall (netbsd-386), const WEXITED ideal-int
pkg syscall (netbsd-386-cgo), const SYS_WAIT6 = 481
pkg syscall (netbsd-386-cgo), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-386-cgo), const WEXITED = 32
pkg syscall (netbsd-386-cgo), const WEXITED ideal-int
pkg syscall (netbsd-amd64), const SYS_WAIT6 = 481
pkg syscall (netbsd-amd64), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-amd64), const WEXITED = 32
pkg syscall (netbsd-amd64), const WEXITED ideal-int
pkg syscall (netbsd-amd64-cgo), const SYS_WAIT6 = 481
pkg syscall (netbsd-amd64-cgo), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-amd64-cgo), const WEXITED = 32
pkg syscall (netbsd-amd64-cgo), const WEXITED ideal-int
pkg syscall (netbsd-arm), const SYS_WAIT6 = 481
pkg syscall (netbsd-arm), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-arm), const WEXITED = 32
pkg syscall (netbsd-arm), const WEXITED ideal-int
pkg syscall (netbsd-arm-cgo), const SYS_WAIT6 = 481
pkg syscall (netbsd-arm-cgo), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-arm-cgo), const WEXITED = 32
pkg syscall (netbsd-arm-cgo), const WEXITED ideal-int
pkg syscall (netbsd-arm64), const SYS_WAIT6 = 481
pkg syscall (netbsd-arm64), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-arm64), const WEXITED = 32
pkg syscall (netbsd-arm64), const WEXITED ideal-int
pkg syscall (netbsd-arm64-cgo), const SYS_WAIT6 = 481
pkg syscall (netbsd-arm64-cgo), const SYS_WAIT6 ideal-int
pkg syscall (netbsd-arm64-cgo), const WEXITED = 32
pkg syscall (netbsd-arm64-cgo), const WEXITED ideal-int
pkg syscall (openbsd-386), const MSG_CMSG_CLOEXEC = 2048
pkg syscall (openbsd-386), const MSG_CMSG_CLOEXEC ideal-int
pkg syscall (openbsd-386-cgo), const MSG_CMSG_CLOEXEC = 2048
pkg syscall (openbsd-386-cgo), const MSG_CMSG_CLOEXEC ideal-int
pkg syscall (openbsd-amd64), const MSG_CMSG_CLOEXEC = 2048
pkg syscall (openbsd-amd64), const MSG_CMSG_CLOEXEC ideal-int
pkg syscall (openbsd-amd64-cgo), const MSG_CMSG_CLOEXEC = 2048
pkg syscall (openbsd-amd64-cgo), const MSG_CMSG_CLOEXEC ideal-int
pkg syscall (windows-386), type SysProcAttr struct, AdditionalInheritedHandles []Handle
pkg syscall (windows-386), type SysProcAttr struct, ParentProcess Handle
pkg syscall (windows-amd64), type SysProcAttr struct, AdditionalInheritedHandles []Handle
pkg syscall (windows-amd64), type SysProcAttr struct, ParentProcess Handle
pkg testing, method (*B) Setenv(string, string)
pkg testing, method (*T) Setenv(string, string)
pkg testing, type TB interface, Setenv(string, string)
pkg text/template/parse, const SkipFuncCheck = 2
pkg text/template/parse, const SkipFuncCheck Mode
pkg time, const Layout = "01/02 03:04:05PM '06 -0700"
pkg time, const Layout ideal-string
pkg time, func UnixMicro(int64) Time
pkg time, func UnixMilli(int64) Time
pkg time, method (Time) GoString() string
pkg time, method (Time) IsDST() bool
pkg time, method (Time) UnixMicro() int64
pkg time, method (Time) UnixMilli() int64

View file

@ -1,254 +0,0 @@
<!--{
"title": "About the go command"
}-->
<p>The Go distribution includes a command, named
"<code><a href="/cmd/go/">go</a></code>", that
automates the downloading, building, installation, and testing of Go packages
and commands. This document talks about why we wrote a new command, what it
is, what it's not, and how to use it.</p>
<h2>Motivation</h2>
<p>You might have seen early Go talks in which Rob Pike jokes that the idea
for Go arose while waiting for a large Google server to compile. That
really was the motivation for Go: to build a language that worked well
for building the large software that Google writes and runs. It was
clear from the start that such a language must provide a way to
express dependencies between code libraries clearly, hence the package
grouping and the explicit import blocks. It was also clear from the
start that you might want arbitrary syntax for describing the code
being imported; this is why import paths are string literals.</p>
<p>An explicit goal for Go from the beginning was to be able to build Go
code using only the information found in the source itself, not
needing to write a makefile or one of the many modern replacements for
makefiles. If Go needed a configuration file to explain how to build
your program, then Go would have failed.</p>
<p>At first, there was no Go compiler, and the initial development
focused on building one and then building libraries for it. For
expedience, we postponed the automation of building Go code by using
make and writing makefiles. When compiling a single package involved
multiple invocations of the Go compiler, we even used a program to
write the makefiles for us. You can find it if you dig through the
repository history.</p>
<p>The purpose of the new go command is our return to this ideal, that Go
programs should compile without configuration or additional effort on
the part of the developer beyond writing the necessary import
statements.</p>
<h2>Configuration versus convention</h2>
<p>The way to achieve the simplicity of a configuration-free system is to
establish conventions. The system works only to the extent that those conventions
are followed. When we first launched Go, many people published packages that
had to be installed in certain places, under certain names, using certain build
tools, in order to be used. That's understandable: that's the way it works in
most other languages. Over the last few years we consistently reminded people
about the <code>goinstall</code> command
(now replaced by <a href="/cmd/go/#hdr-Download_and_install_packages_and_dependencies"><code>go get</code></a>)
and its conventions: first, that the import path is derived in a known way from
the URL of the source code; second, that the place to store the sources in
the local file system is derived in a known way from the import path; third,
that each directory in a source tree corresponds to a single package; and
fourth, that the package is built using only information in the source code.
Today, the vast majority of packages follow these conventions.
The Go ecosystem is simpler and more powerful as a result.</p>
<p>We received many requests to allow a makefile in a package directory to
provide just a little extra configuration beyond what's in the source code.
But that would have introduced new rules. Because we did not accede to such
requests, we were able to write the go command and eliminate our use of make
or any other build system.</p>
<p>It is important to understand that the go command is not a general
build tool. It cannot be configured and it does not attempt to build
anything but Go packages. These are important simplifying
assumptions: they simplify not only the implementation but also, more
important, the use of the tool itself.</p>
<h2>Go's conventions</h2>
<p>The <code>go</code> command requires that code adheres to a few key,
well-established conventions.</p>
<p>First, the import path is derived in a known way from the URL of the
source code. For Bitbucket, GitHub, Google Code, and Launchpad, the
root directory of the repository is identified by the repository's
main URL, without the <code>http://</code> prefix. Subdirectories are named by
adding to that path.
For example, the Go example programs are obtained by running</p>
<pre>
git clone https://github.com/golang/example
</pre>
<p>and thus the import path for the root directory of that repository is
"<code>github.com/golang/example</code>".
The <a href="https://godoc.org/github.com/golang/example/stringutil">stringutil</a>
package is stored in a subdirectory, so its import path is
"<code>github.com/golang/example/stringutil</code>".</p>
<p>These paths are on the long side, but in exchange we get an
automatically managed name space for import paths and the ability for
a tool like the go command to look at an unfamiliar import path and
deduce where to obtain the source code.</p>
<p>Second, the place to store sources in the local file system is derived
in a known way from the import path, specifically
<code>$GOPATH/src/&lt;import-path&gt;</code>.
If unset, <code>$GOPATH</code> defaults to a subdirectory
named <code>go</code> in the user's home directory.
If <code>$GOPATH</code> is set to a list of paths, the go command tries
<code>&lt;dir&gt;/src/&lt;import-path&gt;</code> for each of the directories in
that list.
</p>
<p>Each of those trees contains, by convention, a top-level directory named
"<code>bin</code>", for holding compiled executables, and a top-level directory
named "<code>pkg</code>", for holding compiled packages that can be imported,
and the "<code>src</code>" directory, for holding package source files.
Imposing this structure lets us keep each of these directory trees
self-contained: the compiled form and the sources are always near each
other.</p>
<p>These naming conventions also let us work in the reverse direction,
from a directory name to its import path. This mapping is important
for many of the go command's subcommands, as we'll see below.</p>
<p>Third, each directory in a source tree corresponds to a single
package. By restricting a directory to a single package, we don't have
to create hybrid import paths that specify first the directory and
then the package within that directory. Also, most file management
tools and UIs work on directories as fundamental units. Tying the
fundamental Go unit&mdash;the package&mdash;to file system structure means
that file system tools become Go package tools. Copying, moving, or
deleting a package corresponds to copying, moving, or deleting a
directory.</p>
<p>Fourth, each package is built using only the information present in
the source files. This makes it much more likely that the tool will
be able to adapt to changing build environments and conditions. For
example, if we allowed extra configuration such as compiler flags or
command line recipes, then that configuration would need to be updated
each time the build tools changed; it would also be inherently tied
to the use of a specific toolchain.</p>
<h2>Getting started with the go command</h2>
<p>Finally, a quick tour of how to use the go command.
As mentioned above, the default <code>$GOPATH</code> on Unix is <code>$HOME/go</code>.
We'll store our programs there.
To use a different location, you can set <code>$GOPATH</code>;
see <a href="/doc/code.html">How to Write Go Code</a> for details.
<p>We first add some source code. Suppose we want to use
the indexing library from the codesearch project along with a left-leaning
red-black tree. We can install both with the "<code>go get</code>"
subcommand:</p>
<pre>
$ go get github.com/google/codesearch/index
$ go get github.com/petar/GoLLRB/llrb
$
</pre>
<p>Both of these projects are now downloaded and installed into <code>$HOME/go</code>,
which contains the two directories
<code>src/github.com/google/codesearch/index/</code> and
<code>src/github.com/petar/GoLLRB/llrb/</code>, along with the compiled
packages (in <code>pkg/</code>) for those libraries and their dependencies.</p>
<p>Because we used version control systems (Mercurial and Git) to check
out the sources, the source tree also contains the other files in the
corresponding repositories, such as related packages. The "<code>go list</code>"
subcommand lists the import paths corresponding to its arguments, and
the pattern "<code>./...</code>" means start in the current directory
("<code>./</code>") and find all packages below that directory
("<code>...</code>"):</p>
<pre>
$ cd $HOME/go/src
$ go list ./...
github.com/google/codesearch/cmd/cgrep
github.com/google/codesearch/cmd/cindex
github.com/google/codesearch/cmd/csearch
github.com/google/codesearch/index
github.com/google/codesearch/regexp
github.com/google/codesearch/sparse
github.com/petar/GoLLRB/example
github.com/petar/GoLLRB/llrb
$
</pre>
<p>We can also test those packages:</p>
<pre>
$ go test ./...
? github.com/google/codesearch/cmd/cgrep [no test files]
? github.com/google/codesearch/cmd/cindex [no test files]
? github.com/google/codesearch/cmd/csearch [no test files]
ok github.com/google/codesearch/index 0.203s
ok github.com/google/codesearch/regexp 0.017s
? github.com/google/codesearch/sparse [no test files]
? github.com/petar/GoLLRB/example [no test files]
ok github.com/petar/GoLLRB/llrb 0.231s
$
</pre>
<p>If a go subcommand is invoked with no paths listed, it operates on the
current directory:</p>
<pre>
$ cd github.com/google/codesearch/regexp
$ go list
github.com/google/codesearch/regexp
$ go test -v
=== RUN TestNstateEnc
--- PASS: TestNstateEnc (0.00s)
=== RUN TestMatch
--- PASS: TestMatch (0.00s)
=== RUN TestGrep
--- PASS: TestGrep (0.00s)
PASS
ok github.com/google/codesearch/regexp 0.018s
$ go install
$
</pre>
<p>That "<code>go install</code>" subcommand installs the latest copy of the
package into the pkg directory. Because the go command can analyze the
dependency graph, "<code>go install</code>" also installs any packages that
this package imports but that are out of date, recursively.</p>
<p>Notice that "<code>go install</code>" was able to determine the name of the
import path for the package in the current directory, because of the convention
for directory naming. It would be a little more convenient if we could pick
the name of the directory where we kept source code, and we probably wouldn't
pick such a long name, but that ability would require additional configuration
and complexity in the tool. Typing an extra directory name or two is a small
price to pay for the increased simplicity and power.</p>
<h2>Limitations</h2>
<p>As mentioned above, the go command is not a general-purpose build
tool.
In particular, it does not have any facility for generating Go
source files <em>during</em> a build, although it does provide
<a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go</code>
<code>generate</code></a>,
which can automate the creation of Go files <em>before</em> the build.
For more advanced build setups, you may need to write a
makefile (or a configuration file for the build tool of your choice)
to run whatever tool creates the Go files and then check those generated source files
into your repository. This is more work for you, the package author,
but it is significantly less work for your users, who can use
"<code>go get</code>" without needing to obtain and build
any additional tools.</p>
<h2>More information</h2>
<p>For more information, read <a href="/doc/code.html">How to Write Go Code</a>
and see the <a href="/cmd/go/">go command documentation</a>.</p>

View file

@ -1,8 +0,0 @@
<!--{
"Title": "/doc/articles/"
}-->
<p>
See the <a href="/doc/#articles">Documents page</a> and the
<a href="/blog/index">Blog index</a> for a complete list of Go articles.
</p>

View file

@ -1,440 +0,0 @@
<!--{
"Title": "Data Race Detector",
"Template": true
}-->
<h2 id="Introduction">Introduction</h2>
<p>
Data races are among the most common and hardest to debug types of bugs in concurrent systems.
A data race occurs when two goroutines access the same variable concurrently and at least one of the accesses is a write.
See the <a href="/ref/mem/">The Go Memory Model</a> for details.
</p>
<p>
Here is an example of a data race that can lead to crashes and memory corruption:
</p>
<pre>
func main() {
c := make(chan bool)
m := make(map[string]string)
go func() {
m["1"] = "a" // First conflicting access.
c &lt;- true
}()
m["2"] = "b" // Second conflicting access.
&lt;-c
for k, v := range m {
fmt.Println(k, v)
}
}
</pre>
<h2 id="Usage">Usage</h2>
<p>
To help diagnose such bugs, Go includes a built-in data race detector.
To use it, add the <code>-race</code> flag to the go command:
</p>
<pre>
$ go test -race mypkg // to test the package
$ go run -race mysrc.go // to run the source file
$ go build -race mycmd // to build the command
$ go install -race mypkg // to install the package
</pre>
<h2 id="Report_Format">Report Format</h2>
<p>
When the race detector finds a data race in the program, it prints a report.
The report contains stack traces for conflicting accesses, as well as stacks where the involved goroutines were created.
Here is an example:
</p>
<pre>
WARNING: DATA RACE
Read by goroutine 185:
net.(*pollServer).AddFD()
src/net/fd_unix.go:89 +0x398
net.(*pollServer).WaitWrite()
src/net/fd_unix.go:247 +0x45
net.(*netFD).Write()
src/net/fd_unix.go:540 +0x4d4
net.(*conn).Write()
src/net/net.go:129 +0x101
net.func·060()
src/net/timeout_test.go:603 +0xaf
Previous write by goroutine 184:
net.setWriteDeadline()
src/net/sockopt_posix.go:135 +0xdf
net.setDeadline()
src/net/sockopt_posix.go:144 +0x9c
net.(*conn).SetDeadline()
src/net/net.go:161 +0xe3
net.func·061()
src/net/timeout_test.go:616 +0x3ed
Goroutine 185 (running) created at:
net.func·061()
src/net/timeout_test.go:609 +0x288
Goroutine 184 (running) created at:
net.TestProlongTimeout()
src/net/timeout_test.go:618 +0x298
testing.tRunner()
src/testing/testing.go:301 +0xe8
</pre>
<h2 id="Options">Options</h2>
<p>
The <code>GORACE</code> environment variable sets race detector options.
The format is:
</p>
<pre>
GORACE="option1=val1 option2=val2"
</pre>
<p>
The options are:
</p>
<ul>
<li>
<code>log_path</code> (default <code>stderr</code>): The race detector writes
its report to a file named <code>log_path.<em>pid</em></code>.
The special names <code>stdout</code>
and <code>stderr</code> cause reports to be written to standard output and
standard error, respectively.
</li>
<li>
<code>exitcode</code> (default <code>66</code>): The exit status to use when
exiting after a detected race.
</li>
<li>
<code>strip_path_prefix</code> (default <code>""</code>): Strip this prefix
from all reported file paths, to make reports more concise.
</li>
<li>
<code>history_size</code> (default <code>1</code>): The per-goroutine memory
access history is <code>32K * 2**history_size elements</code>.
Increasing this value can avoid a "failed to restore the stack" error in reports, at the
cost of increased memory usage.
</li>
<li>
<code>halt_on_error</code> (default <code>0</code>): Controls whether the program
exits after reporting first data race.
</li>
<li>
<code>atexit_sleep_ms</code> (default <code>1000</code>): Amount of milliseconds
to sleep in the main goroutine before exiting.
</li>
</ul>
<p>
Example:
</p>
<pre>
$ GORACE="log_path=/tmp/race/report strip_path_prefix=/my/go/sources/" go test -race
</pre>
<h2 id="Excluding_Tests">Excluding Tests</h2>
<p>
When you build with <code>-race</code> flag, the <code>go</code> command defines additional
<a href="/pkg/go/build/#hdr-Build_Constraints">build tag</a> <code>race</code>.
You can use the tag to exclude some code and tests when running the race detector.
Some examples:
</p>
<pre>
// +build !race
package foo
// The test contains a data race. See issue 123.
func TestFoo(t *testing.T) {
// ...
}
// The test fails under the race detector due to timeouts.
func TestBar(t *testing.T) {
// ...
}
// The test takes too long under the race detector.
func TestBaz(t *testing.T) {
// ...
}
</pre>
<h2 id="How_To_Use">How To Use</h2>
<p>
To start, run your tests using the race detector (<code>go test -race</code>).
The race detector only finds races that happen at runtime, so it can't find
races in code paths that are not executed.
If your tests have incomplete coverage,
you may find more races by running a binary built with <code>-race</code> under a realistic
workload.
</p>
<h2 id="Typical_Data_Races">Typical Data Races</h2>
<p>
Here are some typical data races. All of them can be detected with the race detector.
</p>
<h3 id="Race_on_loop_counter">Race on loop counter</h3>
<pre>
func main() {
var wg sync.WaitGroup
wg.Add(5)
for i := 0; i < 5; i++ {
go func() {
fmt.Println(i) // Not the 'i' you are looking for.
wg.Done()
}()
}
wg.Wait()
}
</pre>
<p>
The variable <code>i</code> in the function literal is the same variable used by the loop, so
the read in the goroutine races with the loop increment.
(This program typically prints 55555, not 01234.)
The program can be fixed by making a copy of the variable:
</p>
<pre>
func main() {
var wg sync.WaitGroup
wg.Add(5)
for i := 0; i < 5; i++ {
go func(j int) {
fmt.Println(j) // Good. Read local copy of the loop counter.
wg.Done()
}(i)
}
wg.Wait()
}
</pre>
<h3 id="Accidentally_shared_variable">Accidentally shared variable</h3>
<pre>
// ParallelWrite writes data to file1 and file2, returns the errors.
func ParallelWrite(data []byte) chan error {
res := make(chan error, 2)
f1, err := os.Create("file1")
if err != nil {
res &lt;- err
} else {
go func() {
// This err is shared with the main goroutine,
// so the write races with the write below.
_, err = f1.Write(data)
res &lt;- err
f1.Close()
}()
}
f2, err := os.Create("file2") // The second conflicting write to err.
if err != nil {
res &lt;- err
} else {
go func() {
_, err = f2.Write(data)
res &lt;- err
f2.Close()
}()
}
return res
}
</pre>
<p>
The fix is to introduce new variables in the goroutines (note the use of <code>:=</code>):
</p>
<pre>
...
_, err := f1.Write(data)
...
_, err := f2.Write(data)
...
</pre>
<h3 id="Unprotected_global_variable">Unprotected global variable</h3>
<p>
If the following code is called from several goroutines, it leads to races on the <code>service</code> map.
Concurrent reads and writes of the same map are not safe:
</p>
<pre>
var service map[string]net.Addr
func RegisterService(name string, addr net.Addr) {
service[name] = addr
}
func LookupService(name string) net.Addr {
return service[name]
}
</pre>
<p>
To make the code safe, protect the accesses with a mutex:
</p>
<pre>
var (
service map[string]net.Addr
serviceMu sync.Mutex
)
func RegisterService(name string, addr net.Addr) {
serviceMu.Lock()
defer serviceMu.Unlock()
service[name] = addr
}
func LookupService(name string) net.Addr {
serviceMu.Lock()
defer serviceMu.Unlock()
return service[name]
}
</pre>
<h3 id="Primitive_unprotected_variable">Primitive unprotected variable</h3>
<p>
Data races can happen on variables of primitive types as well (<code>bool</code>, <code>int</code>, <code>int64</code>, etc.),
as in this example:
</p>
<pre>
type Watchdog struct{ last int64 }
func (w *Watchdog) KeepAlive() {
w.last = time.Now().UnixNano() // First conflicting access.
}
func (w *Watchdog) Start() {
go func() {
for {
time.Sleep(time.Second)
// Second conflicting access.
if w.last < time.Now().Add(-10*time.Second).UnixNano() {
fmt.Println("No keepalives for 10 seconds. Dying.")
os.Exit(1)
}
}
}()
}
</pre>
<p>
Even such "innocent" data races can lead to hard-to-debug problems caused by
non-atomicity of the memory accesses,
interference with compiler optimizations,
or reordering issues accessing processor memory .
</p>
<p>
A typical fix for this race is to use a channel or a mutex.
To preserve the lock-free behavior, one can also use the
<a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package.
</p>
<pre>
type Watchdog struct{ last int64 }
func (w *Watchdog) KeepAlive() {
atomic.StoreInt64(&amp;w.last, time.Now().UnixNano())
}
func (w *Watchdog) Start() {
go func() {
for {
time.Sleep(time.Second)
if atomic.LoadInt64(&amp;w.last) < time.Now().Add(-10*time.Second).UnixNano() {
fmt.Println("No keepalives for 10 seconds. Dying.")
os.Exit(1)
}
}
}()
}
</pre>
<h3 id="Unsynchronized_send_and_close_operations">Unsynchronized send and close operations</h3>
<p>
As this example demonstrates, unsynchronized send and close operations
on the same channel can also be a race condition:
</p>
<pre>
c := make(chan struct{}) // or buffered channel
// The race detector cannot derive the happens before relation
// for the following send and close operations. These two operations
// are unsynchronized and happen concurrently.
go func() { c <- struct{}{} }()
close(c)
</pre>
<p>
According to the Go memory model, a send on a channel happens before
the corresponding receive from that channel completes. To synchronize
send and close operations, use a receive operation that guarantees
the send is done before the close:
</p>
<pre>
c := make(chan struct{}) // or buffered channel
go func() { c <- struct{}{} }()
<-c
close(c)
</pre>
<h2 id="Supported_Systems">Supported Systems</h2>
<p>
The race detector runs on
<code>linux/amd64</code>, <code>linux/ppc64le</code>,
<code>linux/arm64</code>, <code>freebsd/amd64</code>,
<code>netbsd/amd64</code>, <code>darwin/amd64</code>,
<code>darwin/arm64</code>, and <code>windows/amd64</code>.
</p>
<h2 id="Runtime_Overheads">Runtime Overhead</h2>
<p>
The cost of race detection varies by program, but for a typical program, memory
usage may increase by 5-10x and execution time by 2-20x.
</p>
<p>
The race detector currently allocates an extra 8 bytes per <code>defer</code>
and <code>recover</code> statement. Those extra allocations <a
href="https://golang.org/issue/26813">are not recovered until the goroutine
exits</a>. This means that if you have a long-running goroutine that is
periodically issuing <code>defer</code> and <code>recover</code> calls,
the program memory usage may grow without bound. These memory allocations
will not show up in the output of <code>runtime.ReadMemStats</code> or
<code>runtime/pprof</code>.
</p>

View file

@ -1,6 +0,0 @@
<h1>Editing {{.Title}}</h1>
<form action="/save/{{.Title}}" method="POST">
<div><textarea name="body" rows="20" cols="80">{{printf "%s" .Body}}</textarea></div>
<div><input type="submit" value="Save"></div>
</form>

View file

@ -1,105 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"errors"
"html/template"
"io/ioutil"
"log"
"net/http"
"regexp"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title, err := getTitle(w, r)
if err != nil {
return
}
p, err := loadPage(title)
if err != nil {
http.Redirect(w, r, "/edit/"+title, http.StatusFound)
return
}
renderTemplate(w, "view", p)
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title, err := getTitle(w, r)
if err != nil {
return
}
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func saveHandler(w http.ResponseWriter, r *http.Request) {
title, err := getTitle(w, r)
if err != nil {
return
}
body := r.FormValue("body")
p := &Page{Title: title, Body: []byte(body)}
err = p.save()
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
http.Redirect(w, r, "/view/"+title, http.StatusFound)
}
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
t, err := template.ParseFiles(tmpl + ".html")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
err = t.Execute(w, p)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$")
func getTitle(w http.ResponseWriter, r *http.Request) (string, error) {
m := validPath.FindStringSubmatch(r.URL.Path)
if m == nil {
http.NotFound(w, r)
return "", errors.New("invalid Page Title")
}
return m[2], nil // The title is the second subexpression.
}
func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
http.HandleFunc("/save/", saveHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,56 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/edit/"):]
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
t, _ := template.ParseFiles("edit.html")
t.Execute(w, p)
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
t, _ := template.ParseFiles("view.html")
t.Execute(w, p)
}
func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,94 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
"regexp"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func viewHandler(w http.ResponseWriter, r *http.Request, title string) {
p, err := loadPage(title)
if err != nil {
http.Redirect(w, r, "/edit/"+title, http.StatusFound)
return
}
renderTemplate(w, "view", p)
}
func editHandler(w http.ResponseWriter, r *http.Request, title string) {
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func saveHandler(w http.ResponseWriter, r *http.Request, title string) {
body := r.FormValue("body")
p := &Page{Title: title, Body: []byte(body)}
err := p.save()
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
http.Redirect(w, r, "/view/"+title, http.StatusFound)
}
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
t, err := template.ParseFiles(tmpl + ".html")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
err = t.Execute(w, p)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$")
func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
m := validPath.FindStringSubmatch(r.URL.Path)
if m == nil {
http.NotFound(w, r)
return
}
fn(w, r, m[2])
}
}
func main() {
http.HandleFunc("/view/", makeHandler(viewHandler))
http.HandleFunc("/edit/", makeHandler(editHandler))
http.HandleFunc("/save/", makeHandler(saveHandler))
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,68 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/edit/"):]
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
renderTemplate(w, "view", p)
}
func saveHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/save/"):]
body := r.FormValue("body")
p := &Page{Title: title, Body: []byte(body)}
p.save()
http.Redirect(w, r, "/view/"+title, http.StatusFound)
}
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
t, _ := template.ParseFiles(tmpl + ".html")
t.Execute(w, p)
}
func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
http.HandleFunc("/save/", saveHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,92 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
"regexp"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func viewHandler(w http.ResponseWriter, r *http.Request, title string) {
p, err := loadPage(title)
if err != nil {
http.Redirect(w, r, "/edit/"+title, http.StatusFound)
return
}
renderTemplate(w, "view", p)
}
func editHandler(w http.ResponseWriter, r *http.Request, title string) {
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func saveHandler(w http.ResponseWriter, r *http.Request, title string) {
body := r.FormValue("body")
p := &Page{Title: title, Body: []byte(body)}
err := p.save()
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
http.Redirect(w, r, "/view/"+title, http.StatusFound)
}
var templates = template.Must(template.ParseFiles("edit.html", "view.html"))
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
err := templates.ExecuteTemplate(w, tmpl+".html", p)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$")
func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
m := validPath.FindStringSubmatch(r.URL.Path)
if m == nil {
http.NotFound(w, r)
return
}
fn(w, r, m[2])
}
}
func main() {
http.HandleFunc("/view/", makeHandler(viewHandler))
http.HandleFunc("/edit/", makeHandler(editHandler))
http.HandleFunc("/save/", makeHandler(saveHandler))
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,24 +0,0 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"fmt"
"log"
"net"
"net/http"
)
func serve() error {
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
log.Fatal(err)
}
fmt.Println(l.Addr().String())
s := &http.Server{}
return s.Serve(l)
}

View file

@ -1,3 +0,0 @@
module doc/articles/wiki
go 1.14

View file

@ -1,18 +0,0 @@
// +build ignore
package main
import (
"fmt"
"log"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
}
func main() {
http.HandleFunc("/", handler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,741 +0,0 @@
<!--{
"Title": "Writing Web Applications",
"Template": true
}-->
<h2>Introduction</h2>
<p>
Covered in this tutorial:
</p>
<ul>
<li>Creating a data structure with load and save methods</li>
<li>Using the <code>net/http</code> package to build web applications
<li>Using the <code>html/template</code> package to process HTML templates</li>
<li>Using the <code>regexp</code> package to validate user input</li>
<li>Using closures</li>
</ul>
<p>
Assumed knowledge:
</p>
<ul>
<li>Programming experience</li>
<li>Understanding of basic web technologies (HTTP, HTML)</li>
<li>Some UNIX/DOS command-line knowledge</li>
</ul>
<h2>Getting Started</h2>
<p>
At present, you need to have a FreeBSD, Linux, OS X, or Windows machine to run Go.
We will use <code>$</code> to represent the command prompt.
</p>
<p>
Install Go (see the <a href="/doc/install">Installation Instructions</a>).
</p>
<p>
Make a new directory for this tutorial inside your <code>GOPATH</code> and cd to it:
</p>
<pre>
$ mkdir gowiki
$ cd gowiki
</pre>
<p>
Create a file named <code>wiki.go</code>, open it in your favorite editor, and
add the following lines:
</p>
<pre>
package main
import (
"fmt"
"io/ioutil"
)
</pre>
<p>
We import the <code>fmt</code> and <code>ioutil</code> packages from the Go
standard library. Later, as we implement additional functionality, we will
add more packages to this <code>import</code> declaration.
</p>
<h2>Data Structures</h2>
<p>
Let's start by defining the data structures. A wiki consists of a series of
interconnected pages, each of which has a title and a body (the page content).
Here, we define <code>Page</code> as a struct with two fields representing
the title and body.
</p>
{{code "doc/articles/wiki/part1.go" `/^type Page/` `/}/`}}
<p>
The type <code>[]byte</code> means "a <code>byte</code> slice".
(See <a href="/doc/articles/slices_usage_and_internals.html">Slices: usage and
internals</a> for more on slices.)
The <code>Body</code> element is a <code>[]byte</code> rather than
<code>string</code> because that is the type expected by the <code>io</code>
libraries we will use, as you'll see below.
</p>
<p>
The <code>Page</code> struct describes how page data will be stored in memory.
But what about persistent storage? We can address that by creating a
<code>save</code> method on <code>Page</code>:
</p>
{{code "doc/articles/wiki/part1.go" `/^func.*Page.*save/` `/}/`}}
<p>
This method's signature reads: "This is a method named <code>save</code> that
takes as its receiver <code>p</code>, a pointer to <code>Page</code> . It takes
no parameters, and returns a value of type <code>error</code>."
</p>
<p>
This method will save the <code>Page</code>'s <code>Body</code> to a text
file. For simplicity, we will use the <code>Title</code> as the file name.
</p>
<p>
The <code>save</code> method returns an <code>error</code> value because
that is the return type of <code>WriteFile</code> (a standard library function
that writes a byte slice to a file). The <code>save</code> method returns the
error value, to let the application handle it should anything go wrong while
writing the file. If all goes well, <code>Page.save()</code> will return
<code>nil</code> (the zero-value for pointers, interfaces, and some other
types).
</p>
<p>
The octal integer literal <code>0600</code>, passed as the third parameter to
<code>WriteFile</code>, indicates that the file should be created with
read-write permissions for the current user only. (See the Unix man page
<code>open(2)</code> for details.)
</p>
<p>
In addition to saving pages, we will want to load pages, too:
</p>
{{code "doc/articles/wiki/part1-noerror.go" `/^func loadPage/` `/^}/`}}
<p>
The function <code>loadPage</code> constructs the file name from the title
parameter, reads the file's contents into a new variable <code>body</code>, and
returns a pointer to a <code>Page</code> literal constructed with the proper
title and body values.
</p>
<p>
Functions can return multiple values. The standard library function
<code>io.ReadFile</code> returns <code>[]byte</code> and <code>error</code>.
In <code>loadPage</code>, error isn't being handled yet; the "blank identifier"
represented by the underscore (<code>_</code>) symbol is used to throw away the
error return value (in essence, assigning the value to nothing).
</p>
<p>
But what happens if <code>ReadFile</code> encounters an error? For example,
the file might not exist. We should not ignore such errors. Let's modify the
function to return <code>*Page</code> and <code>error</code>.
</p>
{{code "doc/articles/wiki/part1.go" `/^func loadPage/` `/^}/`}}
<p>
Callers of this function can now check the second parameter; if it is
<code>nil</code> then it has successfully loaded a Page. If not, it will be an
<code>error</code> that can be handled by the caller (see the
<a href="/ref/spec#Errors">language specification</a> for details).
</p>
<p>
At this point we have a simple data structure and the ability to save to and
load from a file. Let's write a <code>main</code> function to test what we've
written:
</p>
{{code "doc/articles/wiki/part1.go" `/^func main/` `/^}/`}}
<p>
After compiling and executing this code, a file named <code>TestPage.txt</code>
would be created, containing the contents of <code>p1</code>. The file would
then be read into the struct <code>p2</code>, and its <code>Body</code> element
printed to the screen.
</p>
<p>
You can compile and run the program like this:
</p>
<pre>
$ go build wiki.go
$ ./wiki
This is a sample Page.
</pre>
<p>
(If you're using Windows you must type "<code>wiki</code>" without the
"<code>./</code>" to run the program.)
</p>
<p>
<a href="part1.go">Click here to view the code we've written so far.</a>
</p>
<h2>Introducing the <code>net/http</code> package (an interlude)</h2>
<p>
Here's a full working example of a simple web server:
</p>
{{code "doc/articles/wiki/http-sample.go"}}
<p>
The <code>main</code> function begins with a call to
<code>http.HandleFunc</code>, which tells the <code>http</code> package to
handle all requests to the web root (<code>"/"</code>) with
<code>handler</code>.
</p>
<p>
It then calls <code>http.ListenAndServe</code>, specifying that it should
listen on port 8080 on any interface (<code>":8080"</code>). (Don't
worry about its second parameter, <code>nil</code>, for now.)
This function will block until the program is terminated.
</p>
<p>
<code>ListenAndServe</code> always returns an error, since it only returns when an
unexpected error occurs.
In order to log that error we wrap the function call with <code>log.Fatal</code>.
</p>
<p>
The function <code>handler</code> is of the type <code>http.HandlerFunc</code>.
It takes an <code>http.ResponseWriter</code> and an <code>http.Request</code> as
its arguments.
</p>
<p>
An <code>http.ResponseWriter</code> value assembles the HTTP server's response; by writing
to it, we send data to the HTTP client.
</p>
<p>
An <code>http.Request</code> is a data structure that represents the client
HTTP request. <code>r.URL.Path</code> is the path component
of the request URL. The trailing <code>[1:]</code> means
"create a sub-slice of <code>Path</code> from the 1st character to the end."
This drops the leading "/" from the path name.
</p>
<p>
If you run this program and access the URL:
</p>
<pre>http://localhost:8080/monkeys</pre>
<p>
the program would present a page containing:
</p>
<pre>Hi there, I love monkeys!</pre>
<h2>Using <code>net/http</code> to serve wiki pages</h2>
<p>
To use the <code>net/http</code> package, it must be imported:
</p>
<pre>
import (
"fmt"
"io/ioutil"
"log"
<b>"net/http"</b>
)
</pre>
<p>
Let's create a handler, <code>viewHandler</code> that will allow users to
view a wiki page. It will handle URLs prefixed with "/view/".
</p>
{{code "doc/articles/wiki/part2.go" `/^func viewHandler/` `/^}/`}}
<p>
Again, note the use of <code>_</code> to ignore the <code>error</code>
return value from <code>loadPage</code>. This is done here for simplicity
and generally considered bad practice. We will attend to this later.
</p>
<p>
First, this function extracts the page title from <code>r.URL.Path</code>,
the path component of the request URL.
The <code>Path</code> is re-sliced with <code>[len("/view/"):]</code> to drop
the leading <code>"/view/"</code> component of the request path.
This is because the path will invariably begin with <code>"/view/"</code>,
which is not part of the page's title.
</p>
<p>
The function then loads the page data, formats the page with a string of simple
HTML, and writes it to <code>w</code>, the <code>http.ResponseWriter</code>.
</p>
<p>
To use this handler, we rewrite our <code>main</code> function to
initialize <code>http</code> using the <code>viewHandler</code> to handle
any requests under the path <code>/view/</code>.
</p>
{{code "doc/articles/wiki/part2.go" `/^func main/` `/^}/`}}
<p>
<a href="part2.go">Click here to view the code we've written so far.</a>
</p>
<p>
Let's create some page data (as <code>test.txt</code>), compile our code, and
try serving a wiki page.
</p>
<p>
Open <code>test.txt</code> file in your editor, and save the string "Hello world" (without quotes)
in it.
</p>
<pre>
$ go build wiki.go
$ ./wiki
</pre>
<p>
(If you're using Windows you must type "<code>wiki</code>" without the
"<code>./</code>" to run the program.)
</p>
<p>
With this web server running, a visit to <code><a
href="http://localhost:8080/view/test">http://localhost:8080/view/test</a></code>
should show a page titled "test" containing the words "Hello world".
</p>
<h2>Editing Pages</h2>
<p>
A wiki is not a wiki without the ability to edit pages. Let's create two new
handlers: one named <code>editHandler</code> to display an 'edit page' form,
and the other named <code>saveHandler</code> to save the data entered via the
form.
</p>
<p>
First, we add them to <code>main()</code>:
</p>
{{code "doc/articles/wiki/final-noclosure.go" `/^func main/` `/^}/`}}
<p>
The function <code>editHandler</code> loads the page
(or, if it doesn't exist, create an empty <code>Page</code> struct),
and displays an HTML form.
</p>
{{code "doc/articles/wiki/notemplate.go" `/^func editHandler/` `/^}/`}}
<p>
This function will work fine, but all that hard-coded HTML is ugly.
Of course, there is a better way.
</p>
<h2>The <code>html/template</code> package</h2>
<p>
The <code>html/template</code> package is part of the Go standard library.
We can use <code>html/template</code> to keep the HTML in a separate file,
allowing us to change the layout of our edit page without modifying the
underlying Go code.
</p>
<p>
First, we must add <code>html/template</code> to the list of imports. We
also won't be using <code>fmt</code> anymore, so we have to remove that.
</p>
<pre>
import (
<b>"html/template"</b>
"io/ioutil"
"net/http"
)
</pre>
<p>
Let's create a template file containing the HTML form.
Open a new file named <code>edit.html</code>, and add the following lines:
</p>
{{code "doc/articles/wiki/edit.html"}}
<p>
Modify <code>editHandler</code> to use the template, instead of the hard-coded
HTML:
</p>
{{code "doc/articles/wiki/final-noerror.go" `/^func editHandler/` `/^}/`}}
<p>
The function <code>template.ParseFiles</code> will read the contents of
<code>edit.html</code> and return a <code>*template.Template</code>.
</p>
<p>
The method <code>t.Execute</code> executes the template, writing the
generated HTML to the <code>http.ResponseWriter</code>.
The <code>.Title</code> and <code>.Body</code> dotted identifiers refer to
<code>p.Title</code> and <code>p.Body</code>.
</p>
<p>
Template directives are enclosed in double curly braces.
The <code>printf "%s" .Body</code> instruction is a function call
that outputs <code>.Body</code> as a string instead of a stream of bytes,
the same as a call to <code>fmt.Printf</code>.
The <code>html/template</code> package helps guarantee that only safe and
correct-looking HTML is generated by template actions. For instance, it
automatically escapes any greater than sign (<code>&gt;</code>), replacing it
with <code>&amp;gt;</code>, to make sure user data does not corrupt the form
HTML.
</p>
<p>
Since we're working with templates now, let's create a template for our
<code>viewHandler</code> called <code>view.html</code>:
</p>
{{code "doc/articles/wiki/view.html"}}
<p>
Modify <code>viewHandler</code> accordingly:
</p>
{{code "doc/articles/wiki/final-noerror.go" `/^func viewHandler/` `/^}/`}}
<p>
Notice that we've used almost exactly the same templating code in both
handlers. Let's remove this duplication by moving the templating code
to its own function:
</p>
{{code "doc/articles/wiki/final-template.go" `/^func renderTemplate/` `/^}/`}}
<p>
And modify the handlers to use that function:
</p>
{{code "doc/articles/wiki/final-template.go" `/^func viewHandler/` `/^}/`}}
{{code "doc/articles/wiki/final-template.go" `/^func editHandler/` `/^}/`}}
<p>
If we comment out the registration of our unimplemented save handler in
<code>main</code>, we can once again build and test our program.
<a href="part3.go">Click here to view the code we've written so far.</a>
</p>
<h2>Handling non-existent pages</h2>
<p>
What if you visit <a href="http://localhost:8080/view/APageThatDoesntExist">
<code>/view/APageThatDoesntExist</code></a>? You'll see a page containing
HTML. This is because it ignores the error return value from
<code>loadPage</code> and continues to try and fill out the template
with no data. Instead, if the requested Page doesn't exist, it should
redirect the client to the edit Page so the content may be created:
</p>
{{code "doc/articles/wiki/part3-errorhandling.go" `/^func viewHandler/` `/^}/`}}
<p>
The <code>http.Redirect</code> function adds an HTTP status code of
<code>http.StatusFound</code> (302) and a <code>Location</code>
header to the HTTP response.
</p>
<h2>Saving Pages</h2>
<p>
The function <code>saveHandler</code> will handle the submission of forms
located on the edit pages. After uncommenting the related line in
<code>main</code>, let's implement the handler:
</p>
{{code "doc/articles/wiki/final-template.go" `/^func saveHandler/` `/^}/`}}
<p>
The page title (provided in the URL) and the form's only field,
<code>Body</code>, are stored in a new <code>Page</code>.
The <code>save()</code> method is then called to write the data to a file,
and the client is redirected to the <code>/view/</code> page.
</p>
<p>
The value returned by <code>FormValue</code> is of type <code>string</code>.
We must convert that value to <code>[]byte</code> before it will fit into
the <code>Page</code> struct. We use <code>[]byte(body)</code> to perform
the conversion.
</p>
<h2>Error handling</h2>
<p>
There are several places in our program where errors are being ignored. This
is bad practice, not least because when an error does occur the program will
have unintended behavior. A better solution is to handle the errors and return
an error message to the user. That way if something does go wrong, the server
will function exactly how we want and the user can be notified.
</p>
<p>
First, let's handle the errors in <code>renderTemplate</code>:
</p>
{{code "doc/articles/wiki/final-parsetemplate.go" `/^func renderTemplate/` `/^}/`}}
<p>
The <code>http.Error</code> function sends a specified HTTP response code
(in this case "Internal Server Error") and error message.
Already the decision to put this in a separate function is paying off.
</p>
<p>
Now let's fix up <code>saveHandler</code>:
</p>
{{code "doc/articles/wiki/part3-errorhandling.go" `/^func saveHandler/` `/^}/`}}
<p>
Any errors that occur during <code>p.save()</code> will be reported
to the user.
</p>
<h2>Template caching</h2>
<p>
There is an inefficiency in this code: <code>renderTemplate</code> calls
<code>ParseFiles</code> every time a page is rendered.
A better approach would be to call <code>ParseFiles</code> once at program
initialization, parsing all templates into a single <code>*Template</code>.
Then we can use the
<a href="/pkg/html/template/#Template.ExecuteTemplate"><code>ExecuteTemplate</code></a>
method to render a specific template.
</p>
<p>
First we create a global variable named <code>templates</code>, and initialize
it with <code>ParseFiles</code>.
</p>
{{code "doc/articles/wiki/final.go" `/var templates/`}}
<p>
The function <code>template.Must</code> is a convenience wrapper that panics
when passed a non-nil <code>error</code> value, and otherwise returns the
<code>*Template</code> unaltered. A panic is appropriate here; if the templates
can't be loaded the only sensible thing to do is exit the program.
</p>
<p>
The <code>ParseFiles</code> function takes any number of string arguments that
identify our template files, and parses those files into templates that are
named after the base file name. If we were to add more templates to our
program, we would add their names to the <code>ParseFiles</code> call's
arguments.
</p>
<p>
We then modify the <code>renderTemplate</code> function to call the
<code>templates.ExecuteTemplate</code> method with the name of the appropriate
template:
</p>
{{code "doc/articles/wiki/final.go" `/func renderTemplate/` `/^}/`}}
<p>
Note that the template name is the template file name, so we must
append <code>".html"</code> to the <code>tmpl</code> argument.
</p>
<h2>Validation</h2>
<p>
As you may have observed, this program has a serious security flaw: a user
can supply an arbitrary path to be read/written on the server. To mitigate
this, we can write a function to validate the title with a regular expression.
</p>
<p>
First, add <code>"regexp"</code> to the <code>import</code> list.
Then we can create a global variable to store our validation
expression:
</p>
{{code "doc/articles/wiki/final-noclosure.go" `/^var validPath/`}}
<p>
The function <code>regexp.MustCompile</code> will parse and compile the
regular expression, and return a <code>regexp.Regexp</code>.
<code>MustCompile</code> is distinct from <code>Compile</code> in that it will
panic if the expression compilation fails, while <code>Compile</code> returns
an <code>error</code> as a second parameter.
</p>
<p>
Now, let's write a function that uses the <code>validPath</code>
expression to validate path and extract the page title:
</p>
{{code "doc/articles/wiki/final-noclosure.go" `/func getTitle/` `/^}/`}}
<p>
If the title is valid, it will be returned along with a <code>nil</code>
error value. If the title is invalid, the function will write a
"404 Not Found" error to the HTTP connection, and return an error to the
handler. To create a new error, we have to import the <code>errors</code>
package.
</p>
<p>
Let's put a call to <code>getTitle</code> in each of the handlers:
</p>
{{code "doc/articles/wiki/final-noclosure.go" `/^func viewHandler/` `/^}/`}}
{{code "doc/articles/wiki/final-noclosure.go" `/^func editHandler/` `/^}/`}}
{{code "doc/articles/wiki/final-noclosure.go" `/^func saveHandler/` `/^}/`}}
<h2>Introducing Function Literals and Closures</h2>
<p>
Catching the error condition in each handler introduces a lot of repeated code.
What if we could wrap each of the handlers in a function that does this
validation and error checking? Go's
<a href="/ref/spec#Function_literals">function
literals</a> provide a powerful means of abstracting functionality
that can help us here.
</p>
<p>
First, we re-write the function definition of each of the handlers to accept
a title string:
</p>
<pre>
func viewHandler(w http.ResponseWriter, r *http.Request, title string)
func editHandler(w http.ResponseWriter, r *http.Request, title string)
func saveHandler(w http.ResponseWriter, r *http.Request, title string)
</pre>
<p>
Now let's define a wrapper function that <i>takes a function of the above
type</i>, and returns a function of type <code>http.HandlerFunc</code>
(suitable to be passed to the function <code>http.HandleFunc</code>):
</p>
<pre>
func makeHandler(fn func (http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
// Here we will extract the page title from the Request,
// and call the provided handler 'fn'
}
}
</pre>
<p>
The returned function is called a closure because it encloses values defined
outside of it. In this case, the variable <code>fn</code> (the single argument
to <code>makeHandler</code>) is enclosed by the closure. The variable
<code>fn</code> will be one of our save, edit, or view handlers.
</p>
<p>
Now we can take the code from <code>getTitle</code> and use it here
(with some minor modifications):
</p>
{{code "doc/articles/wiki/final.go" `/func makeHandler/` `/^}/`}}
<p>
The closure returned by <code>makeHandler</code> is a function that takes
an <code>http.ResponseWriter</code> and <code>http.Request</code> (in other
words, an <code>http.HandlerFunc</code>).
The closure extracts the <code>title</code> from the request path, and
validates it with the <code>validPath</code> regexp. If the
<code>title</code> is invalid, an error will be written to the
<code>ResponseWriter</code> using the <code>http.NotFound</code> function.
If the <code>title</code> is valid, the enclosed handler function
<code>fn</code> will be called with the <code>ResponseWriter</code>,
<code>Request</code>, and <code>title</code> as arguments.
</p>
<p>
Now we can wrap the handler functions with <code>makeHandler</code> in
<code>main</code>, before they are registered with the <code>http</code>
package:
</p>
{{code "doc/articles/wiki/final.go" `/func main/` `/^}/`}}
<p>
Finally we remove the calls to <code>getTitle</code> from the handler functions,
making them much simpler:
</p>
{{code "doc/articles/wiki/final.go" `/^func viewHandler/` `/^}/`}}
{{code "doc/articles/wiki/final.go" `/^func editHandler/` `/^}/`}}
{{code "doc/articles/wiki/final.go" `/^func saveHandler/` `/^}/`}}
<h2>Try it out!</h2>
<p>
<a href="final.go">Click here to view the final code listing.</a>
</p>
<p>
Recompile the code, and run the app:
</p>
<pre>
$ go build wiki.go
$ ./wiki
</pre>
<p>
Visiting <a href="http://localhost:8080/view/ANewPage">http://localhost:8080/view/ANewPage</a>
should present you with the page edit form. You should then be able to
enter some text, click 'Save', and be redirected to the newly created page.
</p>
<h2>Other tasks</h2>
<p>
Here are some simple tasks you might want to tackle on your own:
</p>
<ul>
<li>Store templates in <code>tmpl/</code> and page data in <code>data/</code>.
<li>Add a handler to make the web root redirect to
<code>/view/FrontPage</code>.</li>
<li>Spruce up the page templates by making them valid HTML and adding some
CSS rules.</li>
<li>Implement inter-page linking by converting instances of
<code>[PageName]</code> to <br>
<code>&lt;a href="/view/PageName"&gt;PageName&lt;/a&gt;</code>.
(hint: you could use <code>regexp.ReplaceAllFunc</code> to do this)
</li>
</ul>

View file

@ -1,59 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", p.Title, p.Body)
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/edit/"):]
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
fmt.Fprintf(w, "<h1>Editing %s</h1>"+
"<form action=\"/save/%s\" method=\"POST\">"+
"<textarea name=\"body\">%s</textarea><br>"+
"<input type=\"submit\" value=\"Save\">"+
"</form>",
p.Title, p.Title, p.Body)
}
func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,35 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"fmt"
"io/ioutil"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) *Page {
filename := title + ".txt"
body, _ := ioutil.ReadFile(filename)
return &Page{Title: title, Body: body}
}
func main() {
p1 := &Page{Title: "TestPage", Body: []byte("This is a sample page.")}
p1.save()
p2 := loadPage("TestPage")
fmt.Println(string(p2.Body))
}

View file

@ -1,38 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"fmt"
"io/ioutil"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func main() {
p1 := &Page{Title: "TestPage", Body: []byte("This is a sample Page.")}
p1.save()
p2, _ := loadPage("TestPage")
fmt.Println(string(p2.Body))
}

View file

@ -1,44 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", p.Title, p.Body)
}
func main() {
http.HandleFunc("/view/", viewHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,76 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
t, _ := template.ParseFiles(tmpl + ".html")
t.Execute(w, p)
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, err := loadPage(title)
if err != nil {
http.Redirect(w, r, "/edit/"+title, http.StatusFound)
return
}
renderTemplate(w, "view", p)
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/edit/"):]
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func saveHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/save/"):]
body := r.FormValue("body")
p := &Page{Title: title, Body: []byte(body)}
err := p.save()
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
http.Redirect(w, r, "/view/"+title, http.StatusFound)
}
func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
http.HandleFunc("/save/", saveHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1,60 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
)
type Page struct {
Title string
Body []byte
}
func (p *Page) save() error {
filename := p.Title + ".txt"
return ioutil.WriteFile(filename, p.Body, 0600)
}
func loadPage(title string) (*Page, error) {
filename := title + ".txt"
body, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return &Page{Title: title, Body: body}, nil
}
func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {
t, _ := template.ParseFiles(tmpl + ".html")
t.Execute(w, p)
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
renderTemplate(w, "view", p)
}
func editHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/edit/"):]
p, err := loadPage(title)
if err != nil {
p = &Page{Title: title}
}
renderTemplate(w, "edit", p)
}
func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
//http.HandleFunc("/save/", saveHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}

View file

@ -1 +0,0 @@
some content

View file

@ -1,6 +0,0 @@
<h1>Editing Test</h1>
<form action="/save/Test" method="POST">
<div><textarea name="body" rows="20" cols="80"></textarea></div>
<div><input type="submit" value="Save"></div>
</form>

View file

@ -1,5 +0,0 @@
<h1>Test</h1>
<p>[<a href="/edit/Test">edit</a>]</p>
<div>some content</div>

View file

@ -1,5 +0,0 @@
<h1>{{.Title}}</h1>
<p>[<a href="/edit/{{.Title}}">edit</a>]</p>
<div>{{printf "%s" .Body}}</div>

View file

@ -1,165 +0,0 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main_test
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
)
func TestSnippetsCompile(t *testing.T) {
if testing.Short() {
t.Skip("skipping slow builds in short mode")
}
goFiles, err := filepath.Glob("*.go")
if err != nil {
t.Fatal(err)
}
for _, f := range goFiles {
if strings.HasSuffix(f, "_test.go") {
continue
}
f := f
t.Run(f, func(t *testing.T) {
t.Parallel()
cmd := exec.Command("go", "build", "-o", os.DevNull, f)
out, err := cmd.CombinedOutput()
if err != nil {
t.Errorf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, out)
}
})
}
}
func TestWikiServer(t *testing.T) {
must := func(err error) {
if err != nil {
t.Helper()
t.Fatal(err)
}
}
dir, err := ioutil.TempDir("", t.Name())
must(err)
defer os.RemoveAll(dir)
// We're testing a walkthrough example of how to write a server.
//
// That server hard-codes a port number to make the walkthrough simpler, but
// we can't assume that the hard-coded port is available on an arbitrary
// builder. So we'll patch out the hard-coded port, and replace it with a
// function that writes the server's address to stdout
// so that we can read it and know where to send the test requests.
finalGo, err := ioutil.ReadFile("final.go")
must(err)
const patchOld = `log.Fatal(http.ListenAndServe(":8080", nil))`
patched := bytes.ReplaceAll(finalGo, []byte(patchOld), []byte(`log.Fatal(serve())`))
if bytes.Equal(patched, finalGo) {
t.Fatalf("Can't patch final.go: %q not found.", patchOld)
}
must(ioutil.WriteFile(filepath.Join(dir, "final_patched.go"), patched, 0644))
// Build the server binary from the patched sources.
// The 'go' command requires that they all be in the same directory.
// final_test.go provides the implemtation for our serve function.
must(copyFile(filepath.Join(dir, "final_srv.go"), "final_test.go"))
cmd := exec.Command("go", "build",
"-o", filepath.Join(dir, "final.exe"),
filepath.Join(dir, "final_patched.go"),
filepath.Join(dir, "final_srv.go"))
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, out)
}
// Run the server in our temporary directory so that it can
// write its content there. It also needs a couple of template files,
// and looks for them in the same directory.
must(copyFile(filepath.Join(dir, "edit.html"), "edit.html"))
must(copyFile(filepath.Join(dir, "view.html"), "view.html"))
cmd = exec.Command(filepath.Join(dir, "final.exe"))
cmd.Dir = dir
stderr := bytes.NewBuffer(nil)
cmd.Stderr = stderr
stdout, err := cmd.StdoutPipe()
must(err)
must(cmd.Start())
defer func() {
cmd.Process.Kill()
err := cmd.Wait()
if stderr.Len() > 0 {
t.Logf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, stderr)
}
}()
var addr string
if _, err := fmt.Fscanln(stdout, &addr); err != nil || addr == "" {
t.Fatalf("Failed to read server address: %v", err)
}
// The server is up and has told us its address.
// Make sure that its HTTP API works as described in the article.
r, err := http.Get(fmt.Sprintf("http://%s/edit/Test", addr))
must(err)
responseMustMatchFile(t, r, "test_edit.good")
r, err = http.Post(fmt.Sprintf("http://%s/save/Test", addr),
"application/x-www-form-urlencoded",
strings.NewReader("body=some%20content"))
must(err)
responseMustMatchFile(t, r, "test_view.good")
gotTxt, err := ioutil.ReadFile(filepath.Join(dir, "Test.txt"))
must(err)
wantTxt, err := ioutil.ReadFile("test_Test.txt.good")
must(err)
if !bytes.Equal(wantTxt, gotTxt) {
t.Fatalf("Test.txt differs from expected after posting to /save.\ngot:\n%s\nwant:\n%s", gotTxt, wantTxt)
}
r, err = http.Get(fmt.Sprintf("http://%s/view/Test", addr))
must(err)
responseMustMatchFile(t, r, "test_view.good")
}
func responseMustMatchFile(t *testing.T, r *http.Response, filename string) {
t.Helper()
defer r.Body.Close()
body, err := ioutil.ReadAll(r.Body)
if err != nil {
t.Fatal(err)
}
wantBody, err := ioutil.ReadFile(filename)
if err != nil {
t.Fatal(err)
}
if !bytes.Equal(body, wantBody) {
t.Fatalf("%v: body does not match %s.\ngot:\n%s\nwant:\n%s", r.Request.URL, filename, body, wantBody)
}
}
func copyFile(dst, src string) error {
buf, err := ioutil.ReadFile(src)
if err != nil {
return err
}
return ioutil.WriteFile(dst, buf, 0644)
}

View file

@ -464,6 +464,57 @@ Function is the top of the call stack. Traceback should stop at this function.
</li>
</ul>
<h3 id="data-offsets">Interacting with Go types and constants</h3>
<p>
If a package has any .s files, then <code>go build</code> will direct
the compiler to emit a special header called <code>go_asm.h</code>,
which the .s files can then <code>#include</code>.
The file contains symbolic <code>#define</code> constants for the
offsets of Go struct fields, the sizes of Go struct types, and most
Go <code>const</code> declarations defined in the current package.
Go assembly should avoid making assumptions about the layout of Go
types and instead use these constants.
This improves the readability of assembly code, and keeps it robust to
changes in data layout either in the Go type definitions or in the
layout rules used by the Go compiler.
</p>
<p>
Constants are of the form <code>const_<i>name</i></code>.
For example, given the Go declaration <code>const bufSize =
1024</code>, assembly code can refer to the value of this constant
as <code>const_bufSize</code>.
</p>
<p>
Field offsets are of the form <code><i>type</i>_<i>field</i></code>.
Struct sizes are of the form <code><i>type</i>__size</code>.
For example, consider the following Go definition:
</p>
<pre>
type reader struct {
buf [bufSize]byte
r int
}
</pre>
<p>
Assembly can refer to the size of this struct
as <code>reader__size</code> and the offsets of the two fields
as <code>reader_buf</code> and <code>reader_r</code>.
Hence, if register <code>R1</code> contains a pointer to
a <code>reader</code>, assembly can reference the <code>r</code> field
as <code>reader_r(R1)</code>.
</p>
<p>
If any of these <code>#define</code> names are ambiguous (for example,
a struct with a <code>_size</code> field), <code>#include
"go_asm.h"</code> will fail with a "redefinition of macro" error.
</p>
<h3 id="runtime">Runtime Coordination</h3>
<p>
@ -615,21 +666,15 @@ Here follow some descriptions of key Go-specific details for the supported archi
<p>
The runtime pointer to the <code>g</code> structure is maintained
through the value of an otherwise unused (as far as Go is concerned) register in the MMU.
An OS-dependent macro <code>get_tls</code> is defined for the assembler if the source is
in the <code>runtime</code> package and includes a special header, <code>go_tls.h</code>:
In the runtime package, assembly code can include <code>go_tls.h</code>, which defines
an OS- and architecture-dependent macro <code>get_tls</code> for accessing this register.
The <code>get_tls</code> macro takes one argument, which is the register to load the
<code>g</code> pointer into.
</p>
<pre>
#include "go_tls.h"
</pre>
<p>
Within the runtime, the <code>get_tls</code> macro loads its argument register
with a pointer to the <code>g</code> pointer, and the <code>g</code> struct
contains the <code>m</code> pointer.
There's another special header containing the offsets for each
element of <code>g</code>, called <code>go_asm.h</code>.
The sequence to load <code>g</code> and <code>m</code> using <code>CX</code> looks like this:
For example, the sequence to load <code>g</code> and <code>m</code>
using <code>CX</code> looks like this:
</p>
<pre>
@ -642,8 +687,7 @@ MOVL g_m(AX), BX // Move g.m into BX.
</pre>
<p>
Note: The code above works only in the <code>runtime</code> package, while <code>go_tls.h</code> also
applies to <a href="#arm">arm</a>, <a href="#amd64">amd64</a> and amd64p32, and <code>go_asm.h</code> applies to all architectures.
The <code>get_tls</code> macro is also defined on <a href="#amd64">amd64</a>.
</p>
<p>

View file

@ -1,100 +0,0 @@
<!--{
"Title": "Command Documentation",
"Path": "/doc/cmd"
}-->
<p>
There is a suite of programs to build and process Go source code.
Instead of being run directly, programs in the suite are usually invoked
by the <a href="/cmd/go/">go</a> program.
</p>
<p>
The most common way to run these programs is as a subcommand of the go program,
for instance as <code>go fmt</code>. Run like this, the command operates on
complete packages of Go source code, with the go program invoking the
underlying binary with arguments appropriate to package-level processing.
</p>
<p>
The programs can also be run as stand-alone binaries, with unmodified arguments,
using the go <code>tool</code> subcommand, such as <code>go tool cgo</code>.
For most commands this is mainly useful for debugging.
Some of the commands, such as <code>pprof</code>, are accessible only through
the go <code>tool</code> subcommand.
</p>
<p>
Finally the <code>fmt</code> and <code>godoc</code> commands are installed
as regular binaries called <code>gofmt</code> and <code>godoc</code> because
they are so often referenced.
</p>
<p>
Click on the links for more documentation, invocation methods, and usage details.
</p>
<table class="dir">
<tr>
<th>Name</th>
<th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th>Synopsis</th>
</tr>
<tr>
<td><a href="/cmd/go/">go</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
The <code>go</code> program manages Go source code and runs the other
commands listed here.
See the command docs for usage
details.
</td>
</tr>
<tr>
<td><a href="/cmd/cgo/">cgo</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Cgo enables the creation of Go packages that call C code.</td>
</tr>
<tr>
<td><a href="/cmd/cover/">cover</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Cover is a program for creating and analyzing the coverage profiles
generated by <code>"go test -coverprofile"</code>.</td>
</tr>
<tr>
<td><a href="/cmd/fix/">fix</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Fix finds Go programs that use old features of the language and libraries
and rewrites them to use newer ones.</td>
</tr>
<tr>
<td><a href="/cmd/gofmt/">fmt</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Fmt formats Go packages, it is also available as an independent <a href="/cmd/gofmt/">
gofmt</a> command with more general options.</td>
</tr>
<tr>
<td><a href="//godoc.org/golang.org/x/tools/cmd/godoc/">godoc</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Godoc extracts and generates documentation for Go packages.</td>
</tr>
<tr>
<td><a href="/cmd/vet/">vet</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Vet examines Go source code and reports suspicious constructs, such as Printf
calls whose arguments do not align with the format string.</td>
</tr>
</table>
<p>
This is an abridged list. See the <a href="/cmd/">full command reference</a>
for documentation of the compilers and more.
</p>

View file

@ -1,234 +0,0 @@
/*
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/
#codewalk-main {
text-align: left;
width: 100%;
overflow: auto;
}
#code-display {
border: 0;
width: 100%;
}
.setting {
font-size: 8pt;
color: #888888;
padding: 5px;
}
.hotkey {
text-decoration: underline;
}
/* Style for Comments (the left-hand column) */
#comment-column {
margin: 0pt;
width: 30%;
}
#comment-column.right {
float: right;
}
#comment-column.left {
float: left;
}
#comment-area {
overflow-x: hidden;
overflow-y: auto;
}
.comment {
cursor: pointer;
font-size: 16px;
border: 2px solid #ba9836;
margin-bottom: 10px;
margin-right: 10px; /* yes, for both .left and .right */
}
.comment:last-child {
margin-bottom: 0px;
}
.right .comment {
margin-left: 10px;
}
.right .comment.first {
}
.right .comment.last {
}
.left .comment.first {
}
.left .comment.last {
}
.comment.selected {
border-color: #99b2cb;
}
.right .comment.selected {
border-left-width: 12px;
margin-left: 0px;
}
.left .comment.selected {
border-right-width: 12px;
margin-right: 0px;
}
.comment-link {
display: none;
}
.comment-title {
font-size: small;
font-weight: bold;
background-color: #fffff0;
padding-right: 10px;
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
}
.right .comment-title {
}
.left .comment-title {
}
.comment.selected .comment-title {
background-color: #f8f8ff;
}
.comment-text {
overflow: auto;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-bottom: 5px;
font-size: small;
line-height: 1.3em;
}
.comment-text p {
margin-top: 0em;
margin-bottom: 0.5em;
}
.comment-text p:last-child {
margin-bottom: 0em;
}
.file-name {
font-size: x-small;
padding-top: 0px;
padding-bottom: 5px;
}
.hidden-filepaths .file-name {
display: none;
}
.path-dir {
color: #555;
}
.path-file {
color: #555;
}
/* Style for Code (the right-hand column) */
/* Wrapper for the code column to make widths get calculated correctly */
#code-column {
display: block;
position: relative;
margin: 0pt;
width: 70%;
}
#code-column.left {
float: left;
}
#code-column.right {
float: right;
}
#code-area {
background-color: #f8f8ff;
border: 2px solid #99b2cb;
padding: 5px;
}
.left #code-area {
margin-right: -1px;
}
.right #code-area {
margin-left: -1px;
}
#code-header {
margin-bottom: 5px;
}
#code {
background-color: white;
}
code {
font-size: 100%;
}
.codewalkhighlight {
font-weight: bold;
background-color: #f8f8ff;
}
#code-display {
margin-top: 0px;
margin-bottom: 0px;
}
#sizer {
position: absolute;
cursor: col-resize;
left: 0px;
top: 0px;
width: 8px;
}
/* Style for options (bottom strip) */
#code-options {
display: none;
}
#code-options > span {
padding-right: 20px;
}
#code-options .selected {
border-bottom: 1px dotted;
}
#comment-options {
text-align: center;
}
div#content {
padding-bottom: 0em;
}

View file

@ -1,305 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/**
* A class to hold information about the Codewalk Viewer.
* @param {jQuery} context The top element in whose context the viewer should
* operate. It will not touch any elements above this one.
* @constructor
*/
var CodewalkViewer = function(context) {
this.context = context;
/**
* The div that contains all of the comments and their controls.
*/
this.commentColumn = this.context.find('#comment-column');
/**
* The div that contains the comments proper.
*/
this.commentArea = this.context.find('#comment-area');
/**
* The div that wraps the iframe with the code, as well as the drop down menu
* listing the different files.
* @type {jQuery}
*/
this.codeColumn = this.context.find('#code-column');
/**
* The div that contains the code but excludes the options strip.
* @type {jQuery}
*/
this.codeArea = this.context.find('#code-area');
/**
* The iframe that holds the code (from Sourcerer).
* @type {jQuery}
*/
this.codeDisplay = this.context.find('#code-display');
/**
* The overlaid div used as a grab handle for sizing the code/comment panes.
* @type {jQuery}
*/
this.sizer = this.context.find('#sizer');
/**
* The full-screen overlay that ensures we don't lose track of the mouse
* while dragging.
* @type {jQuery}
*/
this.overlay = this.context.find('#overlay');
/**
* The hidden input field that we use to hold the focus so that we can detect
* shortcut keypresses.
* @type {jQuery}
*/
this.shortcutInput = this.context.find('#shortcut-input');
/**
* The last comment that was selected.
* @type {jQuery}
*/
this.lastSelected = null;
};
/**
* Minimum width of the comments or code pane, in pixels.
* @type {number}
*/
CodewalkViewer.MIN_PANE_WIDTH = 200;
/**
* Navigate the code iframe to the given url and update the code popout link.
* @param {string} url The target URL.
* @param {Object} opt_window Window dependency injection for testing only.
*/
CodewalkViewer.prototype.navigateToCode = function(url, opt_window) {
if (!opt_window) opt_window = window;
// Each iframe is represented by two distinct objects in the DOM: an iframe
// object and a window object. These do not expose the same capabilities.
// Here we need to get the window representation to get the location member,
// so we access it directly through window[] since jQuery returns the iframe
// representation.
// We replace location rather than set so as not to create a history for code
// navigation.
opt_window['code-display'].location.replace(url);
var k = url.indexOf('&');
if (k != -1) url = url.slice(0, k);
k = url.indexOf('fileprint=');
if (k != -1) url = url.slice(k+10, url.length);
this.context.find('#code-popout-link').attr('href', url);
};
/**
* Selects the first comment from the list and forces a refresh of the code
* view.
*/
CodewalkViewer.prototype.selectFirstComment = function() {
// TODO(rsc): handle case where there are no comments
var firstSourcererLink = this.context.find('.comment:first');
this.changeSelectedComment(firstSourcererLink);
};
/**
* Sets the target on all links nested inside comments to be _blank.
*/
CodewalkViewer.prototype.targetCommentLinksAtBlank = function() {
this.context.find('.comment a[href], #description a[href]').each(function() {
if (!this.target) this.target = '_blank';
});
};
/**
* Installs event handlers for all the events we care about.
*/
CodewalkViewer.prototype.installEventHandlers = function() {
var self = this;
this.context.find('.comment')
.click(function(event) {
if (jQuery(event.target).is('a[href]')) return true;
self.changeSelectedComment(jQuery(this));
return false;
});
this.context.find('#code-selector')
.change(function() {self.navigateToCode(jQuery(this).val());});
this.context.find('#description-table .quote-feet.setting')
.click(function() {self.toggleDescription(jQuery(this)); return false;});
this.sizer
.mousedown(function(ev) {self.startSizerDrag(ev); return false;});
this.overlay
.mouseup(function(ev) {self.endSizerDrag(ev); return false;})
.mousemove(function(ev) {self.handleSizerDrag(ev); return false;});
this.context.find('#prev-comment')
.click(function() {
self.changeSelectedComment(self.lastSelected.prev()); return false;
});
this.context.find('#next-comment')
.click(function() {
self.changeSelectedComment(self.lastSelected.next()); return false;
});
// Workaround for Firefox 2 and 3, which steal focus from the main document
// whenever the iframe content is (re)loaded. The input field is not shown,
// but is a way for us to bring focus back to a place where we can detect
// keypresses.
this.context.find('#code-display')
.load(function(ev) {self.shortcutInput.focus();});
jQuery(document).keypress(function(ev) {
switch(ev.which) {
case 110: // 'n'
self.changeSelectedComment(self.lastSelected.next());
return false;
case 112: // 'p'
self.changeSelectedComment(self.lastSelected.prev());
return false;
default: // ignore
}
});
window.onresize = function() {self.updateHeight();};
};
/**
* Starts dragging the pane sizer.
* @param {Object} ev The mousedown event that started us dragging.
*/
CodewalkViewer.prototype.startSizerDrag = function(ev) {
this.initialCodeWidth = this.codeColumn.width();
this.initialCommentsWidth = this.commentColumn.width();
this.initialMouseX = ev.pageX;
this.overlay.show();
};
/**
* Handles dragging the pane sizer.
* @param {Object} ev The mousemove event updating dragging position.
*/
CodewalkViewer.prototype.handleSizerDrag = function(ev) {
var delta = ev.pageX - this.initialMouseX;
if (this.codeColumn.is('.right')) delta = -delta;
var proposedCodeWidth = this.initialCodeWidth + delta;
var proposedCommentWidth = this.initialCommentsWidth - delta;
var mw = CodewalkViewer.MIN_PANE_WIDTH;
if (proposedCodeWidth < mw) delta = mw - this.initialCodeWidth;
if (proposedCommentWidth < mw) delta = this.initialCommentsWidth - mw;
proposedCodeWidth = this.initialCodeWidth + delta;
proposedCommentWidth = this.initialCommentsWidth - delta;
// If window is too small, don't even try to resize.
if (proposedCodeWidth < mw || proposedCommentWidth < mw) return;
this.codeColumn.width(proposedCodeWidth);
this.commentColumn.width(proposedCommentWidth);
this.options.codeWidth = parseInt(
this.codeColumn.width() /
(this.codeColumn.width() + this.commentColumn.width()) * 100);
this.context.find('#code-column-width').text(this.options.codeWidth + '%');
};
/**
* Ends dragging the pane sizer.
* @param {Object} ev The mouseup event that caused us to stop dragging.
*/
CodewalkViewer.prototype.endSizerDrag = function(ev) {
this.overlay.hide();
this.updateHeight();
};
/**
* Toggles the Codewalk description between being shown and hidden.
* @param {jQuery} target The target that was clicked to trigger this function.
*/
CodewalkViewer.prototype.toggleDescription = function(target) {
var description = this.context.find('#description');
description.toggle();
target.find('span').text(description.is(':hidden') ? 'show' : 'hide');
this.updateHeight();
};
/**
* Changes the side of the window on which the code is shown and saves the
* setting in a cookie.
* @param {string?} codeSide The side on which the code should be, either
* 'left' or 'right'.
*/
CodewalkViewer.prototype.changeCodeSide = function(codeSide) {
var commentSide = codeSide == 'left' ? 'right' : 'left';
this.context.find('#set-code-' + codeSide).addClass('selected');
this.context.find('#set-code-' + commentSide).removeClass('selected');
// Remove previous side class and add new one.
this.codeColumn.addClass(codeSide).removeClass(commentSide);
this.commentColumn.addClass(commentSide).removeClass(codeSide);
this.sizer.css(codeSide, 'auto').css(commentSide, 0);
this.options.codeSide = codeSide;
};
/**
* Adds selected class to newly selected comment, removes selected style from
* previously selected comment, changes drop down options so that the correct
* file is selected, and updates the code popout link.
* @param {jQuery} target The target that was clicked to trigger this function.
*/
CodewalkViewer.prototype.changeSelectedComment = function(target) {
var currentFile = target.find('.comment-link').attr('href');
if (!currentFile) return;
if (!(this.lastSelected && this.lastSelected.get(0) === target.get(0))) {
if (this.lastSelected) this.lastSelected.removeClass('selected');
target.addClass('selected');
this.lastSelected = target;
var targetTop = target.position().top;
var parentTop = target.parent().position().top;
if (targetTop + target.height() > parentTop + target.parent().height() ||
targetTop < parentTop) {
var delta = targetTop - parentTop;
target.parent().animate(
{'scrollTop': target.parent().scrollTop() + delta},
Math.max(delta / 2, 200), 'swing');
}
var fname = currentFile.match(/(?:select=|fileprint=)\/[^&]+/)[0];
fname = fname.slice(fname.indexOf('=')+2, fname.length);
this.context.find('#code-selector').val(fname);
this.context.find('#prev-comment').toggleClass(
'disabled', !target.prev().length);
this.context.find('#next-comment').toggleClass(
'disabled', !target.next().length);
}
// Force original file even if user hasn't changed comments since they may
// have navigated away from it within the iframe without us knowing.
this.navigateToCode(currentFile);
};
/**
* Updates the viewer by changing the height of the comments and code so that
* they fit within the height of the window. The function is typically called
* after the user changes the window size.
*/
CodewalkViewer.prototype.updateHeight = function() {
var windowHeight = jQuery(window).height() - 5 // GOK
var areaHeight = windowHeight - this.codeArea.offset().top
var footerHeight = this.context.find('#footer').outerHeight(true)
this.commentArea.height(areaHeight - footerHeight - this.context.find('#comment-options').outerHeight(true))
var codeHeight = areaHeight - footerHeight - 15 // GOK
this.codeArea.height(codeHeight)
this.codeDisplay.height(codeHeight - this.codeDisplay.offset().top + this.codeArea.offset().top);
this.sizer.height(codeHeight);
};
window.initFuncs.push(function() {
var viewer = new CodewalkViewer(jQuery('#codewalk-main'));
viewer.selectFirstComment();
viewer.targetCommentLinksAtBlank();
viewer.installEventHandlers();
viewer.updateHeight();
});

View file

@ -1,124 +0,0 @@
<codewalk title="How to Write a Codewalk">
<step title="Introduction" src="doc/codewalk/codewalk.xml">
A codewalk is a guided tour through a piece of code.
It consists of a sequence of steps, each typically explaining
a highlighted section of code.
<br/><br/>
The <a href="/cmd/godoc">godoc</a> web server translates
an XML file like the one in the main window pane into the HTML
page that you're viewing now.
<br/><br/>
The codewalk with URL path <code>/doc/codewalk/</code><i>name</i>
is loaded from the input file <code>$GOROOT/doc/codewalk/</code><i>name</i><code>.xml</code>.
<br/><br/>
This codewalk explains how to write a codewalk by examining
its own source code,
<code><a href="/doc/codewalk/codewalk.xml">$GOROOT/doc/codewalk/codewalk.xml</a></code>,
shown in the main window pane to the left.
</step>
<step title="Title" src="doc/codewalk/codewalk.xml:/title=/">
The codewalk input file is an XML file containing a single
<code>&lt;codewalk&gt;</code> element.
That element's <code>title</code> attribute gives the title
that is used both on the codewalk page and in the codewalk list.
</step>
<step title="Steps" src="doc/codewalk/codewalk.xml:/&lt;step/,/step&gt;/">
Each step in the codewalk is a <code>&lt;step&gt;</code> element
nested inside the main <code>&lt;codewalk&gt;</code>.
The step element's <code>title</code> attribute gives the step's title,
which is shown in a shaded bar above the main step text.
The element's <code>src</code> attribute specifies the source
code to show in the main window pane and, optionally, a range of
lines to highlight.
<br/><br/>
The first step in this codewalk does not highlight any lines:
its <code>src</code> is just a file name.
</step>
<step title="Specifying a source line" src='doc/codewalk/codewalk.xml:/title="Title"/'>
The most complex part of the codewalk specification is
saying what lines to highlight.
Instead of ordinary line numbers,
the codewalk uses an address syntax that makes it possible
to describe the match by its content.
As the file gets edited, this descriptive address has a better
chance to continue to refer to the right section of the file.
<br/><br/>
To specify a source line, use a <code>src</code> attribute of the form
<i>filename</i><code>:</code><i>address</i>,
where <i>address</i> is an address in the syntax used by the text editors <i>sam</i> and <i>acme</i>.
<br/><br/>
The simplest address is a single regular expression.
The highlighted line in the main window pane shows that the
address for the &ldquo;Title&rdquo; step was <code>/title=/</code>,
which matches the first instance of that <a href="/pkg/regexp">regular expression</a> (<code>title=</code>) in the file.
</step>
<step title="Specifying a source range" src='doc/codewalk/codewalk.xml:/title="Steps"/'>
To highlight a range of source lines, the simplest address to use is
a pair of regular expressions
<code>/</code><i>regexp1</i><code>/,/</code><i>regexp2</i><code>/</code>.
The highlight begins with the line containing the first match for <i>regexp1</i>
and ends with the line containing the first match for <i>regexp2</i>
after the end of the match for <i>regexp1</i>.
Ignoring the HTML quoting,
The line containing the first match for <i>regexp1</i> will be the first one highlighted,
and the line containing the first match for <i>regexp2</i>.
<br/><br/>
The address <code>/&lt;step/,/step&gt;/</code> looks for the first instance of
<code>&lt;step</code> in the file, and then starting after that point,
looks for the first instance of <code>step&gt;</code>.
(Click on the &ldquo;Steps&rdquo; step above to see the highlight in action.)
Note that the <code>&lt;</code> and <code>&gt;</code> had to be written
using XML escapes in order to be valid XML.
</step>
<step title="Advanced addressing" src="doc/codewalk/codewalk.xml:/Advanced/,/step&gt;/">
The <code>/</code><i>regexp</i><code>/</code>
and <code>/</code><i>regexp1</i><code>/,/</code><i>regexp2</i><code>/</code>
forms suffice for most highlighting.
<br/><br/>
The full address syntax is summarized in this table
(an excerpt of Table II from
<a href="https://9p.io/sys/doc/sam/sam.html">The text editor <code>sam</code></a>):
<br/><br/>
<table>
<tr><td colspan="2"><b>Simple addresses</b></td></tr>
<tr><td><code>#</code><i>n</i></td>
<td>The empty string after character <i>n</i></td></tr>
<tr><td><i>n</i></td>
<td>Line <i>n</i></td></tr>
<tr><td><code>/</code><i>regexp</i><code>/</code></td>
<td>The first following match of the regular expression</td></tr>
<!-- not supported (yet?)
<tr><td><code>/</code><i>regexp</i><code>/</code></td>
<td>The first previous match of the regular expression</td></tr>
-->
<tr><td><code>$</code></td>
<td>The null string at the end of the file</td></tr>
<tr><td colspan="2"><b>Compound addresses</b></td></tr>
<tr><td><i>a1</i><code>+</code><i>a2</i></td>
<td>The address <i>a2</i> evaluated starting at the right of <i>a1</i></td></tr>
<tr><td><i>a1</i><code>-</code><i>a2</i></td>
<td>The address <i>a2</i> evaluated in the reverse direction starting at the left of <i>a1</i></td></tr>
<tr><td><i>a1</i><code>,</code><i>a2</i></td>
<td>From the left of <i>a1</i> to the right of <i>a2</i> (default <code>0,$</code>).</td></tr>
</table>
</step>
</codewalk>

View file

@ -1,52 +0,0 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main_test
import (
"bytes"
"os"
"os/exec"
"strings"
"testing"
)
// TestMarkov tests the code dependency of markov.xml.
func TestMarkov(t *testing.T) {
cmd := exec.Command("go", "run", "markov.go")
cmd.Stdin = strings.NewReader("foo")
cmd.Stderr = bytes.NewBuffer(nil)
out, err := cmd.Output()
if err != nil {
t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, cmd.Stderr)
}
if !bytes.Equal(out, []byte("foo\n")) {
t.Fatalf(`%s with input "foo" did not output "foo":\n%s`, strings.Join(cmd.Args, " "), out)
}
}
// TestPig tests the code dependency of functions.xml.
func TestPig(t *testing.T) {
cmd := exec.Command("go", "run", "pig.go")
cmd.Stderr = bytes.NewBuffer(nil)
out, err := cmd.Output()
if err != nil {
t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, cmd.Stderr)
}
const want = "Wins, losses staying at k = 100: 210/990 (21.2%), 780/990 (78.8%)\n"
if !bytes.Contains(out, []byte(want)) {
t.Fatalf(`%s: unexpected output\ngot:\n%s\nwant output containing:\n%s`, strings.Join(cmd.Args, " "), out, want)
}
}
// TestURLPoll tests the code dependency of sharemem.xml.
func TestURLPoll(t *testing.T) {
cmd := exec.Command("go", "build", "-o", os.DevNull, "urlpoll.go")
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, out)
}
}

View file

@ -1,105 +0,0 @@
<codewalk title="First-Class Functions in Go">
<step title="Introduction" src="doc/codewalk/pig.go">
Go supports first class functions, higher-order functions, user-defined
function types, function literals, closures, and multiple return values.
<br/><br/>
This rich feature set supports a functional programming style in a strongly
typed language.
<br/><br/>
In this codewalk we will look at a simple program that simulates a dice game
called <a href="http://en.wikipedia.org/wiki/Pig_(dice)">Pig</a> and evaluates
basic strategies.
</step>
<step title="Game overview" src="doc/codewalk/pig.go:/\/\/ A score/,/thisTurn int\n}/">
Pig is a two-player game played with a 6-sided die. Each turn, you may roll or stay.
<ul>
<li> If you roll a 1, you lose all points for your turn and play passes to
your opponent. Any other roll adds its value to your turn score. </li>
<li> If you stay, your turn score is added to your total score, and play passes
to your opponent. </li>
</ul>
The first person to reach 100 total points wins.
<br/><br/>
The <code>score</code> type stores the scores of the current and opposing
players, in addition to the points accumulated during the current turn.
</step>
<step title="User-defined function types" src="doc/codewalk/pig.go:/\/\/ An action/,/bool\)/">
In Go, functions can be passed around just like any other value. A function's
type signature describes the types of its arguments and return values.
<br/><br/>
The <code>action</code> type is a function that takes a <code>score</code>
and returns the resulting <code>score</code> and whether the current turn is
over.
<br/><br/>
If the turn is over, the <code>player</code> and <code>opponent</code> fields
in the resulting <code>score</code> should be swapped, as it is now the other player's
turn.
</step>
<step title="Multiple return values" src="doc/codewalk/pig.go:/\/\/ roll returns/,/true\n}/">
Go functions can return multiple values.
<br/><br/>
The functions <code>roll</code> and <code>stay</code> each return a pair of
values. They also match the <code>action</code> type signature. These
<code>action</code> functions define the rules of Pig.
</step>
<step title="Higher-order functions" src="doc/codewalk/pig.go:/\/\/ A strategy/,/action\n/">
A function can use other functions as arguments and return values.
<br/><br/>
A <code>strategy</code> is a function that takes a <code>score</code> as input
and returns an <code>action</code> to perform. <br/>
(Remember, an <code>action</code> is itself a function.)
</step>
<step title="Function literals and closures" src="doc/codewalk/pig.go:/return func/,/return roll\n\t}/">
Anonymous functions can be declared in Go, as in this example. Function
literals are closures: they inherit the scope of the function in which they
are declared.
<br/><br/>
One basic strategy in Pig is to continue rolling until you have accumulated at
least k points in a turn, and then stay. The argument <code>k</code> is
enclosed by this function literal, which matches the <code>strategy</code> type
signature.
</step>
<step title="Simulating games" src="doc/codewalk/pig.go:/\/\/ play/,/currentPlayer\n}/">
We simulate a game of Pig by calling an <code>action</code> to update the
<code>score</code> until one player reaches 100 points. Each
<code>action</code> is selected by calling the <code>strategy</code> function
associated with the current player.
</step>
<step title="Simulating a tournament" src="doc/codewalk/pig.go:/\/\/ roundRobin/,/gamesPerStrategy\n}/">
The <code>roundRobin</code> function simulates a tournament and tallies wins.
Each strategy plays each other strategy <code>gamesPerSeries</code> times.
</step>
<step title="Variadic function declarations" src="doc/codewalk/pig.go:/\/\/ ratioS/,/string {/">
Variadic functions like <code>ratioString</code> take a variable number of
arguments. These arguments are available as a slice inside the function.
</step>
<step title="Simulation results" src="doc/codewalk/pig.go:/func main/,/\n}/">
The <code>main</code> function defines 100 basic strategies, simulates a round
robin tournament, and then prints the win/loss record of each strategy.
<br/><br/>
Among these strategies, staying at 25 is best, but the <a
href="http://www.google.com/search?q=optimal+play+pig">optimal strategy for
Pig</a> is much more complex.
</step>
</codewalk>

View file

@ -1,130 +0,0 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Generating random text: a Markov chain algorithm
Based on the program presented in the "Design and Implementation" chapter
of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
See also Computer Recreations, Scientific American 260, 122 - 125 (1989).
A Markov chain algorithm generates text by creating a statistical model of
potential textual suffixes for a given prefix. Consider this text:
I am not a number! I am a free man!
Our Markov chain algorithm would arrange this text into this set of prefixes
and suffixes, or "chain": (This table assumes a prefix length of two words.)
Prefix Suffix
"" "" I
"" I am
I am a
I am not
a free man!
am a free
am not a
a number! I
number! I am
not a number!
To generate text using this table we select an initial prefix ("I am", for
example), choose one of the suffixes associated with that prefix at random
with probability determined by the input statistics ("a"),
and then create a new prefix by removing the first word from the prefix
and appending the suffix (making the new prefix is "am a"). Repeat this process
until we can't find any suffixes for the current prefix or we exceed the word
limit. (The word limit is necessary as the chain table may contain cycles.)
Our version of this program reads text from standard input, parsing it into a
Markov chain, and writes generated text to standard output.
The prefix and output lengths can be specified using the -prefix and -words
flags on the command-line.
*/
package main
import (
"bufio"
"flag"
"fmt"
"io"
"math/rand"
"os"
"strings"
"time"
)
// Prefix is a Markov chain prefix of one or more words.
type Prefix []string
// String returns the Prefix as a string (for use as a map key).
func (p Prefix) String() string {
return strings.Join(p, " ")
}
// Shift removes the first word from the Prefix and appends the given word.
func (p Prefix) Shift(word string) {
copy(p, p[1:])
p[len(p)-1] = word
}
// Chain contains a map ("chain") of prefixes to a list of suffixes.
// A prefix is a string of prefixLen words joined with spaces.
// A suffix is a single word. A prefix can have multiple suffixes.
type Chain struct {
chain map[string][]string
prefixLen int
}
// NewChain returns a new Chain with prefixes of prefixLen words.
func NewChain(prefixLen int) *Chain {
return &Chain{make(map[string][]string), prefixLen}
}
// Build reads text from the provided Reader and
// parses it into prefixes and suffixes that are stored in Chain.
func (c *Chain) Build(r io.Reader) {
br := bufio.NewReader(r)
p := make(Prefix, c.prefixLen)
for {
var s string
if _, err := fmt.Fscan(br, &s); err != nil {
break
}
key := p.String()
c.chain[key] = append(c.chain[key], s)
p.Shift(s)
}
}
// Generate returns a string of at most n words generated from Chain.
func (c *Chain) Generate(n int) string {
p := make(Prefix, c.prefixLen)
var words []string
for i := 0; i < n; i++ {
choices := c.chain[p.String()]
if len(choices) == 0 {
break
}
next := choices[rand.Intn(len(choices))]
words = append(words, next)
p.Shift(next)
}
return strings.Join(words, " ")
}
func main() {
// Register command-line flags.
numWords := flag.Int("words", 100, "maximum number of words to print")
prefixLen := flag.Int("prefix", 2, "prefix length in words")
flag.Parse() // Parse command-line flags.
rand.Seed(time.Now().UnixNano()) // Seed the random number generator.
c := NewChain(*prefixLen) // Initialize a new Chain.
c.Build(os.Stdin) // Build chains from standard input.
text := c.Generate(*numWords) // Generate text.
fmt.Println(text) // Write text to standard output.
}

View file

@ -1,307 +0,0 @@
<!--
Copyright 2011 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<codewalk title="Generating arbitrary text: a Markov chain algorithm">
<step title="Introduction" src="doc/codewalk/markov.go:/Generating/,/line\./">
This codewalk describes a program that generates random text using
a Markov chain algorithm. The package comment describes the algorithm
and the operation of the program. Please read it before continuing.
</step>
<step title="Modeling Markov chains" src="doc/codewalk/markov.go:/ chain/">
A chain consists of a prefix and a suffix. Each prefix is a set
number of words, while a suffix is a single word.
A prefix can have an arbitrary number of suffixes.
To model this data, we use a <code>map[string][]string</code>.
Each map key is a prefix (a <code>string</code>) and its values are
lists of suffixes (a slice of strings, <code>[]string</code>).
<br/><br/>
Here is the example table from the package comment
as modeled by this data structure:
<pre>
map[string][]string{
" ": {"I"},
" I": {"am"},
"I am": {"a", "not"},
"a free": {"man!"},
"am a": {"free"},
"am not": {"a"},
"a number!": {"I"},
"number! I": {"am"},
"not a": {"number!"},
}</pre>
While each prefix consists of multiple words, we
store prefixes in the map as a single <code>string</code>.
It would seem more natural to store the prefix as a
<code>[]string</code>, but we can't do this with a map because the
key type of a map must implement equality (and slices do not).
<br/><br/>
Therefore, in most of our code we will model prefixes as a
<code>[]string</code> and join the strings together with a space
to generate the map key:
<pre>
Prefix Map key
[]string{"", ""} " "
[]string{"", "I"} " I"
[]string{"I", "am"} "I am"
</pre>
</step>
<step title="The Chain struct" src="doc/codewalk/markov.go:/type Chain/,/}/">
The complete state of the chain table consists of the table itself and
the word length of the prefixes. The <code>Chain</code> struct stores
this data.
</step>
<step title="The NewChain constructor function" src="doc/codewalk/markov.go:/func New/,/\n}/">
The <code>Chain</code> struct has two unexported fields (those that
do not begin with an upper case character), and so we write a
<code>NewChain</code> constructor function that initializes the
<code>chain</code> map with <code>make</code> and sets the
<code>prefixLen</code> field.
<br/><br/>
This is constructor function is not strictly necessary as this entire
program is within a single package (<code>main</code>) and therefore
there is little practical difference between exported and unexported
fields. We could just as easily write out the contents of this function
when we want to construct a new Chain.
But using these unexported fields is good practice; it clearly denotes
that only methods of Chain and its constructor function should access
those fields. Also, structuring <code>Chain</code> like this means we
could easily move it into its own package at some later date.
</step>
<step title="The Prefix type" src="doc/codewalk/markov.go:/type Prefix/">
Since we'll be working with prefixes often, we define a
<code>Prefix</code> type with the concrete type <code>[]string</code>.
Defining a named type clearly allows us to be explicit when we are
working with a prefix instead of just a <code>[]string</code>.
Also, in Go we can define methods on any named type (not just structs),
so we can add methods that operate on <code>Prefix</code> if we need to.
</step>
<step title="The String method" src="doc/codewalk/markov.go:/func[^\n]+String/,/}/">
The first method we define on <code>Prefix</code> is
<code>String</code>. It returns a <code>string</code> representation
of a <code>Prefix</code> by joining the slice elements together with
spaces. We will use this method to generate keys when working with
the chain map.
</step>
<step title="Building the chain" src="doc/codewalk/markov.go:/func[^\n]+Build/,/\n}/">
The <code>Build</code> method reads text from an <code>io.Reader</code>
and parses it into prefixes and suffixes that are stored in the
<code>Chain</code>.
<br/><br/>
The <code><a href="/pkg/io/#Reader">io.Reader</a></code> is an
interface type that is widely used by the standard library and
other Go code. Our code uses the
<code><a href="/pkg/fmt/#Fscan">fmt.Fscan</a></code> function, which
reads space-separated values from an <code>io.Reader</code>.
<br/><br/>
The <code>Build</code> method returns once the <code>Reader</code>'s
<code>Read</code> method returns <code>io.EOF</code> (end of file)
or some other read error occurs.
</step>
<step title="Buffering the input" src="doc/codewalk/markov.go:/bufio\.NewReader/">
This function does many small reads, which can be inefficient for some
<code>Readers</code>. For efficiency we wrap the provided
<code>io.Reader</code> with
<code><a href="/pkg/bufio/">bufio.NewReader</a></code> to create a
new <code>io.Reader</code> that provides buffering.
</step>
<step title="The Prefix variable" src="doc/codewalk/markov.go:/make\(Prefix/">
At the top of the function we make a <code>Prefix</code> slice
<code>p</code> using the <code>Chain</code>'s <code>prefixLen</code>
field as its length.
We'll use this variable to hold the current prefix and mutate it with
each new word we encounter.
</step>
<step title="Scanning words" src="doc/codewalk/markov.go:/var s string/,/\n }/">
In our loop we read words from the <code>Reader</code> into a
<code>string</code> variable <code>s</code> using
<code>fmt.Fscan</code>. Since <code>Fscan</code> uses space to
separate each input value, each call will yield just one word
(including punctuation), which is exactly what we need.
<br/><br/>
<code>Fscan</code> returns an error if it encounters a read error
(<code>io.EOF</code>, for example) or if it can't scan the requested
value (in our case, a single string). In either case we just want to
stop scanning, so we <code>break</code> out of the loop.
</step>
<step title="Adding a prefix and suffix to the chain" src="doc/codewalk/markov.go:/ key/,/key\], s\)">
The word stored in <code>s</code> is a new suffix. We add the new
prefix/suffix combination to the <code>chain</code> map by computing
the map key with <code>p.String</code> and appending the suffix
to the slice stored under that key.
<br/><br/>
The built-in <code>append</code> function appends elements to a slice
and allocates new storage when necessary. When the provided slice is
<code>nil</code>, <code>append</code> allocates a new slice.
This behavior conveniently ties in with the semantics of our map:
retrieving an unset key returns the zero value of the value type and
the zero value of <code>[]string</code> is <code>nil</code>.
When our program encounters a new prefix (yielding a <code>nil</code>
value in the map) <code>append</code> will allocate a new slice.
<br/><br/>
For more information about the <code>append</code> function and slices
in general see the
<a href="/doc/articles/slices_usage_and_internals.html">Slices: usage and internals</a> article.
</step>
<step title="Pushing the suffix onto the prefix" src="doc/codewalk/markov.go:/p\.Shift/">
Before reading the next word our algorithm requires us to drop the
first word from the prefix and push the current suffix onto the prefix.
<br/><br/>
When in this state
<pre>
p == Prefix{"I", "am"}
s == "not" </pre>
the new value for <code>p</code> would be
<pre>
p == Prefix{"am", "not"}</pre>
This operation is also required during text generation so we put
the code to perform this mutation of the slice inside a method on
<code>Prefix</code> named <code>Shift</code>.
</step>
<step title="The Shift method" src="doc/codewalk/markov.go:/func[^\n]+Shift/,/\n}/">
The <code>Shift</code> method uses the built-in <code>copy</code>
function to copy the last len(p)-1 elements of <code>p</code> to
the start of the slice, effectively moving the elements
one index to the left (if you consider zero as the leftmost index).
<pre>
p := Prefix{"I", "am"}
copy(p, p[1:])
// p == Prefix{"am", "am"}</pre>
We then assign the provided <code>word</code> to the last index
of the slice:
<pre>
// suffix == "not"
p[len(p)-1] = suffix
// p == Prefix{"am", "not"}</pre>
</step>
<step title="Generating text" src="doc/codewalk/markov.go:/func[^\n]+Generate/,/\n}/">
The <code>Generate</code> method is similar to <code>Build</code>
except that instead of reading words from a <code>Reader</code>
and storing them in a map, it reads words from the map and
appends them to a slice (<code>words</code>).
<br/><br/>
<code>Generate</code> uses a conditional for loop to generate
up to <code>n</code> words.
</step>
<step title="Getting potential suffixes" src="doc/codewalk/markov.go:/choices/,/}\n/">
At each iteration of the loop we retrieve a list of potential suffixes
for the current prefix. We access the <code>chain</code> map at key
<code>p.String()</code> and assign its contents to <code>choices</code>.
<br/><br/>
If <code>len(choices)</code> is zero we break out of the loop as there
are no potential suffixes for that prefix.
This test also works if the key isn't present in the map at all:
in that case, <code>choices</code> will be <code>nil</code> and the
length of a <code>nil</code> slice is zero.
</step>
<step title="Choosing a suffix at random" src="doc/codewalk/markov.go:/next := choices/,/Shift/">
To choose a suffix we use the
<code><a href="/pkg/math/rand/#Intn">rand.Intn</a></code> function.
It returns a random integer up to (but not including) the provided
value. Passing in <code>len(choices)</code> gives us a random index
into the full length of the list.
<br/><br/>
We use that index to pick our new suffix, assign it to
<code>next</code> and append it to the <code>words</code> slice.
<br/><br/>
Next, we <code>Shift</code> the new suffix onto the prefix just as
we did in the <code>Build</code> method.
</step>
<step title="Returning the generated text" src="doc/codewalk/markov.go:/Join\(words/">
Before returning the generated text as a string, we use the
<code>strings.Join</code> function to join the elements of
the <code>words</code> slice together, separated by spaces.
</step>
<step title="Command-line flags" src="doc/codewalk/markov.go:/Register command-line flags/,/prefixLen/">
To make it easy to tweak the prefix and generated text lengths we
use the <code><a href="/pkg/flag/">flag</a></code> package to parse
command-line flags.
<br/><br/>
These calls to <code>flag.Int</code> register new flags with the
<code>flag</code> package. The arguments to <code>Int</code> are the
flag name, its default value, and a description. The <code>Int</code>
function returns a pointer to an integer that will contain the
user-supplied value (or the default value if the flag was omitted on
the command-line).
</step>
<step title="Program set up" src="doc/codewalk/markov.go:/flag.Parse/,/rand.Seed/">
The <code>main</code> function begins by parsing the command-line
flags with <code>flag.Parse</code> and seeding the <code>rand</code>
package's random number generator with the current time.
<br/><br/>
If the command-line flags provided by the user are invalid the
<code>flag.Parse</code> function will print an informative usage
message and terminate the program.
</step>
<step title="Creating and building a new Chain" src="doc/codewalk/markov.go:/c := NewChain/,/c\.Build/">
To create the new <code>Chain</code> we call <code>NewChain</code>
with the value of the <code>prefix</code> flag.
<br/><br/>
To build the chain we call <code>Build</code> with
<code>os.Stdin</code> (which implements <code>io.Reader</code>) so
that it will read its input from standard input.
</step>
<step title="Generating and printing text" src="doc/codewalk/markov.go:/c\.Generate/,/fmt.Println/">
Finally, to generate text we call <code>Generate</code> with
the value of the <code>words</code> flag and assigning the result
to the variable <code>text</code>.
<br/><br/>
Then we call <code>fmt.Println</code> to write the text to standard
output, followed by a carriage return.
</step>
<step title="Using this program" src="doc/codewalk/markov.go">
To use this program, first build it with the
<a href="/cmd/go/">go</a> command:
<pre>
$ go build markov.go</pre>
And then execute it while piping in some input text:
<pre>
$ echo "a man a plan a canal panama" \
| ./markov -prefix=1
a plan a man a plan a canal panama</pre>
Here's a transcript of generating some text using the Go distribution's
README file as source material:
<pre>
$ ./markov -words=10 &lt; $GOROOT/README
This is the source code repository for the Go source
$ ./markov -prefix=1 -words=10 &lt; $GOROOT/README
This is the go directory (the one containing this README).
$ ./markov -prefix=1 -words=10 &lt; $GOROOT/README
This is the variable if you have just untarred a</pre>
</step>
<step title="An exercise for the reader" src="doc/codewalk/markov.go">
The <code>Generate</code> function does a lot of allocations when it
builds the <code>words</code> slice. As an exercise, modify it to
take an <code>io.Writer</code> to which it incrementally writes the
generated text with <code>Fprint</code>.
Aside from being more efficient this makes <code>Generate</code>
more symmetrical to <code>Build</code>.
</step>
</codewalk>

View file

@ -1,121 +0,0 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"math/rand"
)
const (
win = 100 // The winning score in a game of Pig
gamesPerSeries = 10 // The number of games per series to simulate
)
// A score includes scores accumulated in previous turns for each player,
// as well as the points scored by the current player in this turn.
type score struct {
player, opponent, thisTurn int
}
// An action transitions stochastically to a resulting score.
type action func(current score) (result score, turnIsOver bool)
// roll returns the (result, turnIsOver) outcome of simulating a die roll.
// If the roll value is 1, then thisTurn score is abandoned, and the players'
// roles swap. Otherwise, the roll value is added to thisTurn.
func roll(s score) (score, bool) {
outcome := rand.Intn(6) + 1 // A random int in [1, 6]
if outcome == 1 {
return score{s.opponent, s.player, 0}, true
}
return score{s.player, s.opponent, outcome + s.thisTurn}, false
}
// stay returns the (result, turnIsOver) outcome of staying.
// thisTurn score is added to the player's score, and the players' roles swap.
func stay(s score) (score, bool) {
return score{s.opponent, s.player + s.thisTurn, 0}, true
}
// A strategy chooses an action for any given score.
type strategy func(score) action
// stayAtK returns a strategy that rolls until thisTurn is at least k, then stays.
func stayAtK(k int) strategy {
return func(s score) action {
if s.thisTurn >= k {
return stay
}
return roll
}
}
// play simulates a Pig game and returns the winner (0 or 1).
func play(strategy0, strategy1 strategy) int {
strategies := []strategy{strategy0, strategy1}
var s score
var turnIsOver bool
currentPlayer := rand.Intn(2) // Randomly decide who plays first
for s.player+s.thisTurn < win {
action := strategies[currentPlayer](s)
s, turnIsOver = action(s)
if turnIsOver {
currentPlayer = (currentPlayer + 1) % 2
}
}
return currentPlayer
}
// roundRobin simulates a series of games between every pair of strategies.
func roundRobin(strategies []strategy) ([]int, int) {
wins := make([]int, len(strategies))
for i := 0; i < len(strategies); i++ {
for j := i + 1; j < len(strategies); j++ {
for k := 0; k < gamesPerSeries; k++ {
winner := play(strategies[i], strategies[j])
if winner == 0 {
wins[i]++
} else {
wins[j]++
}
}
}
}
gamesPerStrategy := gamesPerSeries * (len(strategies) - 1) // no self play
return wins, gamesPerStrategy
}
// ratioString takes a list of integer values and returns a string that lists
// each value and its percentage of the sum of all values.
// e.g., ratios(1, 2, 3) = "1/6 (16.7%), 2/6 (33.3%), 3/6 (50.0%)"
func ratioString(vals ...int) string {
total := 0
for _, val := range vals {
total += val
}
s := ""
for _, val := range vals {
if s != "" {
s += ", "
}
pct := 100 * float64(val) / float64(total)
s += fmt.Sprintf("%d/%d (%0.1f%%)", val, total, pct)
}
return s
}
func main() {
strategies := make([]strategy, win)
for k := range strategies {
strategies[k] = stayAtK(k + 1)
}
wins, games := roundRobin(strategies)
for k := range strategies {
fmt.Printf("Wins, losses staying at k =% 4d: %s\n",
k+1, ratioString(wins[k], games-wins[k]))
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

View file

@ -1,181 +0,0 @@
<codewalk title="Share Memory By Communicating">
<step title="Introduction" src="doc/codewalk/urlpoll.go">
Go's approach to concurrency differs from the traditional use of
threads and shared memory. Philosophically, it can be summarized:
<br/><br/>
<i>Don't communicate by sharing memory; share memory by communicating.</i>
<br/><br/>
Channels allow you to pass references to data structures between goroutines.
If you consider this as passing around ownership of the data (the ability to
read and write it), they become a powerful and expressive synchronization
mechanism.
<br/><br/>
In this codewalk we will look at a simple program that polls a list of
URLs, checking their HTTP response codes and periodically printing their state.
</step>
<step title="State type" src="doc/codewalk/urlpoll.go:/State/,/}/">
The State type represents the state of a URL.
<br/><br/>
The Pollers send State values to the StateMonitor,
which maintains a map of the current state of each URL.
</step>
<step title="Resource type" src="doc/codewalk/urlpoll.go:/Resource/,/}/">
A Resource represents the state of a URL to be polled: the URL itself
and the number of errors encountered since the last successful poll.
<br/><br/>
When the program starts, it allocates one Resource for each URL.
The main goroutine and the Poller goroutines send the Resources to
each other on channels.
</step>
<step title="Poller function" src="doc/codewalk/urlpoll.go:/func Poller/,/\n}/">
Each Poller receives Resource pointers from an input channel.
In this program, the convention is that sending a Resource pointer on
a channel passes ownership of the underlying data from the sender
to the receiver. Because of this convention, we know that
no two goroutines will access this Resource at the same time.
This means we don't have to worry about locking to prevent concurrent
access to these data structures.
<br/><br/>
The Poller processes the Resource by calling its Poll method.
<br/><br/>
It sends a State value to the status channel, to inform the StateMonitor
of the result of the Poll.
<br/><br/>
Finally, it sends the Resource pointer to the out channel. This can be
interpreted as the Poller saying &quot;I'm done with this Resource&quot; and
returning ownership of it to the main goroutine.
<br/><br/>
Several goroutines run Pollers, processing Resources in parallel.
</step>
<step title="The Poll method" src="doc/codewalk/urlpoll.go:/Poll executes/,/\n}/">
The Poll method (of the Resource type) performs an HTTP HEAD request
for the Resource's URL and returns the HTTP response's status code.
If an error occurs, Poll logs the message to standard error and returns the
error string instead.
</step>
<step title="main function" src="doc/codewalk/urlpoll.go:/func main/,/\n}/">
The main function starts the Poller and StateMonitor goroutines
and then loops passing completed Resources back to the pending
channel after appropriate delays.
</step>
<step title="Creating channels" src="doc/codewalk/urlpoll.go:/Create our/,/complete/">
First, main makes two channels of *Resource, pending and complete.
<br/><br/>
Inside main, a new goroutine sends one Resource per URL to pending
and the main goroutine receives completed Resources from complete.
<br/><br/>
The pending and complete channels are passed to each of the Poller
goroutines, within which they are known as in and out.
</step>
<step title="Initializing StateMonitor" src="doc/codewalk/urlpoll.go:/Launch the StateMonitor/,/statusInterval/">
StateMonitor will initialize and launch a goroutine that stores the state
of each Resource. We will look at this function in detail later.
<br/><br/>
For now, the important thing to note is that it returns a channel of State,
which is saved as status and passed to the Poller goroutines.
</step>
<step title="Launching Poller goroutines" src="doc/codewalk/urlpoll.go:/Launch some Poller/,/}/">
Now that it has the necessary channels, main launches a number of
Poller goroutines, passing the channels as arguments.
The channels provide the means of communication between the main, Poller, and
StateMonitor goroutines.
</step>
<step title="Send Resources to pending" src="doc/codewalk/urlpoll.go:/Send some Resources/,/}\(\)/">
To add the initial work to the system, main starts a new goroutine
that allocates and sends one Resource per URL to pending.
<br/><br/>
The new goroutine is necessary because unbuffered channel sends and
receives are synchronous. That means these channel sends will block until
the Pollers are ready to read from pending.
<br/><br/>
Were these sends performed in the main goroutine with fewer Pollers than
channel sends, the program would reach a deadlock situation, because
main would not yet be receiving from complete.
<br/><br/>
Exercise for the reader: modify this part of the program to read a list of
URLs from a file. (You may want to move this goroutine into its own
named function.)
</step>
<step title="Main Event Loop" src="doc/codewalk/urlpoll.go:/range complete/,/\n }/">
When a Poller is done with a Resource, it sends it on the complete channel.
This loop receives those Resource pointers from complete.
For each received Resource, it starts a new goroutine calling
the Resource's Sleep method. Using a new goroutine for each
ensures that the sleeps can happen in parallel.
<br/><br/>
Note that any single Resource pointer may only be sent on either pending or
complete at any one time. This ensures that a Resource is either being
handled by a Poller goroutine or sleeping, but never both simultaneously.
In this way, we share our Resource data by communicating.
</step>
<step title="The Sleep method" src="doc/codewalk/urlpoll.go:/Sleep/,/\n}/">
Sleep calls time.Sleep to pause before sending the Resource to done.
The pause will either be of a fixed length (pollInterval) plus an
additional delay proportional to the number of sequential errors (r.errCount).
<br/><br/>
This is an example of a typical Go idiom: a function intended to run inside
a goroutine takes a channel, upon which it sends its return value
(or other indication of completed state).
</step>
<step title="StateMonitor" src="doc/codewalk/urlpoll.go:/StateMonitor/,/\n}/">
The StateMonitor receives State values on a channel and periodically
outputs the state of all Resources being polled by the program.
</step>
<step title="The updates channel" src="doc/codewalk/urlpoll.go:/updates :=/">
The variable updates is a channel of State, on which the Poller goroutines
send State values.
<br/><br/>
This channel is returned by the function.
</step>
<step title="The urlStatus map" src="doc/codewalk/urlpoll.go:/urlStatus/">
The variable urlStatus is a map of URLs to their most recent status.
</step>
<step title="The Ticker object" src="doc/codewalk/urlpoll.go:/ticker/">
A time.Ticker is an object that repeatedly sends a value on a channel at a
specified interval.
<br/><br/>
In this case, ticker triggers the printing of the current state to
standard output every updateInterval nanoseconds.
</step>
<step title="The StateMonitor goroutine" src="doc/codewalk/urlpoll.go:/go func/,/}\(\)/">
StateMonitor will loop forever, selecting on two channels:
ticker.C and update. The select statement blocks until one of its
communications is ready to proceed.
<br/><br/>
When StateMonitor receives a tick from ticker.C, it calls logState to
print the current state. When it receives a State update from updates,
it records the new status in the urlStatus map.
<br/><br/>
Notice that this goroutine owns the urlStatus data structure,
ensuring that it can only be accessed sequentially.
This prevents memory corruption issues that might arise from parallel reads
and/or writes to a shared map.
</step>
<step title="Conclusion" src="doc/codewalk/urlpoll.go">
In this codewalk we have explored a simple example of using Go's concurrency
primitives to share memory through communication.
<br/><br/>
This should provide a starting point from which to explore the ways in which
goroutines and channels can be used to write expressive and concise concurrent
programs.
</step>
</codewalk>

View file

@ -1,116 +0,0 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"log"
"net/http"
"time"
)
const (
numPollers = 2 // number of Poller goroutines to launch
pollInterval = 60 * time.Second // how often to poll each URL
statusInterval = 10 * time.Second // how often to log status to stdout
errTimeout = 10 * time.Second // back-off timeout on error
)
var urls = []string{
"http://www.google.com/",
"http://golang.org/",
"http://blog.golang.org/",
}
// State represents the last-known state of a URL.
type State struct {
url string
status string
}
// StateMonitor maintains a map that stores the state of the URLs being
// polled, and prints the current state every updateInterval nanoseconds.
// It returns a chan State to which resource state should be sent.
func StateMonitor(updateInterval time.Duration) chan<- State {
updates := make(chan State)
urlStatus := make(map[string]string)
ticker := time.NewTicker(updateInterval)
go func() {
for {
select {
case <-ticker.C:
logState(urlStatus)
case s := <-updates:
urlStatus[s.url] = s.status
}
}
}()
return updates
}
// logState prints a state map.
func logState(s map[string]string) {
log.Println("Current state:")
for k, v := range s {
log.Printf(" %s %s", k, v)
}
}
// Resource represents an HTTP URL to be polled by this program.
type Resource struct {
url string
errCount int
}
// Poll executes an HTTP HEAD request for url
// and returns the HTTP status string or an error string.
func (r *Resource) Poll() string {
resp, err := http.Head(r.url)
if err != nil {
log.Println("Error", r.url, err)
r.errCount++
return err.Error()
}
r.errCount = 0
return resp.Status
}
// Sleep sleeps for an appropriate interval (dependent on error state)
// before sending the Resource to done.
func (r *Resource) Sleep(done chan<- *Resource) {
time.Sleep(pollInterval + errTimeout*time.Duration(r.errCount))
done <- r
}
func Poller(in <-chan *Resource, out chan<- *Resource, status chan<- State) {
for r := range in {
s := r.Poll()
status <- State{r.url, s}
out <- r
}
}
func main() {
// Create our input and output channels.
pending, complete := make(chan *Resource), make(chan *Resource)
// Launch the StateMonitor.
status := StateMonitor(statusInterval)
// Launch some Poller goroutines.
for i := 0; i < numPollers; i++ {
go Poller(pending, complete, status)
}
// Send some Resources to the pending queue.
go func() {
for _, url := range urls {
pending <- &Resource{url: url}
}
}()
for r := range complete {
go r.Sleep(pending)
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,554 +0,0 @@
<!--{
"Title": "Debugging Go Code with GDB",
"Path": "/doc/gdb"
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<i>
<p>
The following instructions apply to the standard toolchain
(the <code>gc</code> Go compiler and tools).
Gccgo has native gdb support.
</p>
<p>
Note that
<a href="https://github.com/go-delve/delve">Delve</a> is a better
alternative to GDB when debugging Go programs built with the standard
toolchain. It understands the Go runtime, data structures, and
expressions better than GDB. Delve currently supports Linux, OSX,
and Windows on <code>amd64</code>.
For the most up-to-date list of supported platforms, please see
<a href="https://github.com/go-delve/delve/tree/master/Documentation/installation">
the Delve documentation</a>.
</p>
</i>
<p>
GDB does not understand Go programs well.
The stack management, threading, and runtime contain aspects that differ
enough from the execution model GDB expects that they can confuse
the debugger and cause incorrect results even when the program is
compiled with gccgo.
As a consequence, although GDB can be useful in some situations (e.g.,
debugging Cgo code, or debugging the runtime itself), it is not
a reliable debugger for Go programs, particularly heavily concurrent
ones. Moreover, it is not a priority for the Go project to address
these issues, which are difficult.
</p>
<p>
In short, the instructions below should be taken only as a guide to how
to use GDB when it works, not as a guarantee of success.
Besides this overview you might want to consult the
<a href="https://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>.
</p>
<p>
</p>
<h2 id="Introduction">Introduction</h2>
<p>
When you compile and link your Go programs with the <code>gc</code> toolchain
on Linux, macOS, FreeBSD or NetBSD, the resulting binaries contain DWARFv4
debugging information that recent versions (&ge;7.5) of the GDB debugger can
use to inspect a live process or a core dump.
</p>
<p>
Pass the <code>'-w'</code> flag to the linker to omit the debug information
(for example, <code>go</code> <code>build</code> <code>-ldflags=-w</code> <code>prog.go</code>).
</p>
<p>
The code generated by the <code>gc</code> compiler includes inlining of
function invocations and registerization of variables. These optimizations
can sometimes make debugging with <code>gdb</code> harder.
If you find that you need to disable these optimizations,
build your program using <code>go</code> <code>build</code> <code>-gcflags=all="-N -l"</code>.
</p>
<p>
If you want to use gdb to inspect a core dump, you can trigger a dump
on a program crash, on systems that permit it, by setting
<code>GOTRACEBACK=crash</code> in the environment (see the
<a href="/pkg/runtime/#hdr-Environment_Variables"> runtime package
documentation</a> for more info).
</p>
<h3 id="Common_Operations">Common Operations</h3>
<ul>
<li>
Show file and line number for code, set breakpoints and disassemble:
<pre>(gdb) <b>list</b>
(gdb) <b>list <i>line</i></b>
(gdb) <b>list <i>file.go</i>:<i>line</i></b>
(gdb) <b>break <i>line</i></b>
(gdb) <b>break <i>file.go</i>:<i>line</i></b>
(gdb) <b>disas</b></pre>
</li>
<li>
Show backtraces and unwind stack frames:
<pre>(gdb) <b>bt</b>
(gdb) <b>frame <i>n</i></b></pre>
</li>
<li>
Show the name, type and location on the stack frame of local variables,
arguments and return values:
<pre>(gdb) <b>info locals</b>
(gdb) <b>info args</b>
(gdb) <b>p variable</b>
(gdb) <b>whatis variable</b></pre>
</li>
<li>
Show the name, type and location of global variables:
<pre>(gdb) <b>info variables <i>regexp</i></b></pre>
</li>
</ul>
<h3 id="Go_Extensions">Go Extensions</h3>
<p>
A recent extension mechanism to GDB allows it to load extension scripts for a
given binary. The toolchain uses this to extend GDB with a handful of
commands to inspect internals of the runtime code (such as goroutines) and to
pretty print the built-in map, slice and channel types.
</p>
<ul>
<li>
Pretty printing a string, slice, map, channel or interface:
<pre>(gdb) <b>p <i>var</i></b></pre>
</li>
<li>
A $len() and $cap() function for strings, slices and maps:
<pre>(gdb) <b>p $len(<i>var</i>)</b></pre>
</li>
<li>
A function to cast interfaces to their dynamic types:
<pre>(gdb) <b>p $dtype(<i>var</i>)</b>
(gdb) <b>iface <i>var</i></b></pre>
<p class="detail"><b>Known issue:</b> GDB cant automatically find the dynamic
type of an interface value if its long name differs from its short name
(annoying when printing stacktraces, the pretty printer falls back to printing
the short type name and a pointer).</p>
</li>
<li>
Inspecting goroutines:
<pre>(gdb) <b>info goroutines</b>
(gdb) <b>goroutine <i>n</i> <i>cmd</i></b>
(gdb) <b>help goroutine</b></pre>
For example:
<pre>(gdb) <b>goroutine 12 bt</b></pre>
You can inspect all goroutines by passing <code>all</code> instead of a specific goroutine's ID.
For example:
<pre>(gdb) <b>goroutine all bt</b></pre>
</li>
</ul>
<p>
If you'd like to see how this works, or want to extend it, take a look at <a
href="/src/runtime/runtime-gdb.py">src/runtime/runtime-gdb.py</a> in
the Go source distribution. It depends on some special magic types
(<code>hash&lt;T,U&gt;</code>) and variables (<code>runtime.m</code> and
<code>runtime.g</code>) that the linker
(<a href="/src/cmd/link/internal/ld/dwarf.go">src/cmd/link/internal/ld/dwarf.go</a>) ensures are described in
the DWARF code.
</p>
<p>
If you're interested in what the debugging information looks like, run
<code>objdump</code> <code>-W</code> <code>a.out</code> and browse through the <code>.debug_*</code>
sections.
</p>
<h3 id="Known_Issues">Known Issues</h3>
<ol>
<li>String pretty printing only triggers for type string, not for types derived
from it.</li>
<li>Type information is missing for the C parts of the runtime library.</li>
<li>GDB does not understand Gos name qualifications and treats
<code>"fmt.Print"</code> as an unstructured literal with a <code>"."</code>
that needs to be quoted. It objects even more strongly to method names of
the form <code>pkg.(*MyType).Meth</code>.
<li>As of Go 1.11, debug information is compressed by default.
Older versions of gdb, such as the one available by default on MacOS,
do not understand the compression.
You can generate uncompressed debug information by using <code>go
build -ldflags=-compressdwarf=false</code>.
(For convenience you can put the <code>-ldflags</code> option in
the <a href="/cmd/go/#hdr-Environment_variables"><code>GOFLAGS</code>
environment variable</a> so that you don't have to specify it each time.)
</li>
</ol>
<h2 id="Tutorial">Tutorial</h2>
<p>
In this tutorial we will inspect the binary of the
<a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary,
change to <code>$GOROOT/src/regexp</code> and run <code>go</code> <code>test</code> <code>-c</code>.
This should produce an executable file named <code>regexp.test</code>.
</p>
<h3 id="Getting_Started">Getting Started</h3>
<p>
Launch GDB, debugging <code>regexp.test</code>:
</p>
<pre>
$ <b>gdb regexp.test</b>
GNU gdb (GDB) 7.2-gg8
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv 3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
Type "show copying" and "show warranty" for licensing/warranty details.
This GDB was configured as "x86_64-linux".
Reading symbols from /home/user/go/src/regexp/regexp.test...
done.
Loading Go Runtime support.
(gdb)
</pre>
<p>
The message "Loading Go Runtime support" means that GDB loaded the
extension from <code>$GOROOT/src/runtime/runtime-gdb.py</code>.
</p>
<p>
To help GDB find the Go runtime sources and the accompanying support script,
pass your <code>$GOROOT</code> with the <code>'-d'</code> flag:
</p>
<pre>
$ <b>gdb regexp.test -d $GOROOT</b>
</pre>
<p>
If for some reason GDB still can't find that directory or that script, you can load
it by hand by telling gdb (assuming you have the go sources in
<code>~/go/</code>):
</p>
<pre>
(gdb) <b>source ~/go/src/runtime/runtime-gdb.py</b>
Loading Go Runtime support.
</pre>
<h3 id="Inspecting_the_source">Inspecting the source</h3>
<p>
Use the <code>"l"</code> or <code>"list"</code> command to inspect source code.
</p>
<pre>
(gdb) <b>l</b>
</pre>
<p>
List a specific part of the source parameterizing <code>"list"</code> with a
function name (it must be qualified with its package name).
</p>
<pre>
(gdb) <b>l main.main</b>
</pre>
<p>
List a specific file and line number:
</p>
<pre>
(gdb) <b>l regexp.go:1</b>
(gdb) <i># Hit enter to repeat last command. Here, this lists next 10 lines.</i>
</pre>
<h3 id="Naming">Naming</h3>
<p>
Variable and function names must be qualified with the name of the packages
they belong to. The <code>Compile</code> function from the <code>regexp</code>
package is known to GDB as <code>'regexp.Compile'</code>.
</p>
<p>
Methods must be qualified with the name of their receiver types. For example,
the <code>*Regexp</code> types <code>String</code> method is known as
<code>'regexp.(*Regexp).String'</code>.
</p>
<p>
Variables that shadow other variables are magically suffixed with a number in the debug info.
Variables referenced by closures will appear as pointers magically prefixed with '&amp;'.
</p>
<h3 id="Setting_breakpoints">Setting breakpoints</h3>
<p>
Set a breakpoint at the <code>TestFind</code> function:
</p>
<pre>
(gdb) <b>b 'regexp.TestFind'</b>
Breakpoint 1 at 0x424908: file /home/user/go/src/regexp/find_test.go, line 148.
</pre>
<p>
Run the program:
</p>
<pre>
(gdb) <b>run</b>
Starting program: /home/user/go/src/regexp/regexp.test
Breakpoint 1, regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
148 func TestFind(t *testing.T) {
</pre>
<p>
Execution has paused at the breakpoint.
See which goroutines are running, and what they're doing:
</p>
<pre>
(gdb) <b>info goroutines</b>
1 waiting runtime.gosched
* 13 running runtime.goexit
</pre>
<p>
the one marked with the <code>*</code> is the current goroutine.
</p>
<h3 id="Inspecting_the_stack">Inspecting the stack</h3>
<p>
Look at the stack trace for where weve paused the program:
</p>
<pre>
(gdb) <b>bt</b> <i># backtrace</i>
#0 regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
#1 0x000000000042f60b in testing.tRunner (t=0xf8404a89c0, test=0x573720) at /home/user/go/src/testing/testing.go:156
#2 0x000000000040df64 in runtime.initdone () at /home/user/go/src/runtime/proc.c:242
#3 0x000000f8404a89c0 in ?? ()
#4 0x0000000000573720 in ?? ()
#5 0x0000000000000000 in ?? ()
</pre>
<p>
The other goroutine, number 1, is stuck in <code>runtime.gosched</code>, blocked on a channel receive:
</p>
<pre>
(gdb) <b>goroutine 1 bt</b>
#0 0x000000000040facb in runtime.gosched () at /home/user/go/src/runtime/proc.c:873
#1 0x00000000004031c9 in runtime.chanrecv (c=void, ep=void, selected=void, received=void)
at /home/user/go/src/runtime/chan.c:342
#2 0x0000000000403299 in runtime.chanrecv1 (t=void, c=void) at/home/user/go/src/runtime/chan.c:423
#3 0x000000000043075b in testing.RunTests (matchString={void (struct string, struct string, bool *, error *)}
0x7ffff7f9ef60, tests= []testing.InternalTest = {...}) at /home/user/go/src/testing/testing.go:201
#4 0x00000000004302b1 in testing.Main (matchString={void (struct string, struct string, bool *, error *)}
0x7ffff7f9ef80, tests= []testing.InternalTest = {...}, benchmarks= []testing.InternalBenchmark = {...})
at /home/user/go/src/testing/testing.go:168
#5 0x0000000000400dc1 in main.main () at /home/user/go/src/regexp/_testmain.go:98
#6 0x00000000004022e7 in runtime.mainstart () at /home/user/go/src/runtime/amd64/asm.s:78
#7 0x000000000040ea6f in runtime.initdone () at /home/user/go/src/runtime/proc.c:243
#8 0x0000000000000000 in ?? ()
</pre>
<p>
The stack frame shows were currently executing the <code>regexp.TestFind</code> function, as expected.
</p>
<pre>
(gdb) <b>info frame</b>
Stack level 0, frame at 0x7ffff7f9ff88:
rip = 0x425530 in regexp.TestFind (/home/user/go/src/regexp/find_test.go:148);
saved rip 0x430233
called by frame at 0x7ffff7f9ffa8
source language minimal.
Arglist at 0x7ffff7f9ff78, args: t=0xf840688b60
Locals at 0x7ffff7f9ff78, Previous frame's sp is 0x7ffff7f9ff88
Saved registers:
rip at 0x7ffff7f9ff80
</pre>
<p>
The command <code>info</code> <code>locals</code> lists all variables local to the function and their values, but is a bit
dangerous to use, since it will also try to print uninitialized variables. Uninitialized slices may cause gdb to try
to print arbitrary large arrays.
</p>
<p>
The functions arguments:
</p>
<pre>
(gdb) <b>info args</b>
t = 0xf840688b60
</pre>
<p>
When printing the argument, notice that its a pointer to a
<code>Regexp</code> value. Note that GDB has incorrectly put the <code>*</code>
on the right-hand side of the type name and made up a 'struct' keyword, in traditional C style.
</p>
<pre>
(gdb) <b>p re</b>
(gdb) p t
$1 = (struct testing.T *) 0xf840688b60
(gdb) p t
$1 = (struct testing.T *) 0xf840688b60
(gdb) p *t
$2 = {errors = "", failed = false, ch = 0xf8406f5690}
(gdb) p *t-&gt;ch
$3 = struct hchan&lt;*testing.T&gt;
</pre>
<p>
That <code>struct</code> <code>hchan&lt;*testing.T&gt;</code> is the
runtime-internal representation of a channel. It is currently empty,
or gdb would have pretty-printed its contents.
</p>
<p>
Stepping forward:
</p>
<pre>
(gdb) <b>n</b> <i># execute next line</i>
149 for _, test := range findTests {
(gdb) <i># enter is repeat</i>
150 re := MustCompile(test.pat)
(gdb) <b>p test.pat</b>
$4 = ""
(gdb) <b>p re</b>
$5 = (struct regexp.Regexp *) 0xf84068d070
(gdb) <b>p *re</b>
$6 = {expr = "", prog = 0xf840688b80, prefix = "", prefixBytes = []uint8, prefixComplete = true,
prefixRune = 0, cond = 0 '\000', numSubexp = 0, longest = false, mu = {state = 0, sema = 0},
machine = []*regexp.machine}
(gdb) <b>p *re->prog</b>
$7 = {Inst = []regexp/syntax.Inst = {{Op = 5 '\005', Out = 0, Arg = 0, Rune = []int}, {Op =
6 '\006', Out = 2, Arg = 0, Rune = []int}, {Op = 4 '\004', Out = 0, Arg = 0, Rune = []int}},
Start = 1, NumCap = 2}
</pre>
<p>
We can step into the <code>String</code>function call with <code>"s"</code>:
</p>
<pre>
(gdb) <b>s</b>
regexp.(*Regexp).String (re=0xf84068d070, noname=void) at /home/user/go/src/regexp/regexp.go:97
97 func (re *Regexp) String() string {
</pre>
<p>
Get a stack trace to see where we are:
</p>
<pre>
(gdb) <b>bt</b>
#0 regexp.(*Regexp).String (re=0xf84068d070, noname=void)
at /home/user/go/src/regexp/regexp.go:97
#1 0x0000000000425615 in regexp.TestFind (t=0xf840688b60)
at /home/user/go/src/regexp/find_test.go:151
#2 0x0000000000430233 in testing.tRunner (t=0xf840688b60, test=0x5747b8)
at /home/user/go/src/testing/testing.go:156
#3 0x000000000040ea6f in runtime.initdone () at /home/user/go/src/runtime/proc.c:243
....
</pre>
<p>
Look at the source code:
</p>
<pre>
(gdb) <b>l</b>
92 mu sync.Mutex
93 machine []*machine
94 }
95
96 // String returns the source text used to compile the regular expression.
97 func (re *Regexp) String() string {
98 return re.expr
99 }
100
101 // Compile parses a regular expression and returns, if successful,
</pre>
<h3 id="Pretty_Printing">Pretty Printing</h3>
<p>
GDB's pretty printing mechanism is triggered by regexp matches on type names. An example for slices:
</p>
<pre>
(gdb) <b>p utf</b>
$22 = []uint8 = {0 '\000', 0 '\000', 0 '\000', 0 '\000'}
</pre>
<p>
Since slices, arrays and strings are not C pointers, GDB can't interpret the subscripting operation for you, but
you can look inside the runtime representation to do that (tab completion helps here):
</p>
<pre>
(gdb) <b>p slc</b>
$11 = []int = {0, 0}
(gdb) <b>p slc-&gt;</b><i>&lt;TAB&gt;</i>
array slc len
(gdb) <b>p slc->array</b>
$12 = (int *) 0xf84057af00
(gdb) <b>p slc->array[1]</b>
$13 = 0</pre>
<p>
The extension functions $len and $cap work on strings, arrays and slices:
</p>
<pre>
(gdb) <b>p $len(utf)</b>
$23 = 4
(gdb) <b>p $cap(utf)</b>
$24 = 4
</pre>
<p>
Channels and maps are 'reference' types, which gdb shows as pointers to C++-like types <code>hash&lt;int,string&gt;*</code>. Dereferencing will trigger prettyprinting
</p>
<p>
Interfaces are represented in the runtime as a pointer to a type descriptor and a pointer to a value. The Go GDB runtime extension decodes this and automatically triggers pretty printing for the runtime type. The extension function <code>$dtype</code> decodes the dynamic type for you (examples are taken from a breakpoint at <code>regexp.go</code> line 293.)
</p>
<pre>
(gdb) <b>p i</b>
$4 = {str = "cbb"}
(gdb) <b>whatis i</b>
type = regexp.input
(gdb) <b>p $dtype(i)</b>
$26 = (struct regexp.inputBytes *) 0xf8400b4930
(gdb) <b>iface i</b>
regexp.input: struct regexp.inputBytes *
</pre>

View file

@ -1,472 +0,0 @@
<!--{
"Title": "Diagnostics",
"Template": true
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<h2 id="introduction">Introduction</h2>
<p>
The Go ecosystem provides a large suite of APIs and tools to
diagnose logic and performance problems in Go programs. This page
summarizes the available tools and helps Go users pick the right one
for their specific problem.
</p>
<p>
Diagnostics solutions can be categorized into the following groups:
</p>
<ul>
<li><strong>Profiling</strong>: Profiling tools analyze the complexity and costs of a
Go program such as its memory usage and frequently called
functions to identify the expensive sections of a Go program.</li>
<li><strong>Tracing</strong>: Tracing is a way to instrument code to analyze latency
throughout the lifecycle of a call or user request. Traces provide an
overview of how much latency each component contributes to the overall
latency in a system. Traces can span multiple Go processes.</li>
<li><strong>Debugging</strong>: Debugging allows us to pause a Go program and examine
its execution. Program state and flow can be verified with debugging.</li>
<li><strong>Runtime statistics and events</strong>: Collection and analysis of runtime stats and events
provides a high-level overview of the health of Go programs. Spikes/dips of metrics
helps us to identify changes in throughput, utilization, and performance.</li>
</ul>
<p>
Note: Some diagnostics tools may interfere with each other. For example, precise
memory profiling skews CPU profiles and goroutine blocking profiling affects scheduler
trace. Use tools in isolation to get more precise info.
</p>
<h2 id="profiling">Profiling</h2>
<p>
Profiling is useful for identifying expensive or frequently called sections
of code. The Go runtime provides <a href="https://golang.org/pkg/runtime/pprof/">
profiling data</a> in the format expected by the
<a href="https://github.com/google/pprof/blob/master/doc/README.md">pprof visualization tool</a>.
The profiling data can be collected during testing
via <code>go</code> <code>test</code> or endpoints made available from the <a href="/pkg/net/http/pprof/">
net/http/pprof</a> package. Users need to collect the profiling data and use pprof tools to filter
and visualize the top code paths.
</p>
<p>Predefined profiles provided by the <a href="/pkg/runtime/pprof">runtime/pprof</a> package:</p>
<ul>
<li>
<strong>cpu</strong>: CPU profile determines where a program spends
its time while actively consuming CPU cycles (as opposed to while sleeping or waiting for I/O).
</li>
<li>
<strong>heap</strong>: Heap profile reports memory allocation samples;
used to monitor current and historical memory usage, and to check for memory leaks.
</li>
<li>
<strong>threadcreate</strong>: Thread creation profile reports the sections
of the program that lead the creation of new OS threads.
</li>
<li>
<strong>goroutine</strong>: Goroutine profile reports the stack traces of all current goroutines.
</li>
<li>
<strong>block</strong>: Block profile shows where goroutines block waiting on synchronization
primitives (including timer channels). Block profile is not enabled by default;
use <code>runtime.SetBlockProfileRate</code> to enable it.
</li>
<li>
<strong>mutex</strong>: Mutex profile reports the lock contentions. When you think your
CPU is not fully utilized due to a mutex contention, use this profile. Mutex profile
is not enabled by default, see <code>runtime.SetMutexProfileFraction</code> to enable it.
</li>
</ul>
<p><strong>What other profilers can I use to profile Go programs?</strong></p>
<p>
On Linux, <a href="https://perf.wiki.kernel.org/index.php/Tutorial">perf tools</a>
can be used for profiling Go programs. Perf can profile
and unwind cgo/SWIG code and kernel, so it can be useful to get insights into
native/kernel performance bottlenecks. On macOS,
<a href="https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/">Instruments</a>
suite can be used profile Go programs.
</p>
<p><strong>Can I profile my production services?</strong></p>
<p>Yes. It is safe to profile programs in production, but enabling
some profiles (e.g. the CPU profile) adds cost. You should expect to
see performance downgrade. The performance penalty can be estimated
by measuring the overhead of the profiler before turning it on in
production.
</p>
<p>
You may want to periodically profile your production services.
Especially in a system with many replicas of a single process, selecting
a random replica periodically is a safe option.
Select a production process, profile it for
X seconds for every Y seconds and save the results for visualization and
analysis; then repeat periodically. Results may be manually and/or automatically
reviewed to find problems.
Collection of profiles can interfere with each other,
so it is recommended to collect only a single profile at a time.
</p>
<p>
<strong>What are the best ways to visualize the profiling data?</strong>
</p>
<p>
The Go tools provide text, graph, and <a href="http://valgrind.org/docs/manual/cl-manual.html">callgrind</a>
visualization of the profile data using
<code><a href="https://github.com/google/pprof/blob/master/doc/README.md">go tool pprof</a></code>.
Read <a href="https://blog.golang.org/profiling-go-programs">Profiling Go programs</a>
to see them in action.
</p>
<p>
<img width="800" src="https://storage.googleapis.com/golangorg-assets/pprof-text.png">
<br>
<small>Listing of the most expensive calls as text.</small>
</p>
<p>
<img width="800" src="https://storage.googleapis.com/golangorg-assets/pprof-dot.png">
<br>
<small>Visualization of the most expensive calls as a graph.</small>
</p>
<p>Weblist view displays the expensive parts of the source line by line in
an HTML page. In the following example, 530ms is spent in the
<code>runtime.concatstrings</code> and cost of each line is presented
in the listing.</p>
<p>
<img width="800" src="https://storage.googleapis.com/golangorg-assets/pprof-weblist.png">
<br>
<small>Visualization of the most expensive calls as weblist.</small>
</p>
<p>
Another way to visualize profile data is a <a href="http://www.brendangregg.com/flamegraphs.html">flame graph</a>.
Flame graphs allow you to move in a specific ancestry path, so you can zoom
in/out of specific sections of code.
The <a href="https://github.com/google/pprof">upstream pprof</a>
has support for flame graphs.
</p>
<p>
<img width="800" src="https://storage.googleapis.com/golangorg-assets/flame.png">
<br>
<small>Flame graphs offers visualization to spot the most expensive code-paths.</small>
</p>
<p><strong>Am I restricted to the built-in profiles?</strong></p>
<p>
Additionally to what is provided by the runtime, Go users can create
their custom profiles via <a href="/pkg/runtime/pprof/#Profile">pprof.Profile</a>
and use the existing tools to examine them.
</p>
<p><strong>Can I serve the profiler handlers (/debug/pprof/...) on a different path and port?</strong></p>
<p>
Yes. The <code>net/http/pprof</code> package registers its handlers to the default
mux by default, but you can also register them yourself by using the handlers
exported from the package.
</p>
<p>
For example, the following example will serve the pprof.Profile
handler on :7777 at /custom_debug_path/profile:
</p>
<p>
<pre>
package main
import (
"log"
"net/http"
"net/http/pprof"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/custom_debug_path/profile", pprof.Profile)
log.Fatal(http.ListenAndServe(":7777", mux))
}
</pre>
</p>
<h2 id="tracing">Tracing</h2>
<p>
Tracing is a way to instrument code to analyze latency throughout the
lifecycle of a chain of calls. Go provides
<a href="https://godoc.org/golang.org/x/net/trace">golang.org/x/net/trace</a>
package as a minimal tracing backend per Go node and provides a minimal
instrumentation library with a simple dashboard. Go also provides
an execution tracer to trace the runtime events within an interval.
</p>
<p>Tracing enables us to:</p>
<ul>
<li>Instrument and analyze application latency in a Go process.</li>
<li>Measure the cost of specific calls in a long chain of calls.</li>
<li>Figure out the utilization and performance improvements.
Bottlenecks are not always obvious without tracing data.</li>
</ul>
<p>
In monolithic systems, it's relatively easy to collect diagnostic data
from the building blocks of a program. All modules live within one
process and share common resources to report logs, errors, and other
diagnostic information. Once your system grows beyond a single process and
starts to become distributed, it becomes harder to follow a call starting
from the front-end web server to all of its back-ends until a response is
returned back to the user. This is where distributed tracing plays a big
role to instrument and analyze your production systems.
</p>
<p>
Distributed tracing is a way to instrument code to analyze latency throughout
the lifecycle of a user request. When a system is distributed and when
conventional profiling and debugging tools dont scale, you might want
to use distributed tracing tools to analyze the performance of your user
requests and RPCs.
</p>
<p>Distributed tracing enables us to:</p>
<ul>
<li>Instrument and profile application latency in a large system.</li>
<li>Track all RPCs within the lifecycle of a user request and see integration issues
that are only visible in production.</li>
<li>Figure out performance improvements that can be applied to our systems.
Many bottlenecks are not obvious before the collection of tracing data.</li>
</ul>
<p>The Go ecosystem provides various distributed tracing libraries per tracing system
and backend-agnostic ones.</p>
<p><strong>Is there a way to automatically intercept each function call and create traces?</strong></p>
<p>
Go doesnt provide a way to automatically intercept every function call and create
trace spans. You need to manually instrument your code to create, end, and annotate spans.
</p>
<p><strong>How should I propagate trace headers in Go libraries?</strong></p>
<p>
You can propagate trace identifiers and tags in the
<a href="/pkg/context#Context"><code>context.Context</code></a>.
There is no canonical trace key or common representation of trace headers
in the industry yet. Each tracing provider is responsible for providing propagation
utilities in their Go libraries.
</p>
<p>
<strong>What other low-level events from the standard library or
runtime can be included in a trace?</strong>
</p>
<p>
The standard library and runtime are trying to expose several additional APIs
to notify on low level internal events. For example,
<a href="/pkg/net/http/httptrace#ClientTrace"><code>httptrace.ClientTrace</code></a>
provides APIs to follow low-level events in the life cycle of an outgoing request.
There is an ongoing effort to retrieve low-level runtime events from
the runtime execution tracer and allow users to define and record their user events.
</p>
<h2 id="debugging">Debugging</h2>
<p>
Debugging is the process of identifying why a program misbehaves.
Debuggers allow us to understand a programs execution flow and current state.
There are several styles of debugging; this section will only focus on attaching
a debugger to a program and core dump debugging.
</p>
<p>Go users mostly use the following debuggers:</p>
<ul>
<li>
<a href="https://github.com/derekparker/delve">Delve</a>:
Delve is a debugger for the Go programming language. It has
support for Gos runtime concepts and built-in types. Delve is
trying to be a fully featured reliable debugger for Go programs.
</li>
<li>
<a href="https://golang.org/doc/gdb">GDB</a>:
Go provides GDB support via the standard Go compiler and Gccgo.
The stack management, threading, and runtime contain aspects that differ
enough from the execution model GDB expects that they can confuse the
debugger, even when the program is compiled with gccgo. Even though
GDB can be used to debug Go programs, it is not ideal and may
create confusion.
</li>
</ul>
<p><strong>How well do debuggers work with Go programs?</strong></p>
<p>
The <code>gc</code> compiler performs optimizations such as
function inlining and variable registerization. These optimizations
sometimes make debugging with debuggers harder. There is an ongoing
effort to improve the quality of the DWARF information generated for
optimized binaries. Until those improvements are available, we recommend
disabling optimizations when building the code being debugged. The following
command builds a package with no compiler optimizations:
<p>
<pre>
$ go build -gcflags=all="-N -l"
</pre>
</p>
As part of the improvement effort, Go 1.10 introduced a new compiler
flag <code>-dwarflocationlists</code>. The flag causes the compiler to
add location lists that helps debuggers work with optimized binaries.
The following command builds a package with optimizations but with
the DWARF location lists:
<p>
<pre>
$ go build -gcflags="-dwarflocationlists=true"
</pre>
</p>
<p><strong>Whats the recommended debugger user interface?</strong></p>
<p>
Even though both delve and gdb provides CLIs, most editor integrations
and IDEs provides debugging-specific user interfaces.
</p>
<p><strong>Is it possible to do postmortem debugging with Go programs?</strong></p>
<p>
A core dump file is a file that contains the memory dump of a running
process and its process status. It is primarily used for post-mortem
debugging of a program and to understand its state
while it is still running. These two cases make debugging of core
dumps a good diagnostic aid to postmortem and analyze production
services. It is possible to obtain core files from Go programs and
use delve or gdb to debug, see the
<a href="https://golang.org/wiki/CoreDumpDebugging">core dump debugging</a>
page for a step-by-step guide.
</p>
<h2 id="runtime">Runtime statistics and events</h2>
<p>
The runtime provides stats and reporting of internal events for
users to diagnose performance and utilization problems at the
runtime level.
</p>
<p>
Users can monitor these stats to better understand the overall
health and performance of Go programs.
Some frequently monitored stats and states:
</p>
<ul>
<li><code><a href="/pkg/runtime/#ReadMemStats">runtime.ReadMemStats</a></code>
reports the metrics related to heap
allocation and garbage collection. Memory stats are useful for
monitoring how much memory resources a process is consuming,
whether the process can utilize memory well, and to catch
memory leaks.</li>
<li><code><a href="/pkg/runtime/debug/#ReadGCStats">debug.ReadGCStats</a></code>
reads statistics about garbage collection.
It is useful to see how much of the resources are spent on GC pauses.
It also reports a timeline of garbage collector pauses and pause time percentiles.</li>
<li><code><a href="/pkg/runtime/debug/#Stack">debug.Stack</a></code>
returns the current stack trace. Stack trace
is useful to see how many goroutines are currently running,
what they are doing, and whether they are blocked or not.</li>
<li><code><a href="/pkg/runtime/debug/#WriteHeapDump">debug.WriteHeapDump</a></code>
suspends the execution of all goroutines
and allows you to dump the heap to a file. A heap dump is a
snapshot of a Go process' memory at a given time. It contains all
allocated objects as well as goroutines, finalizers, and more.</li>
<li><code><a href="/pkg/runtime#NumGoroutine">runtime.NumGoroutine</a></code>
returns the number of current goroutines.
The value can be monitored to see whether enough goroutines are
utilized, or to detect goroutine leaks.</li>
</ul>
<h3 id="execution-tracer">Execution tracer</h3>
<p>Go comes with a runtime execution tracer to capture a wide range
of runtime events. Scheduling, syscall, garbage collections,
heap size, and other events are collected by runtime and available
for visualization by the go tool trace. Execution tracer is a tool
to detect latency and utilization problems. You can examine how well
the CPU is utilized, and when networking or syscalls are a cause of
preemption for the goroutines.</p>
<p>Tracer is useful to:</p>
<ul>
<li>Understand how your goroutines execute.</li>
<li>Understand some of the core runtime events such as GC runs.</li>
<li>Identify poorly parallelized execution.</li>
</ul>
<p>However, it is not great for identifying hot spots such as
analyzing the cause of excessive memory or CPU usage.
Use profiling tools instead first to address them.</p>
<p>
<img width="800" src="https://storage.googleapis.com/golangorg-assets/tracer-lock.png">
</p>
<p>Above, the go tool trace visualization shows the execution started
fine, and then it became serialized. It suggests that there might
be lock contention for a shared resource that creates a bottleneck.</p>
<p>See <a href="https://golang.org/cmd/trace/"><code>go</code> <code>tool</code> <code>trace</code></a>
to collect and analyze runtime traces.
</p>
<h3 id="godebug">GODEBUG</h3>
<p>Runtime also emits events and information if
<a href="https://golang.org/pkg/runtime/#hdr-Environment_Variables">GODEBUG</a>
environmental variable is set accordingly.</p>
<ul>
<li>GODEBUG=gctrace=1 prints garbage collector events at
each collection, summarizing the amount of memory collected
and the length of the pause.</li>
<li>GODEBUG=inittrace=1 prints a summary of execution time and memory allocation
information for completed package initialization work.</li>
<li>GODEBUG=schedtrace=X prints scheduling events every X milliseconds.</li>
</ul>
<p>The GODEBUG environmental variable can be used to disable use of
instruction set extensions in the standard library and runtime.</p>
<ul>
<li>GODEBUG=cpu.all=off disables the use of all optional
instruction set extensions.</li>
<li>GODEBUG=cpu.<em>extension</em>=off disables use of instructions from the
specified instruction set extension.<br>
<em>extension</em> is the lower case name for the instruction set extension
such as <em>sse41</em> or <em>avx</em>.</li>
</ul>

View file

@ -1,35 +0,0 @@
<!--{
"Title": "Editor plugins and IDEs",
"Template": true
}-->
<h2 id="introduction">Introduction</h2>
<p>
This document lists commonly used editor plugins and IDEs from the Go ecosystem
that make Go development more productive and seamless.
A comprehensive list of editor support and IDEs for Go development is available at
<a href="https://golang.org/wiki/IDEsAndTextEditorPlugins">the wiki</a>.
</p>
<h2 id="options">Options</h2>
<p>
The Go ecosystem provides a variety of editor plugins and IDEs to enhance your day-to-day
editing, navigation, testing, and debugging experience.
</p>
<ul>
<li><a href="https://github.com/fatih/vim-go">vim</a>: vim-go plugin provides Go programming language support</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=golang.go">Visual Studio Code</a>:
Go extension provides support for the Go programming language</li>
<li><a href="https://www.jetbrains.com/go">GoLand</a>: GoLand is distributed either as a standalone IDE
or as a plugin for IntelliJ IDEA Ultimate</li>
<li><a href="https://atom.io/packages/go-plus">Atom</a>: Go-Plus is an Atom package that provides enhanced Go support</li>
</ul>
<p>
Note that these are only a few top solutions; a more comprehensive
community-maintained list of
<a href="https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins">IDEs and text editor plugins</a>
is available at the Wiki.
</p>

File diff suppressed because it is too large Load diff

View file

@ -1,112 +0,0 @@
<!--{
"Title": "Contributing to the gccgo frontend"
}-->
<h2>Introduction</h2>
<p>
These are some notes on contributing to the gccgo frontend for GCC.
For information on contributing to parts of Go other than gccgo,
see <a href="/doc/contribute.html">Contributing to the Go project</a>. For
information on building gccgo for yourself,
see <a href="/doc/gccgo_install.html">Setting up and using gccgo</a>.
For more of the gritty details on the process of doing development
with the gccgo frontend,
see <a href="https://go.googlesource.com/gofrontend/+/master/HACKING">the
file HACKING</a> in the gofrontend repository.
</p>
<h2>Legal Prerequisites</h2>
<p>
You must follow the <a href="/doc/contribute.html#copyright">Go copyright
rules</a> for all changes to the gccgo frontend and the associated
libgo library. Code that is part of GCC rather than gccgo must follow
the general <a href="https://gcc.gnu.org/contribute.html">GCC
contribution rules</a>.
</p>
<h2>Code</h2>
<p>
The master sources for the gccgo frontend may be found at
<a href="https://go.googlesource.com/gofrontend">https://go.googlesource.com/gofrontend</a>.
They are mirrored
at <a href="https://github.com/golang/gofrontend">https://github.com/golang/gofrontend</a>.
The master sources are not buildable by themselves, but only in
conjunction with GCC (in the future, other compilers may be
supported). Changes made to the gccgo frontend are also applied to
the GCC source code repository hosted at <code>gcc.gnu.org</code>. In
the <code>gofrontend</code> repository, the <code>go</code> directory
is mirrored to the <code>gcc/go/gofrontend</code> directory in the GCC
repository, and the <code>gofrontend</code> <code>libgo</code>
directory is mirrored to the GCC <code>libgo</code> directory. In
addition, the <code>test</code> directory
from <a href="//go.googlesource.com/go">the main Go repository</a>
is mirrored to the <code>gcc/testsuite/go.test/test</code> directory
in the GCC repository.
</p>
<p>
Changes to these directories always flow from the master sources to
the GCC repository. The files should never be changed in the GCC
repository except by changing them in the master sources and mirroring
them.
</p>
<p>
The gccgo frontend is written in C++.
It follows the GNU and GCC coding standards for C++.
In writing code for the frontend, follow the formatting of the
surrounding code.
Almost all GCC-specific code is not in the frontend proper and is
instead in the GCC sources in the <code>gcc/go</code> directory.
</p>
<p>
The run-time library for gccgo is mostly the same as the library
in <a href="//go.googlesource.com/go">the main Go repository</a>.
The library code in the Go repository is periodically merged into
the <code>libgo/go</code> directory of the <code>gofrontend</code> and
then the GCC repositories, using the shell
script <code>libgo/merge.sh</code>. Accordingly, most library changes
should be made in the main Go repository. The files outside
of <code>libgo/go</code> are gccgo-specific; that said, some of the
files in <code>libgo/runtime</code> are based on files
in <code>src/runtime</code> in the main Go repository.
</p>
<h2>Testing</h2>
<p>
All patches must be tested. A patch that introduces new failures is
not acceptable.
</p>
<p>
To run the gccgo test suite, run <code>make check-go</code> in your
build directory. This will run various tests
under <code>gcc/testsuite/go.*</code> and will also run
the <code>libgo</code> testsuite. This copy of the tests from the
main Go repository is run using the DejaGNU script found
in <code>gcc/testsuite/go.test/go-test.exp</code>.
</p>
<p>
Most new tests should be submitted to the main Go repository for later
mirroring into the GCC repository. If there is a need for specific
tests for gccgo, they should go in
the <code>gcc/testsuite/go.go-torture</code>
or <code>gcc/testsuite/go.dg</code> directories in the GCC repository.
</p>
<h2>Submitting Changes</h2>
<p>
Changes to the Go frontend should follow the same process as for the
main Go repository, only for the <code>gofrontend</code> project and
the <code>gofrontend-dev@googlegroups.com</code> mailing list
rather than the <code>go</code> project and the
<code>golang-dev@googlegroups.com</code> mailing list. Those changes
will then be merged into the GCC sources.
</p>

View file

@ -1,533 +0,0 @@
<!--{
"Title": "Setting up and using gccgo",
"Path": "/doc/install/gccgo"
}-->
<p>
This document explains how to use gccgo, a compiler for
the Go language. The gccgo compiler is a new frontend
for GCC, the widely used GNU compiler. Although the
frontend itself is under a BSD-style license, gccgo is
normally used as part of GCC and is then covered by
the <a href="https://www.gnu.org/licenses/gpl.html">GNU General Public
License</a> (the license covers gccgo itself as part of GCC; it
does not cover code generated by gccgo).
</p>
<p>
Note that gccgo is not the <code>gc</code> compiler; see
the <a href="/doc/install.html">Installing Go</a> instructions for that
compiler.
</p>
<h2 id="Releases">Releases</h2>
<p>
The simplest way to install gccgo is to install a GCC binary release
built to include Go support. GCC binary releases are available from
<a href="https://gcc.gnu.org/install/binaries.html">various
websites</a> and are typically included as part of GNU/Linux
distributions. We expect that most people who build these binaries
will include Go support.
</p>
<p>
The GCC 4.7.1 release and all later 4.7 releases include a complete
<a href="/doc/go1.html">Go 1</a> compiler and libraries.
</p>
<p>
Due to timing, the GCC 4.8.0 and 4.8.1 releases are close to but not
identical to Go 1.1. The GCC 4.8.2 release includes a complete Go
1.1.2 implementation.
</p>
<p>
The GCC 4.9 releases include a complete Go 1.2 implementation.
</p>
<p>
The GCC 5 releases include a complete implementation of the Go 1.4
user libraries. The Go 1.4 runtime is not fully merged, but that
should not be visible to Go programs.
</p>
<p>
The GCC 6 releases include a complete implementation of the Go 1.6.1
user libraries. The Go 1.6 runtime is not fully merged, but that
should not be visible to Go programs.
</p>
<p>
The GCC 7 releases include a complete implementation of the Go 1.8.1
user libraries. As with earlier releases, the Go 1.8 runtime is not
fully merged, but that should not be visible to Go programs.
</p>
<p>
The GCC 8 releases include a complete implementation of the Go 1.10.1
release. The Go 1.10 runtime has now been fully merged into the GCC
development sources, and concurrent garbage collection is fully
supported.
</p>
<p>
The GCC 9 releases include a complete implementation of the Go 1.12.2
release.
</p>
<h2 id="Source_code">Source code</h2>
<p>
If you cannot use a release, or prefer to build gccgo for yourself, the
gccgo source code is accessible via Git. The GCC web site has
<a href="https://gcc.gnu.org/git.html">instructions for getting the GCC
source code</a>. The gccgo source code is included. As a convenience, a
stable version of the Go support is available in the
<code>devel/gccgo</code> branch of the main GCC code repository:
<code>git://gcc.gnu.org/git/gcc.git</code>.
This branch is periodically updated with stable Go compiler sources.
</p>
<p>
Note that although <code>gcc.gnu.org</code> is the most convenient way
to get the source code for the Go frontend, it is not where the master
sources live. If you want to contribute changes to the Go frontend
compiler, see <a href="/doc/gccgo_contribute.html">Contributing to
gccgo</a>.
</p>
<h2 id="Building">Building</h2>
<p>
Building gccgo is just like building GCC
with one or two additional options. See
the <a href="https://gcc.gnu.org/install/">instructions on the gcc web
site</a>. When you run <code>configure</code>, add the
option <code>--enable-languages=c,c++,go</code> (along with other
languages you may want to build). If you are targeting a 32-bit x86,
then you will want to build gccgo to default to
supporting locked compare and exchange instructions; do this by also
using the <code>configure</code> option <code>--with-arch=i586</code>
(or a newer architecture, depending on where you need your programs to
run). If you are targeting a 64-bit x86, but sometimes want to use
the <code>-m32</code> option, then use the <code>configure</code>
option <code>--with-arch-32=i586</code>.
</p>
<h3 id="Gold">Gold</h3>
<p>
On x86 GNU/Linux systems the gccgo compiler is able to
use a small discontiguous stack for goroutines. This permits programs
to run many more goroutines, since each goroutine can use a relatively
small stack. Doing this requires using the gold linker version 2.22
or later. You can either install GNU binutils 2.22 or later, or you
can build gold yourself.
</p>
<p>
To build gold yourself, build the GNU binutils,
using <code>--enable-gold=default</code> when you run
the <code>configure</code> script. Before building, you must install
the flex and bison packages. A typical sequence would look like
this (you can replace <code>/opt/gold</code> with any directory to
which you have write access):
</p>
<pre>
git clone git://sourceware.org/git/binutils-gdb.git
mkdir binutils-objdir
cd binutils-objdir
../binutils-gdb/configure --enable-gold=default --prefix=/opt/gold
make
make install
</pre>
<p>
However you install gold, when you configure gccgo, use the
option <code>--with-ld=<var>GOLD_BINARY</var></code>.
</p>
<h3 id="Prerequisites">Prerequisites</h3>
<p>
A number of prerequisites are required to build GCC, as
described on
the <a href="https://gcc.gnu.org/install/prerequisites.html">gcc web
site</a>. It is important to install all the prerequisites before
running the gcc <code>configure</code> script.
The prerequisite libraries can be conveniently downloaded using the
script <code>contrib/download_prerequisites</code> in the GCC sources.
<h3 id="Build_commands">Build commands</h3>
<p>
Once all the prerequisites are installed, then a typical build and
install sequence would look like this (only use
the <code>--with-ld</code> option if you are using the gold linker as
described above):
</p>
<pre>
git clone --branch devel/gccgo git://gcc.gnu.org/git/gcc.git gccgo
mkdir objdir
cd objdir
../gccgo/configure --prefix=/opt/gccgo --enable-languages=c,c++,go --with-ld=/opt/gold/bin/ld
make
make install
</pre>
<h2 id="Using_gccgo">Using gccgo</h2>
<p>
The gccgo compiler works like other gcc frontends. As of GCC 5 the gccgo
installation also includes a version of the <code>go</code> command,
which may be used to build Go programs as described at
<a href="https://golang.org/cmd/go">https://golang.org/cmd/go</a>.
</p>
<p>
To compile a file without using the <code>go</code> command:
</p>
<pre>
gccgo -c file.go
</pre>
<p>
That produces <code>file.o</code>. To link files together to form an
executable:
</p>
<pre>
gccgo -o file file.o
</pre>
<p>
To run the resulting file, you will need to tell the program where to
find the compiled Go packages. There are a few ways to do this:
</p>
<ul>
<li>
<p>
Set the <code>LD_LIBRARY_PATH</code> environment variable:
</p>
<pre>
LD_LIBRARY_PATH=${prefix}/lib/gcc/MACHINE/VERSION
[or]
LD_LIBRARY_PATH=${prefix}/lib64/gcc/MACHINE/VERSION
export LD_LIBRARY_PATH
</pre>
<p>
Here <code>${prefix}</code> is the <code>--prefix</code> option used
when building gccgo. For a binary install this is
normally <code>/usr</code>. Whether to use <code>lib</code>
or <code>lib64</code> depends on the target.
Typically <code>lib64</code> is correct for x86_64 systems,
and <code>lib</code> is correct for other systems. The idea is to
name the directory where <code>libgo.so</code> is found.
</p>
</li>
<li>
<p>
Passing a <code>-Wl,-R</code> option when you link (replace lib with
lib64 if appropriate for your system):
</p>
<pre>
go build -gccgoflags -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
[or]
gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
</pre>
</li>
<li>
<p>
Use the <code>-static-libgo</code> option to link statically against
the compiled packages.
</p>
</li>
<li>
<p>
Use the <code>-static</code> option to do a fully static link (the
default for the <code>gc</code> compiler).
</p>
</li>
</ul>
<h2 id="Options">Options</h2>
<p>
The gccgo compiler supports all GCC options
that are language independent, notably the <code>-O</code>
and <code>-g</code> options.
</p>
<p>
The <code>-fgo-pkgpath=PKGPATH</code> option may be used to set a
unique prefix for the package being compiled.
This option is automatically used by the go command, but you may want
to use it if you invoke gccgo directly.
This option is intended for use with large
programs that contain many packages, in order to allow multiple
packages to use the same identifier as the package name.
The <code>PKGPATH</code> may be any string; a good choice for the
string is the path used to import the package.
</p>
<p>
The <code>-I</code> and <code>-L</code> options, which are synonyms
for the compiler, may be used to set the search path for finding
imports.
These options are not needed if you build with the go command.
</p>
<h2 id="Imports">Imports</h2>
<p>
When you compile a file that exports something, the export
information will be stored directly in the object file.
If you build with gccgo directly, rather than with the go command,
then when you import a package, you must tell gccgo how to find the
file.
</p>
<p>
When you import the package <var>FILE</var> with gccgo,
it will look for the import data in the following files, and use the
first one that it finds.
<ul>
<li><code><var>FILE</var>.gox</code>
<li><code>lib<var>FILE</var>.so</code>
<li><code>lib<var>FILE</var>.a</code>
<li><code><var>FILE</var>.o</code>
</ul>
<p>
<code><var>FILE</var>.gox</code>, when used, will typically contain
nothing but export data. This can be generated from
<code><var>FILE</var>.o</code> via
</p>
<pre>
objcopy -j .go_export FILE.o FILE.gox
</pre>
<p>
The gccgo compiler will look in the current
directory for import files. In more complex scenarios you
may pass the <code>-I</code> or <code>-L</code> option to
gccgo. Both options take directories to search. The
<code>-L</code> option is also passed to the linker.
</p>
<p>
The gccgo compiler does not currently (2015-06-15) record
the file name of imported packages in the object file. You must
arrange for the imported data to be linked into the program.
Again, this is not necessary when building with the go command.
</p>
<pre>
gccgo -c mypackage.go # Exports mypackage
gccgo -c main.go # Imports mypackage
gccgo -o main main.o mypackage.o # Explicitly links with mypackage.o
</pre>
<h2 id="Debugging">Debugging</h2>
<p>
If you use the <code>-g</code> option when you compile, you can run
<code>gdb</code> on your executable. The debugger has only limited
knowledge about Go. You can set breakpoints, single-step,
etc. You can print variables, but they will be printed as though they
had C/C++ types. For numeric types this doesn't matter. Go strings
and interfaces will show up as two-element structures. Go
maps and channels are always represented as C pointers to run-time
structures.
</p>
<h2 id="C_Interoperability">C Interoperability</h2>
<p>
When using gccgo there is limited interoperability with C,
or with C++ code compiled using <code>extern "C"</code>.
</p>
<h3 id="Types">Types</h3>
<p>
Basic types map directly: an <code>int32</code> in Go is
an <code>int32_t</code> in C, an <code>int64</code> is
an <code>int64_t</code>, etc.
The Go type <code>int</code> is an integer that is the same size as a
pointer, and as such corresponds to the C type <code>intptr_t</code>.
Go <code>byte</code> is equivalent to C <code>unsigned char</code>.
Pointers in Go are pointers in C.
A Go <code>struct</code> is the same as C <code>struct</code> with the
same fields and types.
</p>
<p>
The Go <code>string</code> type is currently defined as a two-element
structure (this is <b style="color: red;">subject to change</b>):
</p>
<pre>
struct __go_string {
const unsigned char *__data;
intptr_t __length;
};
</pre>
<p>
You can't pass arrays between C and Go. However, a pointer to an
array in Go is equivalent to a C pointer to the
equivalent of the element type.
For example, Go <code>*[10]int</code> is equivalent to C <code>int*</code>,
assuming that the C pointer does point to 10 elements.
</p>
<p>
A slice in Go is a structure. The current definition is
(this is <b style="color: red;">subject to change</b>):
</p>
<pre>
struct __go_slice {
void *__values;
intptr_t __count;
intptr_t __capacity;
};
</pre>
<p>
The type of a Go function is a pointer to a struct (this is
<b style="color: red;">subject to change</b>). The first field in the
struct points to the code of the function, which will be equivalent to
a pointer to a C function whose parameter types are equivalent, with
an additional trailing parameter. The trailing parameter is the
closure, and the argument to pass is a pointer to the Go function
struct.
When a Go function returns more than one value, the C function returns
a struct. For example, these functions are roughly equivalent:
</p>
<pre>
func GoFunction(int) (int, float64)
struct { int i; float64 f; } CFunction(int, void*)
</pre>
<p>
Go <code>interface</code>, <code>channel</code>, and <code>map</code>
types have no corresponding C type (<code>interface</code> is a
two-element struct and <code>channel</code> and <code>map</code> are
pointers to structs in C, but the structs are deliberately undocumented). C
<code>enum</code> types correspond to some integer type, but precisely
which one is difficult to predict in general; use a cast. C <code>union</code>
types have no corresponding Go type. C <code>struct</code> types containing
bitfields have no corresponding Go type. C++ <code>class</code> types have
no corresponding Go type.
</p>
<p>
Memory allocation is completely different between C and Go, as Go uses
garbage collection. The exact guidelines in this area are undetermined,
but it is likely that it will be permitted to pass a pointer to allocated
memory from C to Go. The responsibility of eventually freeing the pointer
will remain with C side, and of course if the C side frees the pointer
while the Go side still has a copy the program will fail. When passing a
pointer from Go to C, the Go function must retain a visible copy of it in
some Go variable. Otherwise the Go garbage collector may delete the
pointer while the C function is still using it.
</p>
<h3 id="Function_names">Function names</h3>
<p>
Go code can call C functions directly using a Go extension implemented
in gccgo: a function declaration may be preceded by
<code>//extern NAME</code>. For example, here is how the C function
<code>open</code> can be declared in Go:
</p>
<pre>
//extern open
func c_open(name *byte, mode int, perm int) int
</pre>
<p>
The C function naturally expects a NUL-terminated string, which in
Go is equivalent to a pointer to an array (not a slice!) of
<code>byte</code> with a terminating zero byte. So a sample call
from Go would look like (after importing the <code>syscall</code> package):
</p>
<pre>
var name = [4]byte{'f', 'o', 'o', 0};
i := c_open(&amp;name[0], syscall.O_RDONLY, 0);
</pre>
<p>
(this serves as an example only, to open a file in Go please use Go's
<code>os.Open</code> function instead).
</p>
<p>
Note that if the C function can block, such as in a call
to <code>read</code>, calling the C function may block the Go program.
Unless you have a clear understanding of what you are doing, all calls
between C and Go should be implemented through cgo or SWIG, as for
the <code>gc</code> compiler.
</p>
<p>
The name of Go functions accessed from C is subject to change. At present
the name of a Go function that does not have a receiver is
<code>prefix.package.Functionname</code>. The prefix is set by
the <code>-fgo-prefix</code> option used when the package is compiled;
if the option is not used, the default is <code>go</code>.
To call the function from C you must set the name using
a GCC extension.
</p>
<pre>
extern int go_function(int) __asm__ ("myprefix.mypackage.Function");
</pre>
<h3 id="Automatic_generation_of_Go_declarations_from_C_source_code">
Automatic generation of Go declarations from C source code</h3>
<p>
The Go version of GCC supports automatically generating
Go declarations from C code. The facility is rather awkward, and most
users should use the <a href="/cmd/cgo">cgo</a> program with
the <code>-gccgo</code> option instead.
</p>
<p>
Compile your C code as usual, and add the option
<code>-fdump-go-spec=<var>FILENAME</var></code>. This will create the
file <code><var>FILENAME</var></code> as a side effect of the
compilation. This file will contain Go declarations for the types,
variables and functions declared in the C code. C types that can not
be represented in Go will be recorded as comments in the Go code. The
generated file will not have a <code>package</code> declaration, but
can otherwise be compiled directly by gccgo.
</p>
<p>
This procedure is full of unstated caveats and restrictions and we make no
guarantee that it will not change in the future. It is more useful as a
starting point for real Go code than as a regular procedure.
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,934 +0,0 @@
<!--{
"Title": "Go 1.11 Release Notes",
"Path": "/doc/go1.11",
"Template": true
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<style>
main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.11</h2>
<p>
The latest Go release, version 1.11, arrives six months after <a href="go1.10">Go 1.10</a>.
Most of its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>.
We expect almost all Go programs to continue to compile and run as before.
</p>
<h2 id="language">Changes to the language</h2>
<p>
There are no changes to the language specification.
</p>
<h2 id="ports">Ports</h2>
<p> <!-- CL 94255, CL 115038, etc -->
As <a href="go1.10#ports">announced in the Go 1.10 release notes</a>, Go 1.11 now requires
OpenBSD 6.2 or later, macOS 10.10 Yosemite or later, or Windows 7 or later;
support for previous versions of these operating systems has been removed.
</p>
<p> <!-- CL 121657 -->
Go 1.11 supports the upcoming OpenBSD 6.4 release. Due to changes in
the OpenBSD kernel, older versions of Go will not work on OpenBSD 6.4.
</p>
<p>
There are <a href="https://golang.org/issue/25206">known issues</a> with NetBSD on i386 hardware.
</p>
<p><!-- CL 107935 -->
The race detector is now supported on <code>linux/ppc64le</code>
and, to a lesser extent, on <code>netbsd/amd64</code>. The NetBSD race detector support
has <a href="https://golang.org/issue/26403">known issues</a>.
</p>
<p><!-- CL 109255 -->
The memory sanitizer (<code>-msan</code>) is now supported on <code>linux/arm64</code>.
</p>
<p><!-- CL 93875 -->
The build modes <code>c-shared</code> and <code>c-archive</code> are now supported on
<code>freebsd/amd64</code>.
</p>
<p id="mips"><!-- CL 108475 -->
On 64-bit MIPS systems, the new environment variable settings
<code>GOMIPS64=hardfloat</code> (the default) and
<code>GOMIPS64=softfloat</code> select whether to use
hardware instructions or software emulation for floating-point computations.
For 32-bit systems, the environment variable is still <code>GOMIPS</code>,
as <a href="go1.10#mips">added in Go 1.10</a>.
</p>
<p><!-- CL 107475 -->
On soft-float ARM systems (<code>GOARM=5</code>), Go now uses a more
efficient software floating point interface. This is transparent to
Go code, but ARM assembly that uses floating-point instructions not
guarded on GOARM will break and must be ported to
the <a href="https://golang.org/cl/107475">new interface</a>.
</p>
<p><!-- CL 94076 -->
Go 1.11 on ARMv7 no longer requires a Linux kernel configured
with <code>KUSER_HELPERS</code>. This setting is enabled in default
kernel configurations, but is sometimes disabled in stripped-down
configurations.
</p>
<h3 id="wasm">WebAssembly</h3>
<p>
Go 1.11 adds an experimental port to <a href="https://webassembly.org">WebAssembly</a>
(<code>js/wasm</code>).
</p>
<p>
Go programs currently compile to one WebAssembly module that
includes the Go runtime for goroutine scheduling, garbage
collection, maps, etc.
As a result, the resulting size is at minimum around
2 MB, or 500 KB compressed. Go programs can call into JavaScript
using the new experimental
<a href="/pkg/syscall/js/"><code>syscall/js</code></a> package.
Binary size and interop with other languages has not yet been a
priority but may be addressed in future releases.
</p>
<p>
As a result of the addition of the new <code>GOOS</code> value
"<code>js</code>" and <code>GOARCH</code> value "<code>wasm</code>",
Go files named <code>*_js.go</code> or <code>*_wasm.go</code> will
now be <a href="/pkg/go/build/#hdr-Build_Constraints">ignored by Go
tools</a> except when those GOOS/GOARCH values are being used.
If you have existing filenames matching those patterns, you will need to rename them.
</p>
<p>
More information can be found on the
<a href="https://golang.org/wiki/WebAssembly">WebAssembly wiki page</a>.
</p>
<h3 id="riscv">RISC-V GOARCH values reserved</h3>
<p><!-- CL 106256 -->
The main Go compiler does not yet support the RISC-V architecture <!-- is gonna change everything -->
but we've reserved the <code>GOARCH</code> values
"<code>riscv</code>" and "<code>riscv64</code>", as used by Gccgo,
which does support RISC-V. This means that Go files
named <code>*_riscv.go</code> will now also
be <a href="/pkg/go/build/#hdr-Build_Constraints">ignored by Go
tools</a> except when those GOOS/GOARCH values are being used.
</p>
<h2 id="tools">Tools</h2>
<h3 id="modules">Modules, package versioning, and dependency management</h3>
<p>
Go 1.11 adds preliminary support for a <a href="/cmd/go/#hdr-Modules__module_versions__and_more">new concept called “modules,”</a>
an alternative to GOPATH with integrated support for versioning and
package distribution.
Using modules, developers are no longer confined to working inside GOPATH,
version dependency information is explicit yet lightweight,
and builds are more reliable and reproducible.
</p>
<p>
Module support is considered experimental.
Details are likely to change in response to feedback from Go 1.11 users,
and we have more tools planned.
Although the details of module support may change, projects that convert
to modules using Go 1.11 will continue to work with Go 1.12 and later.
If you encounter bugs using modules,
please <a href="https://golang.org/issue/new">file issues</a>
so we can fix them. For more information, see the
<a href="/cmd/go#hdr-Modules__module_versions__and_more"><code>go</code> command documentation</a>.
</p>
<h3 id="importpath">Import path restriction</h3>
<p>
Because Go module support assigns special meaning to the
<code>@</code> symbol in command line operations,
the <code>go</code> command now disallows the use of
import paths containing <code>@</code> symbols.
Such import paths were never allowed by <code>go</code> <code>get</code>,
so this restriction can only affect users building
custom GOPATH trees by other means.
</p>
<h3 id="gopackages">Package loading</h3>
<p>
The new package
<a href="https://godoc.org/golang.org/x/tools/go/packages"><code>golang.org/x/tools/go/packages</code></a>
provides a simple API for locating and loading packages of Go source code.
Although not yet part of the standard library, for many tasks it
effectively replaces the <a href="/pkg/go/build"><code>go/build</code></a>
package, whose API is unable to fully support modules.
Because it runs an external query command such as
<a href="/cmd/go/#hdr-List_packages"><code>go list</code></a>
to obtain information about Go packages, it enables the construction of
analysis tools that work equally well with alternative build systems
such as <a href="https://bazel.build">Bazel</a>
and <a href="https://buckbuild.com">Buck</a>.
</p>
<h3 id="gocache">Build cache requirement</h3>
<p>
Go 1.11 will be the last release to support setting the environment
variable <code>GOCACHE=off</code> to disable the
<a href="/cmd/go/#hdr-Build_and_test_caching">build cache</a>,
introduced in Go 1.10.
Starting in Go 1.12, the build cache will be required,
as a step toward eliminating <code>$GOPATH/pkg</code>.
The module and package loading support described above
already require that the build cache be enabled.
If you have disabled the build cache to avoid problems you encountered,
please <a href="https://golang.org/issue/new">file an issue</a> to let us know about them.
</p>
<h3 id="compiler">Compiler toolchain</h3>
<p><!-- CL 109918 -->
More functions are now eligible for inlining by default, including
functions that call <code>panic</code>.
</p>
<p><!-- CL 97375 -->
The compiler toolchain now supports column information
in <a href="/cmd/compile/#hdr-Compiler_Directives">line
directives</a>.
</p>
<p><!-- CL 106797 -->
A new package export data format has been introduced.
This should be transparent to end users, except for speeding up
build times for large Go projects.
If it does cause problems, it can be turned off again by
passing <code>-gcflags=all=-iexport=false</code> to
the <code>go</code> tool when building a binary.
</p>
<p><!-- CL 100459 -->
The compiler now rejects unused variables declared in a type switch
guard, such as <code>x</code> in the following example:
</p>
<pre>
func f(v interface{}) {
switch x := v.(type) {
}
}
</pre>
<p>
This was already rejected by both <code>gccgo</code>
and <a href="/pkg/go/types/">go/types</a>.
</p>
<h3 id="assembler">Assembler</h3>
<p><!-- CL 113315 -->
The assembler for <code>amd64</code> now accepts AVX512 instructions.
</p>
<h3 id="debugging">Debugging</h3>
<p><!-- CL 100738, CL 93664 -->
The compiler now produces significantly more accurate debug
information for optimized binaries, including variable location
information, line numbers, and breakpoint locations.
This should make it possible to debug binaries
compiled <em>without</em> <code>-N</code>&nbsp;<code>-l</code>.
There are still limitations to the quality of the debug information,
some of which are fundamental, and some of which will continue to
improve with future releases.
</p>
<p><!-- CL 118276 -->
DWARF sections are now compressed by default because of the expanded
and more accurate debug information produced by the compiler.
This is transparent to most ELF tools (such as debuggers on Linux
and *BSD) and is supported by the Delve debugger on all platforms,
but has limited support in the native tools on macOS and Windows.
To disable DWARF compression,
pass <code>-ldflags=-compressdwarf=false</code> to
the <code>go</code> tool when building a binary.
</p>
<p><!-- CL 109699 -->
Go 1.11 adds experimental support for calling Go functions from
within a debugger.
This is useful, for example, to call <code>String</code> methods
when paused at a breakpoint.
This is currently only supported by Delve (version 1.1.0 and up).
</p>
<h3 id="test">Test</h3>
<p>
Since Go 1.10, the <code>go</code>&nbsp;<code>test</code> command runs
<code>go</code>&nbsp;<code>vet</code> on the package being tested,
to identify problems before running the test. Since <code>vet</code>
typechecks the code with <a href="/pkg/go/types/">go/types</a>
before running, tests that do not typecheck will now fail.
In particular, tests that contain an unused variable inside a
closure compiled with Go 1.10, because the Go compiler incorrectly
accepted them (<a href="https://golang.org/issues/3059">Issue #3059</a>),
but will now fail, since <code>go/types</code> correctly reports an
"unused variable" error in this case.
</p>
<p><!-- CL 102696 -->
The <code>-memprofile</code> flag
to <code>go</code>&nbsp;<code>test</code> now defaults to the
"allocs" profile, which records the total bytes allocated since the
test began (including garbage-collected bytes).
</p>
<h3 id="vet">Vet</h3>
<p><!-- CL 108555 -->
The <a href="/cmd/vet/"><code>go</code>&nbsp;<code>vet</code></a>
command now reports a fatal error when the package under analysis
does not typecheck. Previously, a type checking error simply caused
a warning to be printed, and <code>vet</code> to exit with status 1.
</p>
<p><!-- CL 108559 -->
Additionally, <a href="/cmd/vet"><code>go</code>&nbsp;<code>vet</code></a>
has become more robust when format-checking <code>printf</code> wrappers.
Vet now detects the mistake in this example:
</p>
<pre>
func wrapper(s string, args ...interface{}) {
fmt.Printf(s, args...)
}
func main() {
wrapper("%s", 42)
}
</pre>
<h3 id="trace">Trace</h3>
<p><!-- CL 63274 -->
With the new <code>runtime/trace</code>
package's <a href="/pkg/runtime/trace/#hdr-User_annotation">user
annotation API</a>, users can record application-level information
in execution traces and create groups of related goroutines.
The <code>go</code>&nbsp;<code>tool</code>&nbsp;<code>trace</code>
command visualizes this information in the trace view and the new
user task/region analysis page.
</p>
<h3 id="cgo">Cgo</h3>
<p>
Since Go 1.10, cgo has translated some C pointer types to the Go
type <code>uintptr</code>. These types include
the <code>CFTypeRef</code> hierarchy in Darwin's CoreFoundation
framework and the <code>jobject</code> hierarchy in Java's JNI
interface. In Go 1.11, several improvements have been made to the code
that detects these types. Code that uses these types may need some
updating. See the <a href="go1.10.html#cgo">Go 1.10 release notes</a> for
details. <!-- CL 126275, CL 127156, CL 122217, CL 122575, CL 123177 -->
</p>
<h3 id="go_command">Go command</h3>
<p><!-- CL 126656 -->
The environment variable <code>GOFLAGS</code> may now be used
to set default flags for the <code>go</code> command.
This is useful in certain situations.
Linking can be noticeably slower on underpowered systems due to DWARF,
and users may want to set <code>-ldflags=-w</code> by default.
For modules, some users and CI systems will want vendoring always,
so they should set <code>-mod=vendor</code> by default.
For more information, see the <a href="/cmd/go/#hdr-Environment_variables"><code>go</code>
command documentation</a>.
</p>
<h3 id="godoc">Godoc</h3>
<p>
Go 1.11 will be the last release to support <code>godoc</code>'s command-line interface.
In future releases, <code>godoc</code> will only be a web server. Users should use
<code>go</code> <code>doc</code> for command-line help output instead.
</p>
<p><!-- CL 85396, CL 124495 -->
The <code>godoc</code> web server now shows which version of Go introduced
new API features. The initial Go version of types, funcs, and methods are shown
right-aligned. For example, see <a href="/pkg/os/#UserCacheDir"><code>UserCacheDir</code></a>, with "1.11"
on the right side. For struct fields, inline comments are added when the struct field was
added in a Go version other than when the type itself was introduced.
For a struct field example, see
<a href="/pkg/net/http/httptrace/#ClientTrace.Got1xxResponse"><code>ClientTrace.Got1xxResponse</code></a>.
</p>
<h3 id="gofmt">Gofmt</h3>
<p>
One minor detail of the default formatting of Go source code has changed.
When formatting expression lists with inline comments, the comments were
aligned according to a heuristic.
However, in some cases the alignment would be split up too easily, or
introduce too much whitespace.
The heuristic has been changed to behave better for human-written code.
</p>
<p>
Note that these kinds of minor updates to gofmt are expected from time to
time.
In general, systems that need consistent formatting of Go source code should
use a specific version of the <code>gofmt</code> binary.
See the <a href="/pkg/go/format/">go/format</a> package documentation for more
information.
</p>
<h3 id="run">Run</h3>
<p>
<!-- CL 109341 -->
The <a href="/cmd/go/"><code>go</code>&nbsp;<code>run</code></a>
command now allows a single import path, a directory name or a
pattern matching a single package.
This allows <code>go</code>&nbsp;<code>run</code>&nbsp;<code>pkg</code> or <code>go</code>&nbsp;<code>run</code>&nbsp;<code>dir</code>, most importantly <code>go</code>&nbsp;<code>run</code>&nbsp;<code>.</code>
</p>
<h2 id="runtime">Runtime</h2>
<p><!-- CL 85887 -->
The runtime now uses a sparse heap layout so there is no longer a
limit to the size of the Go heap (previously, the limit was 512GiB).
This also fixes rare "address space conflict" failures in mixed Go/C
binaries or binaries compiled with <code>-race</code>.
</p>
<p><!-- CL 108679, CL 106156 -->
On macOS and iOS, the runtime now uses <code>libSystem.dylib</code> instead of
calling the kernel directly. This should make Go binaries more
compatible with future versions of macOS and iOS.
The <a href="/pkg/syscall">syscall</a> package still makes direct
system calls; fixing this is planned for a future release.
</p>
<h2 id="performance">Performance</h2>
<p>
As always, the changes are so general and varied that precise
statements about performance are difficult to make. Most programs
should run a bit faster, due to better generated code and
optimizations in the core library.
</p>
<p><!-- CL 74851 -->
There were multiple performance changes to the <code>math/big</code>
package as well as many changes across the tree specific to <code>GOARCH=arm64</code>.
</p>
<h3 id="performance-compiler">Compiler toolchain</h3>
<p><!-- CL 110055 -->
The compiler now optimizes map clearing operations of the form:
</p>
<pre>
for k := range m {
delete(m, k)
}
</pre>
<p><!-- CL 109517 -->
The compiler now optimizes slice extension of the form
<code>append(s,</code>&nbsp;<code>make([]T,</code>&nbsp;<code>n)...)</code>.
</p>
<p><!-- CL 100277, CL 105635, CL 109776 -->
The compiler now performs significantly more aggressive bounds-check
and branch elimination. Notably, it now recognizes transitive
relations, so if <code>i&lt;j</code> and <code>j&lt;len(s)</code>,
it can use these facts to eliminate the bounds check
for <code>s[i]</code>. It also understands simple arithmetic such
as <code>s[i-10]</code> and can recognize more inductive cases in
loops. Furthermore, the compiler now uses bounds information to more
aggressively optimize shift operations.
</p>
<h2 id="library">Core library</h2>
<p>
All of the changes to the standard library are minor.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
As always, there are various minor changes and updates to the library,
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
in mind.
</p>
<!-- CL 115095: https://golang.org/cl/115095: yes (`go test pkg` now always builds pkg even if there are no test files): cmd/go: output coverage report even if there are no test files -->
<!-- CL 110395: https://golang.org/cl/110395: cmd/go, cmd/compile: use Windows response files to avoid arg length limits -->
<!-- CL 112436: https://golang.org/cl/112436: cmd/pprof: add readline support similar to upstream -->
<dl id="crypto"><dt><a href="/pkg/crypto/">crypto</a></dt>
<dd>
<p><!-- CL 64451 -->
Certain crypto operations, including
<a href="/pkg/crypto/ecdsa/#Sign"><code>ecdsa.Sign</code></a>,
<a href="/pkg/crypto/rsa/#EncryptPKCS1v15"><code>rsa.EncryptPKCS1v15</code></a> and
<a href="/pkg/crypto/rsa/#GenerateKey"><code>rsa.GenerateKey</code></a>,
now randomly read an extra byte of randomness to ensure tests don't rely on internal behavior.
</p>
</dl><!-- crypto -->
<dl id="crypto/cipher"><dt><a href="/pkg/crypto/cipher/">crypto/cipher</a></dt>
<dd>
<p><!-- CL 48510, CL 116435 -->
The new function <a href="/pkg/crypto/cipher/#NewGCMWithTagSize"><code>NewGCMWithTagSize</code></a>
implements Galois Counter Mode with non-standard tag lengths for compatibility with existing cryptosystems.
</p>
</dl><!-- crypto/cipher -->
<dl id="crypto/rsa"><dt><a href="/pkg/crypto/rsa/">crypto/rsa</a></dt>
<dd>
<p><!-- CL 103876 -->
<a href="/pkg/crypto/rsa/#PublicKey"><code>PublicKey</code></a> now implements a
<a href="/pkg/crypto/rsa/#PublicKey.Size"><code>Size</code></a> method that
returns the modulus size in bytes.
</p>
</dl><!-- crypto/rsa -->
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
<dd>
<p><!-- CL 85115 -->
<a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>'s new
<a href="/pkg/crypto/tls/#ConnectionState.ExportKeyingMaterial"><code>ExportKeyingMaterial</code></a>
method allows exporting keying material bound to the
connection according to RFC 5705.
</p>
</dl><!-- crypto/tls -->
<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
<dd>
<p><!-- CL 123355, CL 123695 -->
The deprecated, legacy behavior of treating the <code>CommonName</code> field as
a hostname when no Subject Alternative Names are present is now disabled when the CN is not a
valid hostname.
The <code>CommonName</code> can be completely ignored by adding the experimental value
<code>x509ignoreCN=1</code> to the <code>GODEBUG</code> environment variable.
When the CN is ignored, certificates without SANs validate under chains with name constraints
instead of returning <code>NameConstraintsWithoutSANs</code>.
</p>
<p><!-- CL 113475 -->
Extended key usage restrictions are again checked only if they appear in the <code>KeyUsages</code>
field of <a href="/pkg/crypto/x509/#VerifyOptions"><code>VerifyOptions</code></a>, instead of always being checked.
This matches the behavior of Go 1.9 and earlier.
</p>
<p><!-- CL 102699 -->
The value returned by <a href="/pkg/crypto/x509/#SystemCertPool"><code>SystemCertPool</code></a>
is now cached and might not reflect system changes between invocations.
</p>
</dl><!-- crypto/x509 -->
<dl id="debug/elf"><dt><a href="/pkg/debug/elf/">debug/elf</a></dt>
<dd>
<p><!-- CL 112115 -->
More <a href="/pkg/debug/elf/#ELFOSABI_NONE"><code>ELFOSABI</code></a>
and <a href="/pkg/debug/elf/#EM_NONE"><code>EM</code></a>
constants have been added.
</p>
</dl><!-- debug/elf -->
<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
<dd>
<p><!-- CL 110561 -->
<code>Marshal</code> and <code><a href="/pkg/encoding/asn1/#Unmarshal">Unmarshal</a></code>
now support "private" class annotations for fields.
</p>
</dl><!-- encoding/asn1 -->
<dl id="encoding/base32"><dt><a href="/pkg/encoding/base32/">encoding/base32</a></dt>
<dd>
<p><!-- CL 112516 -->
The decoder now consistently
returns <code>io.ErrUnexpectedEOF</code> for an incomplete
chunk. Previously it would return <code>io.EOF</code> in some
cases.
</p>
</dl><!-- encoding/base32 -->
<dl id="encoding/csv"><dt><a href="/pkg/encoding/csv/">encoding/csv</a></dt>
<dd>
<p><!-- CL 99696 -->
The <code>Reader</code> now rejects attempts to set
the <a href="/pkg/encoding/csv/#Reader.Comma"><code>Comma</code></a>
field to a double-quote character, as double-quote characters
already have a special meaning in CSV.
</p>
</dl><!-- encoding/csv -->
<!-- CL 100235 was reverted -->
<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
<dd>
<p><!-- CL 121815 -->
The package has changed its behavior when a typed interface
value is passed to an implicit escaper function. Previously such
a value was written out as (an escaped form)
of <code>&lt;nil&gt;</code>. Now such values are ignored, just
as an untyped <code>nil</code> value is (and always has been)
ignored.
</p>
</dl><!-- html/template -->
<dl id="image/gif"><dt><a href="/pkg/image/gif/">image/gif</a></dt>
<dd>
<p><!-- CL 93076 -->
Non-looping animated GIFs are now supported. They are denoted by having a
<code><a href="/pkg/image/gif/#GIF.LoopCount">LoopCount</a></code> of -1.
</p>
</dl><!-- image/gif -->
<dl id="io/ioutil"><dt><a href="/pkg/io/ioutil/">io/ioutil</a></dt>
<dd>
<p><!-- CL 105675 -->
The <code><a href="/pkg/io/ioutil/#TempFile">TempFile</a></code>
function now supports specifying where the random characters in
the filename are placed. If the <code>prefix</code> argument
includes a "<code>*</code>", the random string replaces the
"<code>*</code>". For example, a <code>prefix</code> argument of "<code>myname.*.bat</code>" will
result in a random filename such as
"<code>myname.123456.bat</code>". If no "<code>*</code>" is
included the old behavior is retained, and the random digits are
appended to the end.
</p>
</dl><!-- io/ioutil -->
<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
<dd>
<p><!-- CL 108996 -->
<a href="/pkg/math/big/#Int.ModInverse"><code>ModInverse</code></a> now returns nil when g and n are not relatively prime. The result was previously undefined.
</p>
</dl><!-- math/big -->
<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
<dd>
<p><!-- CL 121055 -->
The handling of form-data with missing/empty file names has been
restored to the behavior in Go 1.9: in the
<a href="/pkg/mime/multipart/#Form"><code>Form</code></a> for
the form-data part the value is available in
the <code>Value</code> field rather than the <code>File</code>
field. In Go releases 1.10 through 1.10.3 a form-data part with
a missing/empty file name and a non-empty "Content-Type" field
was stored in the <code>File</code> field. This change was a
mistake in 1.10 and has been reverted to the 1.9 behavior.
</p>
</dl><!-- mime/multipart -->
<dl id="mime/quotedprintable"><dt><a href="/pkg/mime/quotedprintable/">mime/quotedprintable</a></dt>
<dd>
<p><!-- CL 121095 -->
To support invalid input found in the wild, the package now
permits non-ASCII bytes but does not validate their encoding.
</p>
</dl><!-- mime/quotedprintable -->
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd>
<p><!-- CL 72810 -->
The new <a href="/pkg/net/#ListenConfig"><code>ListenConfig</code></a> type and the new
<a href="/pkg/net/#Dialer.Control"><code>Dialer.Control</code></a> field permit
setting socket options before accepting and creating connections, respectively.
</p>
<p><!-- CL 76391 -->
The <a href="/pkg/syscall/#RawConn"><code>syscall.RawConn</code></a> <code>Read</code>
and <code>Write</code> methods now work correctly on Windows.
</p>
<p><!-- CL 107715 -->
The <code>net</code> package now automatically uses the
<a href="http://man7.org/linux/man-pages/man2/splice.2.html"><code>splice</code> system call</a>
on Linux when copying data between TCP connections in
<a href="/pkg/net/#TCPConn.ReadFrom"><code>TCPConn.ReadFrom</code></a>, as called by
<a href="/pkg/io/#Copy"><code>io.Copy</code></a>. The result is faster, more efficient TCP proxying.
</p>
<p><!-- CL 108297 -->
The <a href="/pkg/net/#TCPConn.File"><code>TCPConn.File</code></a>,
<a href="/pkg/net/#UDPConn.File"><code>UDPConn.File</code></a>,
<a href="/pkg/net/#UnixCOnn.File"><code>UnixConn.File</code></a>,
and <a href="/pkg/net/#IPConn.File"><code>IPConn.File</code></a>
methods no longer put the returned <code>*os.File</code> into
blocking mode.
</p>
</dl><!-- net -->
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
<dd>
<p><!-- CL 71272 -->
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> type has a
new <a href="/pkg/net/http/#Transport.MaxConnsPerHost"><code>MaxConnsPerHost</code></a>
option that permits limiting the maximum number of connections
per host.
</p>
<p><!-- CL 79919 -->
The <a href="/pkg/net/http/#Cookie"><code>Cookie</code></a> type has a new
<a href="/pkg/net/http/#Cookie.SameSite"><code>SameSite</code></a> field
(of new type also named
<a href="/pkg/net/http/#SameSite"><code>SameSite</code></a>) to represent the new cookie attribute recently supported by most browsers.
The <code>net/http</code>'s <code>Transport</code> does not use the <code>SameSite</code>
attribute itself, but the package supports parsing and serializing the
attribute for browsers to use.
</p>
<p><!-- CL 81778 -->
It is no longer allowed to reuse a <a href="/pkg/net/http/#Server"><code>Server</code></a>
after a call to
<a href="/pkg/net/http/#Server.Shutdown"><code>Shutdown</code></a> or
<a href="/pkg/net/http/#Server.Close"><code>Close</code></a>. It was never officially supported
in the past and had often surprising behavior. Now, all future calls to the server's <code>Serve</code>
methods will return errors after a shutdown or close.
</p>
<!-- CL 89275 was reverted before Go 1.11 -->
<p><!-- CL 93296 -->
The constant <code>StatusMisdirectedRequest</code> is now defined for HTTP status code 421.
</p>
<p><!-- CL 123875 -->
The HTTP server will no longer cancel contexts or send on
<a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
channels upon receiving pipelined HTTP/1.1 requests. Browsers do
not use HTTP pipelining, but some clients (such as
Debian's <code>apt</code>) may be configured to do so.
</p>
<p><!-- CL 115255 -->
<a href="/pkg/net/http/#ProxyFromEnvironment"><code>ProxyFromEnvironment</code></a>, which is used by the
<a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport</code></a>, now
supports CIDR notation and ports in the <code>NO_PROXY</code> environment variable.
</p>
</dl><!-- net/http -->
<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
<dd>
<p><!-- CL 77410 -->
The
<a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
has a new
<a href="/pkg/net/http/httputil/#ReverseProxy.ErrorHandler"><code>ErrorHandler</code></a>
option to permit changing how errors are handled.
</p>
<p><!-- CL 115135 -->
The <code>ReverseProxy</code> now also passes
"<code>TE:</code>&nbsp;<code>trailers</code>" request headers
through to the backend, as required by the gRPC protocol.
</p>
</dl><!-- net/http/httputil -->
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
<dd>
<p><!-- CL 78835 -->
The new <a href="/pkg/os/#UserCacheDir"><code>UserCacheDir</code></a> function
returns the default root directory to use for user-specific cached data.
</p>
<p><!-- CL 94856 -->
The new <a href="/pkg/os/#ModeIrregular"><code>ModeIrregular</code></a>
is a <a href="/pkg/os/#FileMode"><code>FileMode</code></a> bit to represent
that a file is not a regular file, but nothing else is known about it, or that
it's not a socket, device, named pipe, symlink, or other file type for which
Go has a defined mode bit.
</p>
<p><!-- CL 99337 -->
<a href="/pkg/os/#Symlink"><code>Symlink</code></a> now works
for unprivileged users on Windows 10 on machines with Developer
Mode enabled.
</p>
<p><!-- CL 100077 -->
When a non-blocking descriptor is passed
to <a href="/pkg/os#NewFile"><code>NewFile</code></a>, the
resulting <code>*File</code> will be kept in non-blocking
mode. This means that I/O for that <code>*File</code> will use
the runtime poller rather than a separate thread, and that
the <a href="/pkg/os/#File.SetDeadline"><code>SetDeadline</code></a>
methods will work.
</p>
</dl><!-- os -->
<dl id="os/signal"><dt><a href="/pkg/os/signal/">os/signal</a></dt>
<dd>
<p><!-- CL 108376 -->
The new <a href="/pkg/os/signal/#Ignored"><code>Ignored</code></a> function reports
whether a signal is currently ignored.
</p>
</dl><!-- os/signal -->
<dl id="os/user"><dt><a href="/pkg/os/user/">os/user</a></dt>
<dd>
<p><!-- CL 92456 -->
The <code>os/user</code> package can now be built in pure Go
mode using the build tag "<code>osusergo</code>",
independent of the use of the environment
variable <code>CGO_ENABLED=0</code>. Previously the only way to use
the package's pure Go implementation was to disable <code>cgo</code>
support across the entire program.
</p>
</dl><!-- os/user -->
<!-- CL 101715 was reverted -->
<dl id="pkg-runtime"><dt id="runtime-again"><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p><!-- CL 70993 -->
Setting the <code>GODEBUG=tracebackancestors=<em>N</em></code>
environment variable now extends tracebacks with the stacks at
which goroutines were created, where <em>N</em> limits the
number of ancestor goroutines to report.
</p>
</dl><!-- runtime -->
<dl id="runtime/pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
<dd>
<p><!-- CL 102696 -->
This release adds a new "allocs" profile type that profiles
total number of bytes allocated since the program began
(including garbage-collected bytes). This is identical to the
existing "heap" profile viewed in <code>-alloc_space</code> mode.
Now <code>go test -memprofile=...</code> reports an "allocs" profile
instead of "heap" profile.
</p>
</dl><!-- runtime/pprof -->
<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
<dd>
<p><!-- CL 87095 -->
The mutex profile now includes reader/writer contention
for <a href="/pkg/sync/#RWMutex"><code>RWMutex</code></a>.
Writer/writer contention was already included in the mutex
profile.
</p>
</dl><!-- sync -->
<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
<dd>
<p><!-- CL 106275 -->
On Windows, several fields were changed from <code>uintptr</code> to a new
<a href="/pkg/syscall/?GOOS=windows&GOARCH=amd64#Pointer"><code>Pointer</code></a>
type to avoid problems with Go's garbage collector. The same change was made
to the <a href="https://godoc.org/golang.org/x/sys/windows"><code>golang.org/x/sys/windows</code></a>
package. For any code affected, users should first migrate away from the <code>syscall</code>
package to the <code>golang.org/x/sys/windows</code> package, and then change
to using the <code>Pointer</code>, while obeying the
<a href="/pkg/unsafe/#Pointer"><code>unsafe.Pointer</code> conversion rules</a>.
</p>
<p><!-- CL 118658 -->
On Linux, the <code>flags</code> parameter to
<a href="/pkg/syscall/?GOOS=linux&GOARCH=amd64#Faccessat"><code>Faccessat</code></a>
is now implemented just as in glibc. In earlier Go releases the
flags parameter was ignored.
</p>
<p><!-- CL 118658 -->
On Linux, the <code>flags</code> parameter to
<a href="/pkg/syscall/?GOOS=linux&GOARCH=amd64#Fchmodat"><code>Fchmodat</code></a>
is now validated. Linux's <code>fchmodat</code> doesn't support the <code>flags</code> parameter
so we now mimic glibc's behavior and return an error if it's non-zero.
</p>
</dl><!-- syscall -->
<dl id="text/scanner"><dt><a href="/pkg/text/scanner/">text/scanner</a></dt>
<dd>
<p><!-- CL 112037 -->
The <a href="/pkg/text/scanner/#Scanner.Scan"><code>Scanner.Scan</code></a> method now returns
the <a href="/pkg/text/scanner/#RawString"><code>RawString</code></a> token
instead of <a href="/pkg/text/scanner/#String"><code>String</code></a>
for raw string literals.
</p>
</dl><!-- text/scanner -->
<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
<dd>
<p><!-- CL 84480 -->
Modifying template variables via assignments is now permitted via the <code>=</code> token:
</p>
<pre>
{{"{{"}} $v := "init" {{"}}"}}
{{"{{"}} if true {{"}}"}}
{{"{{"}} $v = "changed" {{"}}"}}
{{"{{"}} end {{"}}"}}
v: {{"{{"}} $v {{"}}"}} {{"{{"}}/* "changed" */{{"}}"}}</pre>
<p><!-- CL 95215 -->
In previous versions untyped <code>nil</code> values passed to
template functions were ignored. They are now passed as normal
arguments.
</p>
</dl><!-- text/template -->
<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
<dd>
<p><!-- CL 98157 -->
Parsing of timezones denoted by sign and offset is now
supported. In previous versions, numeric timezone names
(such as <code>+03</code>) were not considered valid, and only
three-letter abbreviations (such as <code>MST</code>) were accepted
when expecting a timezone name.
</p>
</dl><!-- time -->

View file

@ -1,949 +0,0 @@
<!--{
"Title": "Go 1.12 Release Notes",
"Path": "/doc/go1.12",
"Template": true
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<style>
main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.12</h2>
<p>
The latest Go release, version 1.12, arrives six months after <a href="go1.11">Go 1.11</a>.
Most of its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 <a href="/doc/go1compat">promise of compatibility</a>.
We expect almost all Go programs to continue to compile and run as before.
</p>
<h2 id="language">Changes to the language</h2>
<p>
There are no changes to the language specification.
</p>
<h2 id="ports">Ports</h2>
<p><!-- CL 138675 -->
The race detector is now supported on <code>linux/arm64</code>.
</p>
<p id="freebsd">
Go 1.12 is the last release that is supported on FreeBSD 10.x, which has
already reached end-of-life. Go 1.13 will require FreeBSD 11.2+ or FreeBSD
12.0+.
FreeBSD 12.0+ requires a kernel with the COMPAT_FREEBSD11 option set (this is the default).
</p>
<p><!-- CL 146898 -->
cgo is now supported on <code>linux/ppc64</code>.
</p>
<p id="hurd"><!-- CL 146023 -->
<code>hurd</code> is now a recognized value for <code>GOOS</code>, reserved
for the GNU/Hurd system for use with <code>gccgo</code>.
</p>
<h3 id="windows">Windows</h3>
<p>
Go's new <code>windows/arm</code> port supports running Go on Windows 10
IoT Core on 32-bit ARM chips such as the Raspberry Pi 3.
</p>
<h3 id="aix">AIX</h3>
<p>
Go now supports AIX 7.2 and later on POWER8 architectures (<code>aix/ppc64</code>). External linking, cgo, pprof and the race detector aren't yet supported.
</p>
<h3 id="darwin">Darwin</h3>
<p>
Go 1.12 is the last release that will run on macOS 10.10 Yosemite.
Go 1.13 will require macOS 10.11 El Capitan or later.
</p>
<p><!-- CL 141639 -->
<code>libSystem</code> is now used when making syscalls on Darwin,
ensuring forward-compatibility with future versions of macOS and iOS.
<!-- CL 153338 -->
The switch to <code>libSystem</code> triggered additional App Store
checks for private API usage. Since it is considered private,
<code>syscall.Getdirentries</code> now always fails with
<code>ENOSYS</code> on iOS.
Additionally, <a href="/pkg/syscall/#Setrlimit"><code>syscall.Setrlimit</code></a>
reports <code>invalid</code> <code>argument</code> in places where it historically
succeeded. These consequences are not specific to Go and users should expect
behavioral parity with <code>libSystem</code>'s implementation going forward.
</p>
<h2 id="tools">Tools</h2>
<h3 id="vet"><code>go tool vet</code> no longer supported</h3>
<p>
The <code>go vet</code> command has been rewritten to serve as the
base for a range of different source code analysis tools. See
the <a href="https://godoc.org/golang.org/x/tools/go/analysis">golang.org/x/tools/go/analysis</a>
package for details. A side-effect is that <code>go tool vet</code>
is no longer supported. External tools that use <code>go tool
vet</code> must be changed to use <code>go
vet</code>. Using <code>go vet</code> instead of <code>go tool
vet</code> should work with all supported versions of Go.
</p>
<p>
As part of this change, the experimental <code>-shadow</code> option
is no longer available with <code>go vet</code>. Checking for
variable shadowing may now be done using
<pre>
go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
go vet -vettool=$(which shadow)
</pre>
</p>
<h3 id="tour">Tour</h3>
<p> <!-- CL 152657 -->
The Go tour is no longer included in the main binary distribution. To
run the tour locally, instead of running <code>go</code> <code>tool</code> <code>tour</code>,
manually install it:
<pre>
go get -u golang.org/x/tour
tour
</pre>
</p>
<h3 id="gocache">Build cache requirement</h3>
<p>
The <a href="/cmd/go/#hdr-Build_and_test_caching">build cache</a> is now
required as a step toward eliminating
<code>$GOPATH/pkg</code>. Setting the environment variable
<code>GOCACHE=off</code> will cause <code>go</code> commands that write to the
cache to fail.
</p>
<h3 id="binary-only">Binary-only packages</h3>
<p>
Go 1.12 is the last release that will support binary-only packages.
</p>
<h3 id="cgo">Cgo</h3>
<p>
Go 1.12 will translate the C type <code>EGLDisplay</code> to the Go type <code>uintptr</code>.
This change is similar to how Go 1.10 and newer treats Darwin's CoreFoundation
and Java's JNI types. See the
<a href="/cmd/cgo/#hdr-Special_cases">cgo documentation</a>
for more information.
</p>
<p><!-- CL 152657 -->
Mangled C names are no longer accepted in packages that use Cgo. Use the Cgo
names instead. For example, use the documented cgo name <code>C.char</code>
rather than the mangled name <code>_Ctype_char</code> that cgo generates.
</p>
<h3 id="modules">Modules</h3>
<p><!-- CL 148517 -->
When <code>GO111MODULE</code> is set to <code>on</code>, the <code>go</code>
command now supports module-aware operations outside of a module directory,
provided that those operations do not need to resolve import paths relative to
the current directory or explicitly edit the <code>go.mod</code> file.
Commands such as <code>go</code> <code>get</code>,
<code>go</code> <code>list</code>, and
<code>go</code> <code>mod</code> <code>download</code> behave as if in a
module with initially-empty requirements.
In this mode, <code>go</code> <code>env</code> <code>GOMOD</code> reports
the system's null device (<code>/dev/null</code> or <code>NUL</code>).
</p>
<p><!-- CL 146382 -->
<code>go</code> commands that download and extract modules are now safe to
invoke concurrently.
The module cache (<code>GOPATH/pkg/mod</code>) must reside in a filesystem that
supports file locking.
</p>
<p><!-- CL 147282, 147281 -->
The <code>go</code> directive in a <code>go.mod</code> file now indicates the
version of the language used by the files within that module.
It will be set to the current release
(<code>go</code> <code>1.12</code>) if no existing version is
present.
If the <code>go</code> directive for a module specifies a
version <em>newer</em> than the toolchain in use, the <code>go</code> command
will attempt to build the packages regardless, and will note the mismatch only if
that build fails.
</p>
<p><!-- CL 147282, 147281 -->
This changed use of the <code>go</code> directive means that if you
use Go 1.12 to build a module, thus recording <code>go 1.12</code>
in the <code>go.mod</code> file, you will get an error when
attempting to build the same module with Go 1.11 through Go 1.11.3.
Go 1.11.4 or later will work fine, as will releases older than Go 1.11.
If you must use Go 1.11 through 1.11.3, you can avoid the problem by
setting the language version to 1.11, using the Go 1.12 go tool,
via <code>go mod edit -go=1.11</code>.
</p>
<p><!-- CL 152739 -->
When an import cannot be resolved using the active modules,
the <code>go</code> command will now try to use the modules mentioned in the
main module's <code>replace</code> directives before consulting the module
cache and the usual network sources.
If a matching replacement is found but the <code>replace</code> directive does
not specify a version, the <code>go</code> command uses a pseudo-version
derived from the zero <code>time.Time</code> (such
as <code>v0.0.0-00010101000000-000000000000</code>).
</p>
<h3 id="compiler">Compiler toolchain</h3>
<p><!-- CL 134155, 134156 -->
The compiler's live variable analysis has improved. This may mean that
finalizers will be executed sooner in this release than in previous
releases. If that is a problem, consider the appropriate addition of a
<a href="/pkg/runtime/#KeepAlive"><code>runtime.KeepAlive</code></a> call.
</p>
<p><!-- CL 147361 -->
More functions are now eligible for inlining by default, including
functions that do nothing but call another function.
This extra inlining makes it additionally important to use
<a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
instead of iterating over the result of
<a href="/pkg/runtime/#Callers"><code>runtime.Callers</code></a> directly.
<pre>
// Old code which no longer works correctly (it will miss inlined call frames).
var pcs [10]uintptr
n := runtime.Callers(1, pcs[:])
for _, pc := range pcs[:n] {
f := runtime.FuncForPC(pc)
if f != nil {
fmt.Println(f.Name())
}
}
</pre>
<pre>
// New code which will work correctly.
var pcs [10]uintptr
n := runtime.Callers(1, pcs[:])
frames := runtime.CallersFrames(pcs[:n])
for {
frame, more := frames.Next()
fmt.Println(frame.Function)
if !more {
break
}
}
</pre>
</p>
<p><!-- CL 153477 -->
Wrappers generated by the compiler to implement method expressions
are no longer reported
by <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
and <a href="/pkg/runtime/#Stack"><code>runtime.Stack</code></a>. They
are also not printed in panic stack traces.
This change aligns the <code>gc</code> toolchain to match
the <code>gccgo</code> toolchain, which already elided such wrappers
from stack traces.
Clients of these APIs might need to adjust for the missing
frames. For code that must interoperate between 1.11 and 1.12
releases, you can replace the method expression <code>x.M</code>
with the function literal <code>func (...) { x.M(...) } </code>.
</p>
<p><!-- CL 144340 -->
The compiler now accepts a <code>-lang</code> flag to set the Go language
version to use. For example, <code>-lang=go1.8</code> causes the compiler to
emit an error if the program uses type aliases, which were added in Go 1.9.
Language changes made before Go 1.12 are not consistently enforced.
</p>
<p><!-- CL 147160 -->
The compiler toolchain now uses different conventions to call Go
functions and assembly functions. This should be invisible to users,
except for calls that simultaneously cross between Go and
assembly <em>and</em> cross a package boundary. If linking results
in an error like "relocation target not defined for ABIInternal (but
is defined for ABI0)", please refer to the
<a href="https://github.com/golang/proposal/blob/master/design/27539-internal-abi.md#compatibility">compatibility section</a>
of the ABI design document.
</p>
<p><!-- CL 145179 -->
There have been many improvements to the DWARF debug information
produced by the compiler, including improvements to argument
printing and variable location information.
</p>
<p><!-- CL 61511 -->
Go programs now also maintain stack frame pointers on <code>linux/arm64</code>
for the benefit of profiling tools like <code>perf</code>. The frame pointer
maintenance has a small run-time overhead that varies but averages around 3%.
To build a toolchain that does not use frame pointers, set
<code>GOEXPERIMENT=noframepointer</code> when running <code>make.bash</code>.
</p>
<p><!-- CL 142717 -->
The obsolete "safe" compiler mode (enabled by the <code>-u</code> gcflag) has been removed.
</p>
<h3 id="godoc"><code>godoc</code> and <code>go</code> <code>doc</code></h3>
<p>
In Go 1.12, <code>godoc</code> no longer has a command-line interface and
is only a web server. Users should use <code>go</code> <code>doc</code>
for command-line help output instead. Go 1.12 is the last release that will
include the <code>godoc</code> webserver; in Go 1.13 it will be available
via <code>go</code> <code>get</code>.
</p>
<p><!-- CL 141977 -->
<code>go</code> <code>doc</code> now supports the <code>-all</code> flag,
which will cause it to print all exported APIs and their documentation,
as the <code>godoc</code> command line used to do.
</p>
<p><!-- CL 140959 -->
<code>go</code> <code>doc</code> also now includes the <code>-src</code> flag,
which will show the target's source code.
</p>
<h3 id="trace">Trace</h3>
<p><!-- CL 60790 -->
The trace tool now supports plotting mutator utilization curves,
including cross-references to the execution trace. These are useful
for analyzing the impact of the garbage collector on application
latency and throughput.
</p>
<h3 id="assembler">Assembler</h3>
<p><!-- CL 147218 -->
On <code>arm64</code>, the platform register was renamed from
<code>R18</code> to <code>R18_PLATFORM</code> to prevent accidental
use, as the OS could choose to reserve this register.
</p>
<h2 id="runtime">Runtime</h2>
<p><!-- CL 138959 -->
Go 1.12 significantly improves the performance of sweeping when a
large fraction of the heap remains live. This reduces allocation
latency immediately following a garbage collection.
</p>
<p><!-- CL 139719 -->
The Go runtime now releases memory back to the operating system more
aggressively, particularly in response to large allocations that
can't reuse existing heap space.
</p>
<p><!-- CL 146342, CL 146340, CL 146345, CL 146339, CL 146343, CL 146337, CL 146341, CL 146338 -->
The Go runtime's timer and deadline code is faster and scales better
with higher numbers of CPUs. In particular, this improves the
performance of manipulating network connection deadlines.
</p>
<p><!-- CL 135395 -->
On Linux, the runtime now uses <code>MADV_FREE</code> to release unused
memory. This is more efficient but may result in higher reported
RSS. The kernel will reclaim the unused data when it is needed.
To revert to the Go 1.11 behavior (<code>MADV_DONTNEED</code>), set the
environment variable <code>GODEBUG=madvdontneed=1</code>.
</p>
<p><!-- CL 149578 -->
Adding cpu.<em>extension</em>=off to the
<a href="/doc/diagnostics.html#godebug">GODEBUG</a> environment
variable now disables the use of optional CPU instruction
set extensions in the standard library and runtime. This is not
yet supported on Windows.
</p>
<p><!-- CL 158337 -->
Go 1.12 improves the accuracy of memory profiles by fixing
overcounting of large heap allocations.
</p>
<p><!-- CL 159717 -->
Tracebacks, <code>runtime.Caller</code>,
and <code>runtime.Callers</code> no longer include
compiler-generated initialization functions. Doing a traceback
during the initialization of a global variable will now show a
function named <code>PKG.init.ializers</code>.
</p>
<h2 id="library">Core library</h2>
<h3 id="tls_1_3">TLS 1.3</h3>
<p>
Go 1.12 adds opt-in support for TLS 1.3 in the <code>crypto/tls</code> package as
specified by <a href="https://www.rfc-editor.org/info/rfc8446">RFC 8446</a>. It can
be enabled by adding the value <code>tls13=1</code> to the <code>GODEBUG</code>
environment variable. It will be enabled by default in Go 1.13.
</p>
<p>
To negotiate TLS 1.3, make sure you do not set an explicit <code>MaxVersion</code> in
<a href="/pkg/crypto/tls/#Config"><code>Config</code></a> and run your program with
the environment variable <code>GODEBUG=tls13=1</code> set.
</p>
<p>
All TLS 1.2 features except <code>TLSUnique</code> in
<a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
and renegotiation are available in TLS 1.3 and provide equivalent or
better security and performance. Note that even though TLS 1.3 is backwards
compatible with previous versions, certain legacy systems might not work
correctly when attempting to negotiate it. RSA certificate keys too small
to be secure (including 512-bit keys) will not work with TLS 1.3.
</p>
<p>
TLS 1.3 cipher suites are not configurable. All supported cipher suites are
safe, and if <code>PreferServerCipherSuites</code> is set in
<a href="/pkg/crypto/tls/#Config"><code>Config</code></a> the preference order
is based on the available hardware.
</p>
<p>
Early data (also called "0-RTT mode") is not currently supported as a
client or server. Additionally, a Go 1.12 server does not support skipping
unexpected early data if a client sends it. Since TLS 1.3 0-RTT mode
involves clients keeping state regarding which servers support 0-RTT,
a Go 1.12 server cannot be part of a load-balancing pool where some other
servers do support 0-RTT. If switching a domain from a server that supported
0-RTT to a Go 1.12 server, 0-RTT would have to be disabled for at least the
lifetime of the issued session tickets before the switch to ensure
uninterrupted operation.
</p>
<p>
In TLS 1.3 the client is the last one to speak in the handshake, so if it causes
an error to occur on the server, it will be returned on the client by the first
<a href="/pkg/crypto/tls/#Conn.Read"><code>Read</code></a>, not by
<a href="/pkg/crypto/tls/#Conn.Handshake"><code>Handshake</code></a>. For
example, that will be the case if the server rejects the client certificate.
Similarly, session tickets are now post-handshake messages, so are only
received by the client upon its first
<a href="/pkg/crypto/tls/#Conn.Read"><code>Read</code></a>.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
As always, there are various minor changes and updates to the library,
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
in mind.
</p>
<!-- TODO: CL 115677: https://golang.org/cl/115677: cmd/vet: check embedded field tags too -->
<dl id="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
<dd>
<p><!-- CL 149297 -->
<code>Reader</code>'s <a href="/pkg/bufio/#Reader.UnreadRune"><code>UnreadRune</code></a> and
<a href="/pkg/bufio/#Reader.UnreadByte"><code>UnreadByte</code></a> methods will now return an error
if they are called after <a href="/pkg/bufio/#Reader.Peek"><code>Peek</code></a>.
</p>
</dl><!-- bufio -->
<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
<dd>
<p><!-- CL 137855 -->
The new function <a href="/pkg/bytes/#ReplaceAll"><code>ReplaceAll</code></a> returns a copy of
a byte slice with all non-overlapping instances of a value replaced by another.
</p>
<p><!-- CL 145098 -->
A pointer to a zero-value <a href="/pkg/bytes/#Reader"><code>Reader</code></a> is now
functionally equivalent to <a href="/pkg/bytes/#NewReader"><code>NewReader</code></a><code>(nil)</code>.
Prior to Go 1.12, the former could not be used as a substitute for the latter in all cases.
</p>
</dl><!-- bytes -->
<dl id="crypto/rand"><dt><a href="/pkg/crypto/rand/">crypto/rand</a></dt>
<dd>
<p><!-- CL 139419 -->
A warning will now be printed to standard error the first time
<code>Reader.Read</code> is blocked for more than 60 seconds waiting
to read entropy from the kernel.
</p>
<p><!-- CL 120055 -->
On FreeBSD, <code>Reader</code> now uses the <code>getrandom</code>
system call if available, <code>/dev/urandom</code> otherwise.
</p>
</dl><!-- crypto/rand -->
<dl id="crypto/rc4"><dt><a href="/pkg/crypto/rc4/">crypto/rc4</a></dt>
<dd>
<p><!-- CL 130397 -->
This release removes the assembly implementations, leaving only
the pure Go version. The Go compiler generates code that is
either slightly better or slightly worse, depending on the exact
CPU. RC4 is insecure and should only be used for compatibility
with legacy systems.
</p>
</dl><!-- crypto/rc4 -->
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
<dd>
<p><!-- CL 143177 -->
If a client sends an initial message that does not look like TLS, the server
will no longer reply with an alert, and it will expose the underlying
<code>net.Conn</code> in the new field <code>Conn</code> of
<a href="/pkg/crypto/tls/#RecordHeaderError"><code>RecordHeaderError</code></a>.
</p>
</dl><!-- crypto/tls -->
<dl id="database/sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
<dd>
<p><!-- CL 145738 -->
A query cursor can now be obtained by passing a
<a href="/pkg/database/sql/#Rows"><code>*Rows</code></a>
value to the <a href="/pkg/database/sql/#Row.Scan"><code>Row.Scan</code></a> method.
</p>
</dl><!-- database/sql -->
<dl id="expvar"><dt><a href="/pkg/expvar/">expvar</a></dt>
<dd>
<p><!-- CL 139537 -->
The new <a href="/pkg/expvar/#Map.Delete"><code>Delete</code></a> method allows
for deletion of key/value pairs from a <a href="/pkg/expvar/#Map"><code>Map</code></a>.
</p>
</dl><!-- expvar -->
<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
<dd>
<p><!-- CL 142737 -->
Maps are now printed in key-sorted order to ease testing. The ordering rules are:
<ul>
<li>When applicable, nil compares low
<li>ints, floats, and strings order by <
<li>NaN compares less than non-NaN floats
<li>bool compares false before true
<li>Complex compares real, then imaginary
<li>Pointers compare by machine address
<li>Channel values compare by machine address
<li>Structs compare each field in turn
<li>Arrays compare each element in turn
<li>Interface values compare first by <code>reflect.Type</code> describing the concrete type
and then by concrete value as described in the previous rules.
</ul>
</p>
<p><!-- CL 129777 -->
When printing maps, non-reflexive key values like <code>NaN</code> were previously
displayed as <code>&lt;nil&gt;</code>. As of this release, the correct values are printed.
</p>
</dl><!-- fmt -->
<dl id="go/doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
<dd>
<p><!-- CL 140958 -->
To address some outstanding issues in <a href="/cmd/doc/"><code>cmd/doc</code></a>,
this package has a new <a href="/pkg/go/doc/#Mode"><code>Mode</code></a> bit,
<code>PreserveAST</code>, which controls whether AST data is cleared.
</p>
</dl><!-- go/doc -->
<dl id="go/token"><dt><a href="/pkg/go/token/">go/token</a></dt>
<dd>
<p><!-- CL 134075 -->
The <a href="/pkg/go/token#File"><code>File</code></a> type has a new
<a href="/pkg/go/token#File.LineStart"><code>LineStart</code></a> field,
which returns the position of the start of a given line. This is especially useful
in programs that occasionally handle non-Go files, such as assembly, but wish to use
the <code>token.Pos</code> mechanism to identify file positions.
</p>
</dl><!-- go/token -->
<dl id="image"><dt><a href="/pkg/image/">image</a></dt>
<dd>
<p><!-- CL 118755 -->
The <a href="/pkg/image/#RegisterFormat"><code>RegisterFormat</code></a> function is now safe for concurrent use.
</p>
</dl><!-- image -->
<dl id="image/png"><dt><a href="/pkg/image/png/">image/png</a></dt>
<dd>
<p><!-- CL 134235 -->
Paletted images with fewer than 16 colors now encode to smaller outputs.
</p>
</dl><!-- image/png -->
<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
<dd>
<p><!-- CL 139457 -->
The new <a href="/pkg/io#StringWriter"><code>StringWriter</code></a> interface wraps the
<a href="/pkg/io/#WriteString"><code>WriteString</code></a> function.
</p>
</dl><!-- io -->
<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
<dd>
<p><!-- CL 153059 -->
The functions
<a href="/pkg/math/#Sin"><code>Sin</code></a>,
<a href="/pkg/math/#Cos"><code>Cos</code></a>,
<a href="/pkg/math/#Tan"><code>Tan</code></a>,
and <a href="/pkg/math/#Sincos"><code>Sincos</code></a> now
apply Payne-Hanek range reduction to huge arguments. This
produces more accurate answers, but they will not be bit-for-bit
identical with the results in earlier releases.
</p>
</dl><!-- math -->
<dl id="math/bits"><dt><a href="/pkg/math/bits/">math/bits</a></dt>
<dd>
<p><!-- CL 123157 -->
New extended precision operations <a href="/pkg/math/bits/#Add"><code>Add</code></a>, <a href="/pkg/math/bits/#Sub"><code>Sub</code></a>, <a href="/pkg/math/bits/#Mul"><code>Mul</code></a>, and <a href="/pkg/math/bits/#Div"><code>Div</code></a> are available in <code>uint</code>, <code>uint32</code>, and <code>uint64</code> versions.
</p>
</dl><!-- math/bits -->
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd>
<p><!-- CL 146659 -->
The
<a href="/pkg/net/#Dialer.DualStack"><code>Dialer.DualStack</code></a> setting is now ignored and deprecated;
RFC 6555 Fast Fallback ("Happy Eyeballs") is now enabled by default. To disable, set
<a href="/pkg/net/#Dialer.FallbackDelay"><code>Dialer.FallbackDelay</code></a> to a negative value.
</p>
<p><!-- CL 107196 -->
Similarly, TCP keep-alives are now enabled by default if
<a href="/pkg/net/#Dialer.KeepAlive"><code>Dialer.KeepAlive</code></a> is zero.
To disable, set it to a negative value.
</p>
<p><!-- CL 113997 -->
On Linux, the <a href="http://man7.org/linux/man-pages/man2/splice.2.html"><code>splice</code> system call</a> is now used when copying from a
<a href="/pkg/net/#UnixConn"><code>UnixConn</code></a> to a
<a href="/pkg/net/#TCPConn"><code>TCPConn</code></a>.
</p>
</dl><!-- net -->
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
<dd>
<p><!-- CL 143177 -->
The HTTP server now rejects misdirected HTTP requests to HTTPS servers with a plaintext "400 Bad Request" response.
</p>
<p><!-- CL 130115 -->
The new <a href="/pkg/net/http/#Client.CloseIdleConnections"><code>Client.CloseIdleConnections</code></a>
method calls the <code>Client</code>'s underlying <code>Transport</code>'s <code>CloseIdleConnections</code>
if it has one.
</p>
<p><!-- CL 145398 -->
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer rejects HTTP responses which declare
HTTP Trailers but don't use chunked encoding. Instead, the declared trailers are now just ignored.
</p>
<p><!-- CL 152080 --> <!-- CL 151857 -->
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer handles <code>MAX_CONCURRENT_STREAMS</code> values
advertised from HTTP/2 servers as strictly as it did during Go 1.10 and Go 1.11. The default behavior is now back
to how it was in Go 1.9: each connection to a server can have up to <code>MAX_CONCURRENT_STREAMS</code> requests
active and then new TCP connections are created as needed. In Go 1.10 and Go 1.11 the <code>http2</code> package
would block and wait for requests to finish instead of creating new connections.
To get the stricter behavior back, import the
<a href="https://godoc.org/golang.org/x/net/http2"><code>golang.org/x/net/http2</code></a> package
directly and set
<a href="https://godoc.org/golang.org/x/net/http2#Transport.StrictMaxConcurrentStreams"><code>Transport.StrictMaxConcurrentStreams</code></a> to
<code>true</code>.
</p>
</dl><!-- net/http -->
<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
<dd>
<p><!-- CL 159157, CL 160178 -->
<a href="/pkg/net/url/#Parse"><code>Parse</code></a>,
<a href="/pkg/net/url/#ParseRequestURI"><code>ParseRequestURI</code></a>,
and
<a href="/pkg/net/url/#URL.Parse"><code>URL.Parse</code></a>
now return an
error for URLs containing ASCII control characters, which includes NULL,
tab, and newlines.
</p>
</dl><!-- net/url -->
<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
<dd>
<p><!-- CL 146437 -->
The <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a> now automatically
proxies WebSocket requests.
</p>
</dl><!-- net/http/httputil -->
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
<dd>
<p><!-- CL 125443 -->
The new <a href="/pkg/os/#ProcessState.ExitCode"><code>ProcessState.ExitCode</code></a> method
returns the process's exit code.
</p>
<p><!-- CL 135075 -->
<code>ModeCharDevice</code> has been added to the <code>ModeType</code> bitmask, allowing for
<code>ModeDevice | ModeCharDevice</code> to be recovered when masking a
<a href="/pkg/os/#FileMode"><code>FileMode</code></a> with <code>ModeType</code>.
</p>
<p><!-- CL 139418 -->
The new function <a href="/pkg/os/#UserHomeDir"><code>UserHomeDir</code></a> returns the
current user's home directory.
</p>
<p><!-- CL 146020 -->
<a href="/pkg/os/#RemoveAll"><code>RemoveAll</code></a> now supports paths longer than 4096 characters
on most Unix systems.
</p>
<p><!-- CL 130676 -->
<a href="/pkg/os/#File.Sync"><code>File.Sync</code></a> now uses <code>F_FULLFSYNC</code> on macOS
to correctly flush the file contents to permanent storage.
This may cause the method to run more slowly than in previous releases.
</p>
<p><!--CL 155517 -->
<a href="/pkg/os/#File"><code>File</code></a> now supports
a <a href="/pkg/os/#File.SyscallConn"><code>SyscallConn</code></a>
method returning
a <a href="/pkg/syscall/#RawConn"><code>syscall.RawConn</code></a>
interface value. This may be used to invoke system-specific
operations on the underlying file descriptor.
</p>
</dl><!-- os -->
<dl id="path/filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
<dd>
<p><!-- CL 145220 -->
The <a href="/pkg/path/filepath/#IsAbs"><code>IsAbs</code></a> function now returns true when passed
a reserved filename on Windows such as <code>NUL</code>.
<a href="https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#naming-conventions">List of reserved names.</a>
</p>
</dl><!-- path/filepath -->
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
<dd>
<p><!-- CL 33572 -->
A new <a href="/pkg/reflect#MapIter"><code>MapIter</code></a> type is
an iterator for ranging over a map. This type is exposed through the
<a href="/pkg/reflect#Value"><code>Value</code></a> type's new
<a href="/pkg/reflect#Value.MapRange"><code>MapRange</code></a> method.
This follows the same iteration semantics as a range statement, with <code>Next</code>
to advance the iterator, and <code>Key</code>/<code>Value</code> to access each entry.
</p>
</dl><!-- reflect -->
<dl id="regexp"><dt><a href="/pkg/regexp/">regexp</a></dt>
<dd>
<p><!-- CL 139784 -->
<a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a> is no longer necessary
to avoid lock contention, so it has been given a partial deprecation comment.
<a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a>
may still be appropriate if the reason for its use is to make two copies with
different <a href="/pkg/regexp/#Regexp.Longest"><code>Longest</code></a> settings.
</p>
</dl><!-- regexp -->
<dl id="runtime/debug"><dt><a href="/pkg/runtime/debug/">runtime/debug</a></dt>
<dd>
<p><!-- CL 144220 -->
A new <a href="/pkg/runtime/debug/#BuildInfo"><code>BuildInfo</code></a> type
exposes the build information read from the running binary, available only in
binaries built with module support. This includes the main package path, main
module information, and the module dependencies. This type is given through the
<a href="/pkg/runtime/debug/#ReadBuildInfo"><code>ReadBuildInfo</code></a> function
on <a href="/pkg/runtime/debug/#BuildInfo"><code>BuildInfo</code></a>.
</p>
</dl><!-- runtime/debug -->
<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
<dd>
<p><!-- CL 137855 -->
The new function <a href="/pkg/strings/#ReplaceAll"><code>ReplaceAll</code></a> returns a copy of
a string with all non-overlapping instances of a value replaced by another.
</p>
<p><!-- CL 145098 -->
A pointer to a zero-value <a href="/pkg/strings/#Reader"><code>Reader</code></a> is now
functionally equivalent to <a href="/pkg/strings/#NewReader"><code>NewReader</code></a><code>(nil)</code>.
Prior to Go 1.12, the former could not be used as a substitute for the latter in all cases.
</p>
<p><!-- CL 122835 -->
The new <a href="/pkg/strings/#Builder.Cap"><code>Builder.Cap</code></a> method returns the capacity of the builder's underlying byte slice.
</p>
<p><!-- CL 131495 -->
The character mapping functions <a href="/pkg/strings/#Map"><code>Map</code></a>,
<a href="/pkg/strings/#Title"><code>Title</code></a>,
<a href="/pkg/strings/#ToLower"><code>ToLower</code></a>,
<a href="/pkg/strings/#ToLowerSpecial"><code>ToLowerSpecial</code></a>,
<a href="/pkg/strings/#ToTitle"><code>ToTitle</code></a>,
<a href="/pkg/strings/#ToTitleSpecial"><code>ToTitleSpecial</code></a>,
<a href="/pkg/strings/#ToUpper"><code>ToUpper</code></a>, and
<a href="/pkg/strings/#ToUpperSpecial"><code>ToUpperSpecial</code></a>
now always guarantee to return valid UTF-8. In earlier releases, if the input was invalid UTF-8 but no character replacements
needed to be applied, these routines incorrectly returned the invalid UTF-8 unmodified.
</p>
</dl><!-- strings -->
<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
<dd>
<p><!-- CL 138595 -->
64-bit inodes are now supported on FreeBSD 12. Some types have been adjusted accordingly.
</p>
<p><!-- CL 125456 -->
The Unix socket
(<a href="https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/"><code>AF_UNIX</code></a>)
address family is now supported for compatible versions of Windows.
</p>
<p><!-- CL 147117 -->
The new function <a href="/pkg/syscall/?GOOS=windows&GOARCH=amd64#Syscall18"><code>Syscall18</code></a>
has been introduced for Windows, allowing for calls with up to 18 arguments.
</p>
</dl><!-- syscall -->
<dl id="syscall/js"><dt><a href="/pkg/syscall/js/">syscall/js</a></dt>
<dd>
<p><!-- CL 153559 -->
<p>
The <code>Callback</code> type and <code>NewCallback</code> function have been renamed;
they are now called
<a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Func"><code>Func</code></a> and
<a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#FuncOf"><code>FuncOf</code></a>, respectively.
This is a breaking change, but WebAssembly support is still experimental
and not yet subject to the
<a href="/doc/go1compat">Go 1 compatibility promise</a>. Any code using the
old names will need to be updated.
</p>
<p><!-- CL 141644 -->
If a type implements the new
<a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Wrapper"><code>Wrapper</code></a>
interface,
<a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#ValueOf"><code>ValueOf</code></a>
will use it to return the JavaScript value for that type.
</p>
<p><!-- CL 143137 -->
The meaning of the zero
<a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Value"><code>Value</code></a>
has changed. It now represents the JavaScript <code>undefined</code> value
instead of the number zero.
This is a breaking change, but WebAssembly support is still experimental
and not yet subject to the
<a href="/doc/go1compat">Go 1 compatibility promise</a>. Any code relying on
the zero <a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Value"><code>Value</code></a>
to mean the number zero will need to be updated.
</p>
<p><!-- CL 144384 -->
The new
<a href="/pkg/syscall/js/?GOOS=js&GOARCH=wasm#Value.Truthy"><code>Value.Truthy</code></a>
method reports the
<a href="https://developer.mozilla.org/en-US/docs/Glossary/Truthy">JavaScript "truthiness"</a>
of a given value.
</p>
</dl><!-- syscall/js -->
<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
<dd>
<p><!-- CL 139258 -->
The <a href="/cmd/go/#hdr-Testing_flags"><code>-benchtime</code></a> flag now supports setting an explicit iteration count instead of a time when the value ends with an "<code>x</code>". For example, <code>-benchtime=100x</code> runs the benchmark 100 times.
</p>
</dl><!-- testing -->
<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
<dd>
<p><!-- CL 142217 -->
When executing a template, long context values are no longer truncated in errors.
</p>
<p>
<code>executing "tmpl" at <.very.deep.context.v...>: map has no entry for key "notpresent"</code>
</p>
<p>
is now
</p>
<p>
<code>executing "tmpl" at <.very.deep.context.value.notpresent>: map has no entry for key "notpresent"</code>
</p>
<dd>
<p><!-- CL 143097 -->
If a user-defined function called by a template panics, the
panic is now caught and returned as an error by
the <code>Execute</code> or <code>ExecuteTemplate</code> method.
</p>
</dl><!-- text/template -->
<dl id="time"><dt><a href="/pkg/time/">time</a></dt>
<dd>
<p><!-- CL 151299 -->
The time zone database in <code>$GOROOT/lib/time/zoneinfo.zip</code>
has been updated to version 2018i. Note that this ZIP file is
only used if a time zone database is not provided by the operating
system.
</p>
</dl><!-- time -->
<dl id="unsafe"><dt><a href="/pkg/unsafe/">unsafe</a></dt>
<dd>
<p><!-- CL 146058 -->
It is invalid to convert a nil <code>unsafe.Pointer</code> to <code>uintptr</code> and back with arithmetic.
(This was already invalid, but will now cause the compiler to misbehave.)
</p>
</dl><!-- unsafe -->

File diff suppressed because it is too large Load diff

View file

@ -1,924 +0,0 @@
<!--{
"Title": "Go 1.14 Release Notes",
"Path": "/doc/go1.14"
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<style>
main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.14</h2>
<p>
The latest Go release, version 1.14, arrives six months after <a href="go1.13">Go 1.13</a>.
Most of its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>.
We expect almost all Go programs to continue to compile and run as before.
</p>
<p>
Module support in the <code>go</code> command is now ready for production use,
and we encourage all users to <a href="https://blog.golang.org/migrating-to-go-modules">migrate to Go
modules for dependency management</a>. If you are unable to migrate due to a problem in the Go
toolchain, please ensure that the problem has an
<a href="https://golang.org/issue?q=is%3Aissue+is%3Aopen+label%3Amodules">open issue</a>
filed. (If the issue is not on the <code>Go1.15</code> milestone, please let us
know why it prevents you from migrating so that we can prioritize it
appropriately.)
</p>
<h2 id="language">Changes to the language</h2>
<p>
Per the <a href="https://github.com/golang/proposal/blob/master/design/6977-overlapping-interfaces.md">overlapping interfaces proposal</a>,
Go 1.14 now permits embedding of interfaces with overlapping method sets:
methods from an embedded interface may have the same names and identical signatures
as methods already present in the (embedding) interface. This solves problems that typically
(but not exclusively) occur with diamond-shaped embedding graphs.
Explicitly declared methods in an interface must remain
<a href="https://tip.golang.org/ref/spec#Uniqueness_of_identifiers">unique</a>, as before.
</p>
<h2 id="ports">Ports</h2>
<h3 id="darwin">Darwin</h3>
<p>
Go 1.14 is the last release that will run on macOS 10.11 El Capitan.
Go 1.15 will require macOS 10.12 Sierra or later.
</p>
<p><!-- golang.org/issue/34749 -->
Go 1.14 is the last Go release to support 32-bit binaries on
macOS (the <code>darwin/386</code> port). They are no longer
supported by macOS, starting with macOS 10.15 (Catalina).
Go continues to support the 64-bit <code>darwin/amd64</code> port.
</p>
<p><!-- golang.org/issue/34751 -->
Go 1.14 will likely be the last Go release to support 32-bit
binaries on iOS, iPadOS, watchOS, and tvOS
(the <code>darwin/arm</code> port). Go continues to support the
64-bit <code>darwin/arm64</code> port.
</p>
<h3 id="windows">Windows</h3>
<p><!-- CL 203601 -->
Go binaries on Windows now
have <a href="https://docs.microsoft.com/en-us/windows/win32/memory/data-execution-prevention">DEP
(Data Execution Prevention)</a> enabled.
</p>
<p><!-- CL 202439 -->
On Windows, creating a file
via <a href="/pkg/os#CreateFile"><code>os.OpenFile</code></a> with
the <a href="/pkg/os/#O_CREATE"><code>os.O_CREATE</code></a> flag, or
via <a href="/pkg/syscall#Open"><code>syscall.Open</code></a> with
the <a href="/pkg/syscall#O_CREAT"><code>syscall.O_CREAT</code></a>
flag, will now create the file as read-only if the
bit <code>0o200</code> (owner write permission) is not set in the
permission argument. This makes the behavior on Windows more like
that on Unix systems.
</p>
<h3 id="wasm">WebAssembly</h3>
<p><!-- CL 203600 -->
JavaScript values referenced from Go via <code>js.Value</code>
objects can now be garbage collected.
</p>
<p><!-- CL 203600 -->
<code>js.Value</code> values can no longer be compared using
the <code>==</code> operator, and instead must be compared using
their <code>Equal</code> method.
</p>
<p><!-- CL 203600 -->
<code>js.Value</code> now
has <code>IsUndefined</code>, <code>IsNull</code>,
and <code>IsNaN</code> methods.
</p>
<h3 id="riscv">RISC-V</h3>
<p><!-- Issue 27532 -->
Go 1.14 contains experimental support for 64-bit RISC-V on Linux
(<code>GOOS=linux</code>, <code>GOARCH=riscv64</code>). Be aware
that performance, assembly syntax stability, and possibly
correctness are a work in progress.
</p>
<h3 id="freebsd">FreeBSD</h3>
<p><!-- CL 199919 -->
Go now supports the 64-bit ARM architecture on FreeBSD 12.0 or later (the
<code>freebsd/arm64</code> port).
</p>
<h3 id="nacl">Native Client (NaCl)</h3>
<p><!-- golang.org/issue/30439 -->
As <a href="go1.13#ports">announced</a> in the Go 1.13 release notes,
Go 1.14 drops support for the Native Client platform (<code>GOOS=nacl</code>).
</p>
<h3 id="illumos">Illumos</h3>
<p><!-- CL 203758 -->
The runtime now respects zone CPU caps
(the <code>zone.cpu-cap</code> resource control)
for <code>runtime.NumCPU</code> and the default value
of <code>GOMAXPROCS</code>.
</p>
<h2 id="tools">Tools</h2>
<h3 id="go-command">Go command</h3>
<h4 id="vendor">Vendoring</h4>
<!-- golang.org/issue/33848 -->
<p>
When the main module contains a top-level <code>vendor</code> directory and
its <code>go.mod</code> file specifies <code>go</code> <code>1.14</code> or
higher, the <code>go</code> command now defaults to <code>-mod=vendor</code>
for operations that accept that flag. A new value for that flag,
<code>-mod=mod</code>, causes the <code>go</code> command to instead load
modules from the module cache (as when no <code>vendor</code> directory is
present).
</p>
<p>
When <code>-mod=vendor</code> is set (explicitly or by default), the
<code>go</code> command now verifies that the main module's
<code>vendor/modules.txt</code> file is consistent with its
<code>go.mod</code> file.
</p>
<p>
<code>go</code> <code>list</code> <code>-m</code> no longer silently omits
transitive dependencies that do not provide packages in
the <code>vendor</code> directory. It now fails explicitly if
<code>-mod=vendor</code> is set and information is requested for a module not
mentioned in <code>vendor/modules.txt</code>.
</p>
<h4 id="go-flags">Flags</h4>
<p><!-- golang.org/issue/32502, golang.org/issue/30345 -->
The <code>go</code> <code>get</code> command no longer accepts
the <code>-mod</code> flag. Previously, the flag's setting either
<a href="https://golang.org/issue/30345">was ignored</a> or
<a href="https://golang.org/issue/32502">caused the build to fail</a>.
</p>
<p><!-- golang.org/issue/33326 -->
<code>-mod=readonly</code> is now set by default when the <code>go.mod</code>
file is read-only and no top-level <code>vendor</code> directory is present.
</p>
<p><!-- golang.org/issue/31481 -->
<code>-modcacherw</code> is a new flag that instructs the <code>go</code>
command to leave newly-created directories in the module cache at their
default permissions rather than making them read-only.
The use of this flag makes it more likely that tests or other tools will
accidentally add files not included in the module's verified checksum.
However, it allows the use of <code>rm</code> <code>-rf</code>
(instead of <code>go</code> <code>clean</code> <code>-modcache</code>)
to remove the module cache.
</p>
<p><!-- golang.org/issue/34506 -->
<code>-modfile=file</code> is a new flag that instructs the <code>go</code>
command to read (and possibly write) an alternate <code>go.mod</code> file
instead of the one in the module root directory. A file
named <code>go.mod</code> must still be present in order to determine the
module root directory, but it is not accessed. When <code>-modfile</code> is
specified, an alternate <code>go.sum</code> file is also used: its path is
derived from the <code>-modfile</code> flag by trimming the <code>.mod</code>
extension and appending <code>.sum</code>.
</p>
<h4 id="go-env-vars">Environment variables</h4>
<p><!-- golang.org/issue/32966 -->
<code>GOINSECURE</code> is a new environment variable that instructs
the <code>go</code> command to not require an HTTPS connection, and to skip
certificate validation, when fetching certain modules directly from their
origins. Like the existing <code>GOPRIVATE</code> variable, the value
of <code>GOINSECURE</code> is a comma-separated list of glob patterns.
</p>
<h4 id="commands-outside-modules">Commands outside modules</h4>
<p><!-- golang.org/issue/32027 -->
When module-aware mode is enabled explicitly (by setting
<code>GO111MODULE=on</code>), most module commands have more
limited functionality if no <code>go.mod</code> file is present. For
example, <code>go</code> <code>build</code>,
<code>go</code> <code>run</code>, and other build commands can only build
packages in the standard library and packages specified as <code>.go</code>
files on the command line.
</p>
<p>
Previously, the <code>go</code> command would resolve each package path
to the latest version of a module but would not record the module path
or version. This resulted in <a href="https://golang.org/issue/32027">slow,
non-reproducible builds</a>.
</p>
<p>
<code>go</code> <code>get</code> continues to work as before, as do
<code>go</code> <code>mod</code> <code>download</code> and
<code>go</code> <code>list</code> <code>-m</code> with explicit versions.
</p>
<h4 id="incompatible-versions"><code>+incompatible</code> versions</h4>
<!-- golang.org/issue/34165 -->
<p>
If the latest version of a module contains a <code>go.mod</code> file,
<code>go</code> <code>get</code> will no longer upgrade to an
<a href="/cmd/go/#hdr-Module_compatibility_and_semantic_versioning">incompatible</a>
major version of that module unless such a version is requested explicitly
or is already required.
<code>go</code> <code>list</code> also omits incompatible major versions
for such a module when fetching directly from version control, but may
include them if reported by a proxy.
</p>
<h4 id="go.mod"><code>go.mod</code> file maintenance</h4>
<!-- golang.org/issue/34822 -->
<p>
<code>go</code> commands other than
<code>go</code> <code>mod</code> <code>tidy</code> no longer
remove a <code>require</code> directive that specifies a version of an indirect dependency
that is already implied by other (transitive) dependencies of the main
module.
</p>
<p>
<code>go</code> commands other than
<code>go</code> <code>mod</code> <code>tidy</code> no longer
edit the <code>go.mod</code> file if the changes are only cosmetic.
</p>
<p>
When <code>-mod=readonly</code> is set, <code>go</code> commands will no
longer fail due to a missing <code>go</code> directive or an erroneous
<code>//&nbsp;indirect</code> comment.
</p>
<h4 id="module-downloading">Module downloading</h4>
<p><!-- golang.org/issue/26092 -->
The <code>go</code> command now supports Subversion repositories in module mode.
</p>
<p><!-- golang.org/issue/30748 -->
The <code>go</code> command now includes snippets of plain-text error messages
from module proxies and other HTTP servers.
An error message will only be shown if it is valid UTF-8 and consists of only
graphic characters and spaces.
</p>
<h4 id="go-test">Testing</h4>
<p><!-- golang.org/issue/24929 -->
<code>go test -v</code> now streams <code>t.Log</code> output as it happens,
rather than at the end of all tests.
</p>
<h2 id="runtime">Runtime</h2>
<p><!-- CL 190098 -->
This release improves the performance of most uses
of <code>defer</code> to incur almost zero overhead compared to
calling the deferred function directly.
As a result, <code>defer</code> can now be used in
performance-critical code without overhead concerns.
</p>
<p><!-- CL 201760, CL 201762 and many others -->
Goroutines are now asynchronously preemptible.
As a result, loops without function calls no longer potentially
deadlock the scheduler or significantly delay garbage collection.
This is supported on all platforms except <code>windows/arm</code>,
<code>darwin/arm</code>, <code>js/wasm</code>, and
<code>plan9/*</code>.
</p>
<p>
A consequence of the implementation of preemption is that on Unix
systems, including Linux and macOS systems, programs built with Go
1.14 will receive more signals than programs built with earlier
releases.
This means that programs that use packages
like <a href="/pkg/syscall/"><code>syscall</code></a>
or <a href="https://godoc.org/golang.org/x/sys/unix"><code>golang.org/x/sys/unix</code></a>
will see more slow system calls fail with <code>EINTR</code> errors.
Those programs will have to handle those errors in some way, most
likely looping to try the system call again. For more
information about this
see <a href="http://man7.org/linux/man-pages/man7/signal.7.html"><code>man
7 signal</code></a> for Linux systems or similar documentation for
other systems.
</p>
<p><!-- CL 201765, CL 195701 and many others -->
The page allocator is more efficient and incurs significantly less
lock contention at high values of <code>GOMAXPROCS</code>.
This is most noticeable as lower latency and higher throughput for
large allocations being done in parallel and at a high rate.
</p>
<p><!-- CL 171844 and many others -->
Internal timers, used by
<a href="/pkg/time/#After"><code>time.After</code></a>,
<a href="/pkg/time/#Tick"><code>time.Tick</code></a>,
<a href="/pkg/net/#Conn"><code>net.Conn.SetDeadline</code></a>,
and friends, are more efficient, with less lock contention and fewer
context switches.
This is a performance improvement that should not cause any user
visible changes.
</p>
<h2 id="compiler">Compiler</h2>
<p><!-- CL 162237 -->
This release adds <code>-d=checkptr</code> as a compile-time option
for adding instrumentation to check that Go code is following
<code>unsafe.Pointer</code> safety rules dynamically.
This option is enabled by default (except on Windows) with
the <code>-race</code> or <code>-msan</code> flags, and can be
disabled with <code>-gcflags=all=-d=checkptr=0</code>.
Specifically, <code>-d=checkptr</code> checks the following:
</p>
<ol>
<li>
When converting <code>unsafe.Pointer</code> to <code>*T</code>,
the resulting pointer must be aligned appropriately
for <code>T</code>.
</li>
<li>
If the result of pointer arithmetic points into a Go heap object,
one of the <code>unsafe.Pointer</code>-typed operands must point
into the same object.
</li>
</ol>
<p>
Using <code>-d=checkptr</code> is not currently recommended on
Windows because it causes false alerts in the standard library.
</p>
<p><!-- CL 204338 -->
The compiler can now emit machine-readable logs of key optimizations
using the <code>-json</code> flag, including inlining, escape
analysis, bounds-check elimination, and nil-check elimination.
</p>
<p><!-- CL 196959 -->
Detailed escape analysis diagnostics (<code>-m=2</code>) now work again.
This had been dropped from the new escape analysis implementation in
the previous release.
</p>
<p><!-- CL 196217 -->
All Go symbols in macOS binaries now begin with an underscore,
following platform conventions.
</p>
<p><!-- CL 202117 -->
This release includes experimental support for compiler-inserted
coverage instrumentation for fuzzing.
See <a href="https://golang.org/issue/14565">issue 14565</a> for more
details.
This API may change in future releases.
</p>
<p><!-- CL 174704 --><!-- CL 196784 -->
Bounds check elimination now uses information from slice creation and can
eliminate checks for indexes with types smaller than <code>int</code>.
</p>
<h2 id="library">Core library</h2>
<h3 id="hash/maphash">New byte sequence hashing package</h3>
<p> <!-- golang.org/issue/28322, CL 186877 -->
Go 1.14 includes a new package,
<a href="/pkg/hash/maphash/"><code>hash/maphash</code></a>,
which provides hash functions on byte sequences.
These hash functions are intended to be used to implement hash tables or
other data structures that need to map arbitrary strings or byte
sequences to a uniform distribution on unsigned 64-bit integers.
</p>
<p>
The hash functions are collision-resistant but not cryptographically secure.
</p>
<p>
The hash value of a given byte sequence is consistent within a
single process, but will be different in different processes.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
As always, there are various minor changes and updates to the library,
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
in mind.
</p>
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
<dd>
<p><!-- CL 191976 -->
Support for SSL version 3.0 (SSLv3) has been removed. Note that SSLv3 is the
<a href="https://tools.ietf.org/html/rfc7568">cryptographically broken</a>
protocol predating TLS.
</p>
<p><!-- CL 191999 -->
TLS 1.3 can't be disabled via the <code>GODEBUG</code> environment
variable anymore. Use the
<a href="/pkg/crypto/tls/#Config.MaxVersion"><code>Config.MaxVersion</code></a>
field to configure TLS versions.
</p>
<p><!-- CL 205059 -->
When multiple certificate chains are provided through the
<a href="/pkg/crypto/tls/#Config.Certificates"><code>Config.Certificates</code></a>
field, the first one compatible with the peer is now automatically
selected. This allows for example providing an ECDSA and an RSA
certificate, and letting the package automatically select the best one.
Note that the performance of this selection is going to be poor unless the
<a href="/pkg/crypto/tls/#Certificate.Leaf"><code>Certificate.Leaf</code></a>
field is set. The
<a href="/pkg/crypto/tls/#Config.NameToCertificate"><code>Config.NameToCertificate</code></a>
field, which only supports associating a single certificate with
a give name, is now deprecated and should be left as <code>nil</code>.
Similarly the
<a href="/pkg/crypto/tls/#Config.BuildNameToCertificate"><code>Config.BuildNameToCertificate</code></a>
method, which builds the <code>NameToCertificate</code> field
from the leaf certificates, is now deprecated and should not be
called.
</p>
<p><!-- CL 175517 -->
The new <a href="/pkg/crypto/tls/#CipherSuites"><code>CipherSuites</code></a>
and <a href="/pkg/crypto/tls/#InsecureCipherSuites"><code>InsecureCipherSuites</code></a>
functions return a list of currently implemented cipher suites.
The new <a href="/pkg/crypto/tls/#CipherSuiteName"><code>CipherSuiteName</code></a>
function returns a name for a cipher suite ID.
</p>
<p><!-- CL 205058, 205057 -->
The new <a href="/pkg/crypto/tls/#ClientHelloInfo.SupportsCertificate">
<code>(*ClientHelloInfo).SupportsCertificate</code></a> and
<a href="/pkg/crypto/tls/#CertificateRequestInfo.SupportsCertificate">
<code>(*CertificateRequestInfo).SupportsCertificate</code></a>
methods expose whether a peer supports a certain certificate.
</p>
<p><!-- CL 174329 -->
The <code>tls</code> package no longer supports the legacy Next Protocol
Negotiation (NPN) extension and now only supports ALPN. In previous
releases it supported both. There are no API changes and applications
should function identically as before. Most other clients and servers have
already removed NPN support in favor of the standardized ALPN.
</p>
<p><!-- CL 205063, 205062 -->
RSA-PSS signatures are now used when supported in TLS 1.2 handshakes. This
won't affect most applications, but custom
<a href="/pkg/crypto/tls/#Certificate.PrivateKey"><code>Certificate.PrivateKey</code></a>
implementations that don't support RSA-PSS signatures will need to use the new
<a href="/pkg/crypto/tls/#Certificate.SupportedSignatureAlgorithms">
<code>Certificate.SupportedSignatureAlgorithms</code></a>
field to disable them.
</p>
<p><!-- CL 205059, 205059 -->
<a href="/pkg/crypto/tls/#Config.Certificates"><code>Config.Certificates</code></a> and
<a href="/pkg/crypto/tls/#Config.GetCertificate"><code>Config.GetCertificate</code></a>
can now both be nil if
<a href="/pkg/crypto/tls/#Config.GetConfigForClient"><code>Config.GetConfigForClient</code></a>
is set. If the callbacks return neither certificates nor an error, the
<code>unrecognized_name</code> is now sent.
</p>
<p><!-- CL 205058 -->
The new <a href="/pkg/crypto/tls/#CertificateRequestInfo.Version"><code>CertificateRequestInfo.Version</code></a>
field provides the TLS version to client certificates callbacks.
</p>
<p><!-- CL 205068 -->
The new <code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</code> and
<code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</code> constants use
the final names for the cipher suites previously referred to as
<code>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305</code> and
<code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305</code>.
</p>
</dd>
</dl><!-- crypto/tls -->
<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
<dd>
<p><!-- CL 204046 -->
<a href="/pkg/crypto/x509/#Certificate.CreateCRL"><code>Certificate.CreateCRL</code></a>
now supports Ed25519 issuers.
</p>
</dd>
</dl>
<dl id="debug/dwarf"><dt><a href="/pkg/debug/dwarf/">debug/dwarf</a></dt>
<dd>
<p><!-- CL 175138 -->
The <code>debug/dwarf</code> package now supports reading DWARF
version 5.
</p>
<p>
The new
method <a href="/pkg/debug/dwarf/#Data.AddSection"><code>(*Data).AddSection</code></a>
supports adding arbitrary new DWARF sections from the input file
to the DWARF <code>Data</code>.
</p>
<p><!-- CL 192698 -->
The new
method <a href="/pkg/debug/dwarf/#Reader.ByteOrder"><code>(*Reader).ByteOrder</code></a>
returns the byte order of the current compilation unit.
This may be used to interpret attributes that are encoded in the
native ordering, such as location descriptions.
</p>
<p><!-- CL 192699 -->
The new
method <a href="/pkg/debug/dwarf/#LineReader.Files"><code>(*LineReader).Files</code></a>
returns the file name table from a line reader.
This may be used to interpret the value of DWARF attributes such
as <code>AttrDeclFile</code>.
</p>
</dd>
</dl><!-- debug/dwarf -->
<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
<dd>
<p><!-- CL 126624 -->
<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a>
now supports ASN.1 string type BMPString, represented by the new
<a href="/pkg/encoding/asn1/#TagBMPString"><code>TagBMPString</code></a>
constant.
</p>
</dd>
</dl><!-- encoding/asn1 -->
<dl id="encoding/json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
<dd>
<p><!-- CL 200677 -->
The <a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a>
type supports a new
method <a href="/pkg/encoding/json/#Decoder.InputOffset"><code>InputOffset</code></a>
that returns the input stream byte offset of the current
decoder position.
</p>
<p><!-- CL 200217 -->
<a href="/pkg/encoding/json/#Compact"><code>Compact</code></a> no longer
escapes the <code>U+2028</code> and <code>U+2029</code> characters, which
was never a documented feature. For proper escaping, see <a
href="/pkg/encoding/json/#HTMLEscape"><code>HTMLEscape</code></a>.
</p>
<p><!-- CL 195045 -->
<a href="/pkg/encoding/json/#Number"><code>Number</code></a> no longer
accepts invalid numbers, to follow the documented behavior more closely.
If a program needs to accept invalid numbers like the empty string,
consider wrapping the type with <a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a>.
</p>
<p><!-- CL 200237 -->
<a href="/pkg/encoding/json/#Unmarshal"><code>Unmarshal</code></a>
can now support map keys with string underlying type which implement
<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>.
</p>
</dd>
</dl><!-- encoding/json -->
<dl id="go/build"><dt><a href="/pkg/go/build/">go/build</a></dt>
<dd>
<p><!-- CL 203820, 211657 -->
The <a href="/pkg/go/build/#Context"><code>Context</code></a>
type has a new field <code>Dir</code> which may be used to set
the working directory for the build.
The default is the current directory of the running process.
In module mode, this is used to locate the main module.
</p>
</dd>
</dl><!-- go/build -->
<dl id="go/doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
<dd>
<p><!-- CL 204830 -->
The new
function <a href="/pkg/go/doc/#NewFromFiles"><code>NewFromFiles</code></a>
computes package documentation from a list
of <code>*ast.File</code>'s and associates examples with the
appropriate package elements.
The new information is available in a new <code>Examples</code>
field
in the <a href="/pkg/go/doc/#Package"><code>Package</code></a>, <a href="/pkg/go/doc/#Type"><code>Type</code></a>,
and <a href="/pkg/go/doc/#Func"><code>Func</code></a> types, and a
new <a href="/pkg/go/doc/#Example.Suffix"><code>Suffix</code></a>
field in
the <a href="/pkg/go/doc/#Example"><code>Example</code></a>
type.
</p>
</dd>
</dl><!-- go/doc -->
<dl id="io/ioutil"><dt><a href="/pkg/io/ioutil/">io/ioutil</a></dt>
<dd>
<p><!-- CL 198488 -->
<a href="/pkg/io/ioutil/#TempDir"><code>TempDir</code></a> can now create directories
whose names have predictable prefixes and suffixes.
As with <a href="/pkg/io/ioutil/#TempFile"><code>TempFile</code></a>, if the pattern
contains a '*', the random string replaces the last '*'.
</p>
</dd>
</dl>
<dl id="log"><dt><a href="/pkg/log/">log</a></dt>
<dd>
<p><!-- CL 186182 -->
The
new <a href="https://tip.golang.org/pkg/log/#pkg-constants"><code>Lmsgprefix</code></a>
flag may be used to tell the logging functions to emit the
optional output prefix immediately before the log message rather
than at the start of the line.
</p>
</dd>
</dl><!-- log -->
<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
<dd>
<p><!-- CL 127458 -->
The new <a href="/pkg/math/#FMA"><code>FMA</code></a> function
computes <code>x*y+z</code> in floating point with no
intermediate rounding of the <code>x*y</code>
computation. Several architectures implement this computation
using dedicated hardware instructions for additional performance.
</p>
</dd>
</dl><!-- math -->
<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
<dd>
<p><!-- CL 164972 -->
The <a href="/pkg/math/big/#Int.GCD"><code>GCD</code></a> method
now allows the inputs <code>a</code> and <code>b</code> to be
zero or negative.
</p>
</dd>
</dl><!-- math/big -->
<dl id="math/bits"><dt><a href="/pkg/math/bits/">math/bits</a></dt>
<dd>
<p><!-- CL 197838 -->
The new functions
<a href="/pkg/math/bits/#Rem"><code>Rem</code></a>,
<a href="/pkg/math/bits/#Rem32"><code>Rem32</code></a>, and
<a href="/pkg/math/bits/#Rem64"><code>Rem64</code></a>
support computing a remainder even when the quotient overflows.
</p>
</dd>
</dl><!-- math/bits -->
<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
<dd>
<p><!-- CL 186927 -->
The default type of <code>.js</code> and <code>.mjs</code> files
is now <code>text/javascript</code> rather
than <code>application/javascript</code>.
This is in accordance
with <a href="https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/">an
IETF draft</a> that treats <code>application/javascript</code> as obsolete.
</p>
</dd>
</dl><!-- mime -->
<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
<dd>
<p>
The
new <a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a>
method <a href="/pkg/mime/multipart/#Reader.NextRawPart"><code>NextRawPart</code></a>
supports fetching the next MIME part without transparently
decoding <code>quoted-printable</code> data.
</p>
</dd>
</dl><!-- mime/multipart -->
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
<dd>
<p><!-- CL 200760 -->
The new <a href="/pkg/net/http/#Header"><code>Header</code></a>
method <a href="/pkg/net/http/#Header.Values"><code>Values</code></a>
can be used to fetch all values associated with a
canonicalized key.
</p>
<p><!-- CL 61291 -->
The
new <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
field <a href="/pkg/net/http/#Transport.DialTLSContext"><code>DialTLSContext</code></a>
can be used to specify an optional dial function for creating
TLS connections for non-proxied HTTPS requests.
This new field can be used instead
of <a href="/pkg/net/http/#Transport.DialTLS"><code>DialTLS</code></a>,
which is now considered deprecated; <code>DialTLS</code> will
continue to work, but new code should
use <code>DialTLSContext</code>, which allows the transport to
cancel dials as soon as they are no longer needed.
</p>
<p><!-- CL 192518, CL 194218 -->
On Windows, <a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a> now correctly
serves files larger than 2GB.
</p>
</dd>
</dl><!-- net/http -->
<dl id="net/http/httptest"><dt><a href="/pkg/net/http/httptest/">net/http/httptest</a></dt>
<dd>
<p><!-- CL 201557 -->
The
new <a href="/pkg/net/http/httptest/#Server"><code>Server</code></a>
field <a href="/pkg/net/http/httptest/#Server.EnableHTTP2"><code>EnableHTTP2</code></a>
supports enabling HTTP/2 on the test server.
</p>
</dd>
</dl><!-- net/http/httptest -->
<dl id="net/textproto"><dt><a href="/pkg/net/textproto/">net/textproto</a></dt>
<dd>
<p><!-- CL 200760 -->
The
new <a href="/pkg/net/textproto/#MIMEHeader"><code>MIMEHeader</code></a>
method <a href="/pkg/net/textproto/#MIMEHeader.Values"><code>Values</code></a>
can be used to fetch all values associated with a canonicalized
key.
</p>
</dd>
</dl><!-- net/textproto -->
<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
<dd>
<p><!-- CL 185117 -->
When parsing of a URL fails
(for example by <a href="/pkg/net/url/#Parse"><code>Parse</code></a>
or <a href="/pkg/net/url/#ParseRequestURI"><code>ParseRequestURI</code></a>),
the resulting <a href="/pkg/net/url/#Error.Error"><code>Error</code></a> message
will now quote the unparsable URL.
This provides clearer structure and consistency with other parsing errors.
</p>
</dd>
</dl><!-- net/url -->
<dl id="os/signal"><dt><a href="/pkg/os/signal/">os/signal</a></dt>
<dd>
<p><!-- CL 187739 -->
On Windows,
the <code>CTRL_CLOSE_EVENT</code>, <code>CTRL_LOGOFF_EVENT</code>,
and <code>CTRL_SHUTDOWN_EVENT</code> events now generate
a <code>syscall.SIGTERM</code> signal, similar to how Control-C
and Control-Break generate a <code>syscall.SIGINT</code> signal.
</p>
</dd>
</dl><!-- os/signal -->
<dl id="plugin"><dt><a href="/pkg/plugin/">plugin</a></dt>
<dd>
<p><!-- CL 191617 -->
The <code>plugin</code> package now supports <code>freebsd/amd64</code>.
</p>
</dd>
</dl><!-- plugin -->
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
<dd>
<p><!-- CL 85661 -->
<a href="/pkg/reflect#StructOf"><code>StructOf</code></a> now
supports creating struct types with unexported fields, by
setting the <code>PkgPath</code> field in
a <code>StructField</code> element.
</p>
</dd>
</dl><!-- reflect -->
<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p><!-- CL 200081 -->
<code>runtime.Goexit</code> can no longer be aborted by a
recursive <code>panic</code>/<code>recover</code>.
</p>
<p><!-- CL 188297, CL 191785 -->
On macOS, <code>SIGPIPE</code> is no longer forwarded to signal
handlers installed before the Go runtime is initialized.
This is necessary because macOS delivers <code>SIGPIPE</code>
<a href="https://golang.org/issue/33384">to the main thread</a>
rather than the thread writing to the closed pipe.
</p>
</dd>
</dl><!-- runtime -->
<dl id="runtime/pprof"><dt><a href="/pkg/runtime/pprof/">runtime/pprof</a></dt>
<dd>
<p><!-- CL 204636, 205097 -->
The generated profile no longer includes the pseudo-PCs used for inline
marks. Symbol information of inlined functions is encoded in
<a href="https://github.com/google/pprof/blob/5e96527/proto/profile.proto#L177-L184">the format</a>
the pprof tool expects. This is a fix for the regression introduced
during recent releases.
</p>
</dd>
</dl><!-- runtime/pprof -->
<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
<dd>
<p>
The <a href="/pkg/strconv/#NumError"><code>NumError</code></a>
type now has
an <a href="/pkg/strconv/#NumError.Unwrap"><code>Unwrap</code></a>
method that may be used to retrieve the reason that a conversion
failed.
This supports using <code>NumError</code> values
with <a href="/pkg/errors/#Is"><code>errors.Is</code></a> to see
if the underlying error
is <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrRange</code></a>
or <a href="/pkg/strconv/#pkg-variables"><code>strconv.ErrSyntax</code></a>.
</p>
</dd>
</dl><!-- strconv -->
<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
<dd>
<p><!-- CL 200577 -->
Unlocking a highly contended <code>Mutex</code> now directly
yields the CPU to the next goroutine waiting for
that <code>Mutex</code>. This significantly improves the
performance of highly contended mutexes on high CPU count
machines.
</p>
</dd>
</dl><!-- sync -->
<dl id="testing"><dt><a href="/pkg/testing/">testing</a></dt>
<dd>
<p><!-- CL 201359 -->
The testing package now supports cleanup functions, called after
a test or benchmark has finished, by calling
<a href="/pkg/testing#T.Cleanup"><code>T.Cleanup</code></a> or
<a href="/pkg/testing#B.Cleanup"><code>B.Cleanup</code></a> respectively.
</p>
</dd>
</dl><!-- testing -->
<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
<dd>
<p><!-- CL 206124 -->
The text/template package now correctly reports errors when a
parenthesized argument is used as a function.
This most commonly shows up in erroneous cases like
<code>{{if (eq .F "a") or (eq .F "b")}}</code>.
This should be written as <code>{{if or (eq .F "a") (eq .F "b")}}</code>.
The erroneous case never worked as expected, and will now be
reported with an error <code>can't give argument to non-function</code>.
</p>
</dd>
</dl><!-- text/template -->
<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
<dd>
<p>
The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
support throughout the system has been upgraded from Unicode 11.0 to
<a href="https://www.unicode.org/versions/Unicode12.0.0/">Unicode 12.0</a>,
which adds 554 new characters, including four new scripts, and 61 new emoji.
</p>
</dd>
</dl><!-- unicode -->

File diff suppressed because it is too large Load diff

View file

@ -1,953 +0,0 @@
<!--{
"Title": "Go 1.16 Release Notes",
"Path": "/doc/go1.16"
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<style>
main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.16</h2>
<p>
<strong>
Go 1.16 is not yet released. These are work-in-progress
release notes. Go 1.16 is expected to be released in February 2021.
</strong>
</p>
<h2 id="language">Changes to the language</h2>
<p>
There are no changes to the language.
</p>
<h2 id="ports">Ports</h2>
<h3 id="darwin">Darwin and iOS</h3>
<p><!-- golang.org/issue/38485, golang.org/issue/41385, CL 266373, more CLs -->
Go 1.16 adds support of 64-bit ARM architecture on macOS (also known as
Apple Silicon) with <code>GOOS=darwin</code>, <code>GOARCH=arm64</code>.
Like the <code>darwin/amd64</code> port, the <code>darwin/arm64</code>
port supports cgo, internal and external linking, <code>c-archive</code>,
<code>c-shared</code>, and <code>pie</code> build modes, and the race
detector.
</p>
<p><!-- CL 254740 -->
The iOS port, which was previously <code>darwin/arm64</code>, has
been renamed to <code>ios/arm64</code>. <code>GOOS=ios</code>
implies the
<code>darwin</code> build tag, just as <code>GOOS=android</code>
implies the <code>linux</code> build tag. This change should be
transparent to anyone using gomobile to build iOS apps.
</p>
<p><!-- golang.org/issue/42100, CL 263798 -->
Go 1.16 adds an <code>ios/amd64</code> port, which targets the iOS
simulator running on AMD64-based macOS. Previously this was
unofficially supported through <code>darwin/amd64</code> with
the <code>ios</code> build tag set.
</p>
<p><!-- golang.org/issue/23011 -->
Go 1.16 is the last release that will run on macOS 10.12 Sierra.
Go 1.17 will require macOS 10.13 High Sierra or later.
</p>
<h3 id="netbsd">NetBSD</h3>
<p><!-- golang.org/issue/30824 -->
Go now supports the 64-bit ARM architecture on NetBSD (the
<code>netbsd/arm64</code> port).
</p>
<h3 id="openbsd">OpenBSD</h3>
<p><!-- golang.org/issue/40995 -->
Go now supports the MIPS64 architecture on OpenBSD
(the <code>openbsd/mips64</code> port). This port does not yet
support cgo.
</p>
<h3 id="386">386</h3>
<p><!-- golang.org/issue/40255, golang.org/issue/41848, CL 258957, and CL 260017 -->
As <a href="go1.15#386">announced</a> in the Go 1.15 release notes,
Go 1.16 drops support for x87 mode compilation (<code>GO386=387</code>).
Support for non-SSE2 processors is now available using soft float
mode (<code>GO386=softfloat</code>).
Users running on non-SSE2 processors should replace <code>GO386=387</code>
with <code>GO386=softfloat</code>.
</p>
<h3 id="riscv">RISC-V</h3>
<p><!-- golang.org/issue/36641, CL 267317 -->
The <code>linux/riscv64</code> port now supports cgo and
<code>-buildmode=pie</code>. This release also includes performance
optimizations and code generation improvements for RISC-V.
</p>
<h2 id="tools">Tools</h2>
<h3 id="go-command">Go command</h3>
<h4 id="modules">Modules</h4>
<p><!-- golang.org/issue/41330 -->
Module-aware mode is enabled by default, regardless of whether a
<code>go.mod</code> file is present in the current working directory or a
parent directory. More precisely, the <code>GO111MODULE</code> environment
variable now defaults to <code>on</code>. To switch to the previous behavior,
set <code>GO111MODULE</code> to <code>auto</code>.
</p>
<p><!-- golang.org/issue/40728 -->
Build commands like <code>go</code> <code>build</code> and <code>go</code>
<code>test</code> no longer modify <code>go.mod</code> and <code>go.sum</code>
by default. Instead, they report an error if a module requirement or checksum
needs to be added or updated (as if the <code>-mod=readonly</code> flag were
used). Module requirements and sums may be adjusted with <code>go</code>
<code>mod</code> <code>tidy</code> or <code>go</code> <code>get</code>.
</p>
<p><!-- golang.org/issue/40276 -->
<code>go</code> <code>install</code> now accepts arguments with
version suffixes (for example, <code>go</code> <code>install</code>
<code>example.com/cmd@v1.0.0</code>). This causes <code>go</code>
<code>install</code> to build and install packages in module-aware mode,
ignoring the <code>go.mod</code> file in the current directory or any parent
directory, if there is one. This is useful for installing executables without
affecting the dependencies of the main module.
</p>
<p><!-- golang.org/issue/40276 -->
<code>go</code> <code>install</code>, with or without a version suffix (as
described above), is now the recommended way to build and install packages in
module mode. <code>go</code> <code>get</code> should be used with the
<code>-d</code> flag to adjust the current module's dependencies without
building packages, and use of <code>go</code> <code>get</code> to build and
install packages is deprecated. In a future release, the <code>-d</code> flag
will always be enabled.
</p>
<p><!-- golang.org/issue/24031 -->
<code>retract</code> directives may now be used in a <code>go.mod</code> file
to indicate that certain published versions of the module should not be used
by other modules. A module author may retract a version after a severe problem
is discovered or if the version was published unintentionally.<br>
</p>
<p><!-- golang.org/issue/26603 -->
The <code>go</code> <code>mod</code> <code>vendor</code>
and <code>go</code> <code>mod</code> <code>tidy</code> subcommands now accept
the <code>-e</code> flag, which instructs them to proceed despite errors in
resolving missing packages.
</p>
<p><!-- golang.org/issue/36465 -->
The <code>go</code> command now ignores requirements on module versions
excluded by <code>exclude</code> directives in the main module. Previously,
the <code>go</code> command used the next version higher than an excluded
version, but that version could change over time, resulting in
non-reproducible builds.
</p>
<h4 id="embed">Embedding Files</h4>
<p>
The <code>go</code> command now supports including
static files and file trees as part of the final executable,
using the new <code>//go:embed</code> directive.
See the documentation for the new
<a href="/pkg/embed/"><code>embed</code></a>
package for details.
</p>
<h4 id="go-test"><code>go</code> <code>test</code></h4>
<p><!-- golang.org/issue/29062 -->
When using <code>go</code> <code>test</code>, a test that
calls <code>os.Exit(0)</code> during execution of a test function
will now be considered to fail.
This will help catch cases in which a test calls code that calls
<code>os.Exit(0)</code> and thereby stops running all future tests.
If a <code>TestMain</code> function calls <code>os.Exit(0)</code>
that is still considered to be a passing test.
</p>
<p><!-- golang.org/issue/39484 -->
<code>go</code> <code>test</code> reports an error when the <code>-c</code>
or <code>-i</code> flags are used together with unknown flags. Normally,
unknown flags are passed to tests, but when <code>-c</code> or <code>-i</code>
are used, tests are not run.
</p>
<h4 id="go-get"><code>go</code> <code>get</code></h4>
<p><!-- golang.org/issue/37519 -->
The <code>go</code> <code>get</code> <code>-insecure</code> flag is
deprecated and will be removed in a future version. This flag permits
fetching from repositories and resolving custom domains using insecure
schemes such as HTTP, and also bypasses module sum validation using the
checksum database. To permit the use of insecure schemes, use the
<code>GOINSECURE</code> environment variable instead. To bypass module
sum validation, use <code>GOPRIVATE</code> or <code>GONOSUMDB</code>.
See <code>go</code> <code>help</code> <code>environment</code> for details.
</p>
<p><!-- golang.org/cl/263267 -->
<code>go</code> <code>get</code> <code>example.com/mod@patch</code> now
requires that some version of <code>example.com/mod</code> already be
required by the main module.
(However, <code>go</code> <code>get</code> <code>-u=patch</code> continues
to patch even newly-added dependencies.)
</p>
<h4 id="govcs"><code>GOVCS</code> environment variable</h4>
<p><!-- golang.org/issue/266420 -->
<code>GOVCS</code> is a new environment variable that limits which version
control tools the <code>go</code> command may use to download source code.
This mitigates security issues with tools that are typically used in trusted,
authenticated environments. By default, <code>git</code> and <code>hg</code>
may be used to download code from any repository. <code>svn</code>,
<code>bzr</code>, and <code>fossil</code> may only be used to download code
from repositories with module paths or package paths matching patterns in
the <code>GOPRIVATE</code> environment variable. See
<a href="/cmd/go/#hdr-Controlling_version_control_with_GOVCS"><code>go</code>
<code>help</code> <code>vcs</code></a> for details.
</p>
<h4 id="all-pattern">The <code>all</code> pattern</h4>
<p><!-- golang.org/cl/240623 -->
When the main module's <code>go.mod</code> file
declares <code>go</code> <code>1.16</code> or higher, the <code>all</code>
package pattern now matches only those packages that are transitively imported
by a package or test found in the main module. (Packages imported by <em>tests
of</em> packages imported by the main module are no longer included.) This is
the same set of packages retained
by <code>go</code> <code>mod</code> <code>vendor</code> since Go 1.11.
</p>
<h4 id="toolexec">The <code>-toolexec</code> build flag</h4>
<p><!-- golang.org/cl/263357 -->
When the <code>-toolexec</code> build flag is specified to use a program when
invoking toolchain programs like compile or asm, the environment variable
<code>TOOLEXEC_IMPORTPATH</code> is now set to the import path of the package
being built.
</p>
<h4 id="i-flag">The <code>-i</code> build flag</h4>
<p><!-- golang.org/issue/41696 -->
The <code>-i</code> flag accepted by <code>go</code> <code>build</code>,
<code>go</code> <code>install</code>, and <code>go</code> <code>test</code> is
now deprecated. The <code>-i</code> flag instructs the <code>go</code> command
to install packages imported by packages named on the command line. Since
the build cache was introduced in Go 1.10, the <code>-i</code> flag no longer
has a significant effect on build times, and it causes errors when the install
directory is not writable.
</p>
<h4 id="list-buildid">The <code>list</code> command</h4>
<p><!-- golang.org/cl/263542 -->
When the <code>-export</code> flag is specified, the <code>BuildID</code>
field is now set to the build ID of the compiled package. This is equivalent
to running <code>go</code> <code>tool</code> <code>buildid</code> on
<code>go</code> <code>list</code> <code>-exported</code> <code>-f</code> <code>{{.Export}</code>,
but without the extra step.
</p>
<h4 id="overlay-flag">The <code>-overlay</code> flag</h4>
<p><!-- golang.org/issue/39958 -->
The <code>-overlay</code> flag specifies a JSON configuration file containing
a set of file path replacements. The <code>-overlay</code> flag may be used
with all build commands and <code>go</code> <code>mod</code> subcommands.
It is primarily intended to be used by editor tooling such as gopls to
understand the effects of unsaved changes to source files. The config file
maps actual file paths to replacement file paths and the <code>go</code>
command and its builds will run as if the actual file paths exist with the
contents given by the replacement file paths, or don't exist if the replacement
file paths are empty.
</p>
<h3 id="cgo">Cgo</h3>
<p><!-- CL 252378 -->
The <a href="/cmd/cgo">cgo</a> tool will no longer try to translate
C struct bitfields into Go struct fields, even if their size can be
represented in Go. The order in which C bitfields appear in memory
is implementation dependent, so in some cases the cgo tool produced
results that were silently incorrect.
</p>
<h3 id="vet">Vet</h3>
<h4 id="vet-string-int">New warning for invalid testing.T use in
goroutines</h4>
<p><!-- CL 235677 -->
The vet tool now warns about invalid calls to the <code>testing.T</code>
method <code>Fatal</code> from within a goroutine created during the test.
This also warns on calls to <code>Fatalf</code>, <code>FailNow</code>, and
<code>Skip{,f,Now}</code> methods on <code>testing.T</code> tests or
<code>testing.B</code> benchmarks.
</p>
<p>
Calls to these methods stop the execution of the created goroutine and not
the <code>Test*</code> or <code>Benchmark*</code> function. So these are
<a href="/pkg/testing/#T.FailNow">required</a> to be called by the goroutine
running the test or benchmark function. For example:
</p>
<pre>
func TestFoo(t *testing.T) {
go func() {
if condition() {
t.Fatal("oops") // This exits the inner func instead of TestFoo.
}
...
}()
}
</pre>
<p>
Code calling <code>t.Fatal</code> (or a similar method) from a created
goroutine should be rewritten to signal the test failure using
<code>t.Error</code> and exit the goroutine early using an alternative
method, such as using a <code>return</code> statement. The previous example
could be rewritten as:
</p>
<pre>
func TestFoo(t *testing.T) {
go func() {
if condition() {
t.Error("oops")
return
}
...
}()
}
</pre>
<p><!-- CL 248686, CL 276372 -->
The vet tool now warns about amd64 assembly that clobbers the BP
register (the frame pointer) without saving and restoring it,
contrary to the calling convention. Code that doesn't preserve the
BP register must be modified to either not use BP at all or preserve
BP by saving and restoring it. An easy way to preserve BP is to set
the frame size to a nonzero value, which causes the generated
prologue and epilogue to preserve the BP register for you.
See <a href="https://golang.org/cl/248260">CL 248260</a> for example
fixes.
</p>
<h2 id="runtime">Runtime</h2>
<p>
The new <a href="/pkg/runtime/metrics/"><code>runtime/metrics</code></a> package
introduces a stable interface for reading
implementation-defined metrics from the Go runtime.
It supersedes existing functions like
<a href="/pkg/runtime/#ReadMemStats"><code>runtime.ReadMemStats</code></a>
and
<a href="/pkg/runtime/debug/#GCStats"><code>debug.GCStats</code></a>
and is significantly more general and efficient.
See the package documentation for more details.
</p>
<p><!-- CL 254659 -->
Setting the <code>GODEBUG</code> environment variable
to <code>inittrace=1</code> now causes the runtime to emit a single
line to standard error for each package <code>init</code>,
summarizing its execution time and memory allocation. This trace can
be used to find bottlenecks or regressions in Go startup
performance.
The <a href="/pkg/runtime/#hdr-Environment_Variables"><code>GODEBUG</code>
documentation</a> describes the format.
</p>
<p><!-- CL 267100 -->
On Linux, the runtime now defaults to releasing memory to the
operating system promptly (using <code>MADV_DONTNEED</code>), rather
than lazily when the operating system is under memory pressure
(using <code>MADV_FREE</code>). This means process-level memory
statistics like RSS will more accurately reflect the amount of
physical memory being used by Go processes. Systems that are
currently using <code>GODEBUG=madvdontneed=1</code> to improve
memory monitoring behavior no longer need to set this environment
variable.
</p>
<p><!-- CL 220419, CL 271987 -->
Go 1.16 fixes a discrepancy between the race detector and
the <a href="/ref/mem">Go memory model</a>. The race detector now
more precisely follows the channel synchronization rules of the
memory model. As a result, the detector may now report races it
previously missed.
</p>
<h2 id="compiler">Compiler</h2>
<p><!-- CL 256459, CL 264837, CL 266203, CL 256460 -->
The compiler can now inline functions with
non-labeled <code>for</code> loops, method values, and type
switches. The inliner can also detect more indirect calls where
inlining is possible.
</p>
<h2 id="linker">Linker</h2>
<p><!-- CL 248197 -->
This release includes additional improvements to the Go linker,
reducing linker resource usage (both time and memory) and improving
code robustness/maintainability. These changes form the second half
of a two-release project to
<a href="https://golang.org/s/better-linker">modernize the Go
linker</a>.
</p>
<p>
The linker changes in 1.16 extend the 1.15 improvements to all
supported architecture/OS combinations (the 1.15 performance improvements
were primarily focused on <code>ELF</code>-based OSes and
<code>amd64</code> architectures). For a representative set of
large Go programs, linking is 20-25% faster than 1.15 and requires
5-15% less memory on average for <code>linux/amd64</code>, with larger
improvements for other architectures and OSes. Most binaries are
also smaller as a result of more aggressive symbol pruning.
</p>
<p><!-- CL 255259 -->
On Windows, <code>go build -buildmode=c-shared</code> now generates Windows
ASLR DLLs by default. ASLR can be disabled with <code>--ldflags=-aslr=false</code>.
</p>
<h2 id="library">Core library</h2>
<h3 id="library-embed">Embedded Files</h3>
<p>
The new <a href="/pkg/embed/"><code>embed</code></a> package
provides access to files embedded in the program during compilation
using the new <a href="#embed"><code>//go:embed</code> directive</a>.
</p>
<h3 id="fs">File Systems</h3>
<p>
The new <a href="/pkg/io/fs/"><code>io/fs</code></a> package
defines an abstraction for read-only trees of files,
the <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a> interface,
and the standard library packages have
been adapted to make use of the interface as appropriate.
</p>
<p>
On the producer side of the interface,
the new <a href="/pkg/embed/#FS"><code>embed.FS</code></a> type
implements <code>fs.FS</code>, as does
<a href="/pkg/archive/zip/#Reader"><code>zip.Reader</code></a>.
The new <a href="/pkg/os/#DirFS"><code>os.DirFS</code></a> function
provides an implementation of <code>fs.FS</code> backed by a tree
of operating system files.
</p>
<p>
On the consumer side,
the new <a href="/pkg/net/http/#FS"><code>http.FS</code></a>
function converts an <code>fs.FS</code> to an
<a href="/pkg/net/http/#Handler"><code>http.Handler</code></a>.
Also, the <a href="/pkg/html/template/"><code>html/template</code></a>
and <a href="/pkg/text/template/"><code>text/template</code></a>
packages <a href="/pkg/html/template/#ParseFS"><code>ParseFS</code></a>
functions and methods read templates from an <code>fs.FS</code>.
</p>
<p>
For testing code that implements <code>fs.FS</code>,
the new <a href="/pkg/testing/fstest/"><code>testing/fstest</code></a>
package provides a <a href="/pkg/testing/fstest/#TestFS"><code>TestFS</code></a>
function that checks for and reports common mistakes.
It also provides a simple in-memory file system implementation,
<a href="/pkg/testing/fstest/#MapFS"><code>MapFS</code></a>,
which can be useful for testing code that accepts <code>fs.FS</code>
implementations.
</p>
<!-- okay-after-beta1
TODO: decide if any additional changes are worth factoring out from
"Minor changes to the library" and highlighting in "Core library"
-->
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
As always, there are various minor changes and updates to the library,
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
in mind.
</p>
<dl id="crypto/dsa"><dt><a href="/pkg/crypto/dsa/">crypto/dsa</a></dt>
<dd>
<p><!-- CL 257939 -->
The <a href="/pkg/crypto/dsa/"><code>crypto/dsa</code></a> package is now deprecated.
See <a href="https://golang.org/issue/40337">issue #40337</a>.
</p>
</dd>
</dl><!-- crypto/dsa -->
<dl id="crypto/hmac"><dt><a href="/pkg/crypto/hmac/">crypto/hmac</a></dt>
<dd>
<p><!-- CL 261960 -->
<a href="/pkg/crypto/hmac/#New"><code>New</code></a> will now panic if
separate calls to the hash generation function fail to return new values.
Previously, the behavior was undefined and invalid outputs were sometimes
generated.
</p>
</dd>
</dl><!-- crypto/hmac -->
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
<dd>
<p><!-- CL 256897 -->
I/O operations on closing or closed TLS connections can now be detected
using the new <a href="/pkg/net/#ErrClosed"><code>net.ErrClosed</code></a>
error. A typical use would be <code>errors.Is(err, net.ErrClosed)</code>.
</p>
<p><!-- CL 266037 -->
A default write deadline is now set in
<a href="/pkg/crypto/tls/#Conn.Close"><code>Conn.Close</code></a>
before sending the "close notify" alert, in order to prevent blocking
indefinitely.
</p>
<p><!-- CL 239748 -->
Clients now return a handshake error if the server selects
<a href="/pkg/crypto/tls/#ConnectionState.NegotiatedProtocol">
an ALPN protocol</a> that was not in
<a href="/pkg/crypto/tls/#Config.NextProtos">
the list advertised by the client</a>.
</p>
<p><!-- CL 262857 -->
Servers will now prefer other available AEAD cipher suites (such as ChaCha20Poly1305)
over AES-GCM cipher suites if either the client or server doesn't have AES hardware
support, unless both <a href="/pkg/crypto/tls/#Config.PreferServerCipherSuites">
<code>Config.PreferServerCipherSuites</code></a>
and <a href="/pkg/crypto/tls/#Config.CipherSuites"><code>Config.CipherSuites</code></a>
are set. The client is assumed not to have AES hardware support if it does
not signal a preference for AES-GCM cipher suites.
</p>
<p><!-- CL 246637 -->
<a href="/pkg/crypto/tls/#Config.Clone"><code>Config.Clone</code></a> now
returns nil if the receiver is nil, rather than panicking.
</p>
</dd>
</dl><!-- crypto/tls -->
<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
<dd>
<p>
The <code>GODEBUG=x509ignoreCN=0</code> flag will be removed in Go 1.17.
It enables the legacy behavior of treating the <code>CommonName</code>
field on X.509 certificates as a host name when no Subject Alternative
Names are present.
</p>
<p><!-- CL 235078 -->
<a href="/pkg/crypto/x509/#ParseCertificate"><code>ParseCertificate</code></a> and
<a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
now enforce string encoding restrictions for the <code>DNSNames</code>,
<code>EmailAddresses</code>, and <code>URIs</code> fields. These fields
can only contain strings with characters within the ASCII range.
</p>
<p><!-- CL 259697 -->
<a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
now verifies the generated certificate's signature using the signer's
public key. If the signature is invalid, an error is returned, instead of
a malformed certificate.
</p>
<p><!-- CL 233163 -->
A number of additional fields have been added to the
<a href="/pkg/crypto/x509/#CertificateRequest"><code>CertificateRequest</code></a> type.
These fields are now parsed in <a href="/pkg/crypto/x509/#ParseCertificateRequest">
<code>ParseCertificateRequest</code></a> and marshalled in
<a href="/pkg/crypto/x509/#CreateCertificateRequest"><code>CreateCertificateRequest</code></a>.
</p>
<p><!-- CL 257939 -->
DSA signature verification is no longer supported. Note that DSA signature
generation was never supported.
See <a href="https://golang.org/issue/40337">issue #40337</a>.
</p>
<p><!-- CL 257257 -->
On Windows, <a href="/pkg/crypto/x509/#Certificate.Verify"><code>Certificate.Verify</code></a>
will now return all certificate chains that are built by the platform
certificate verifier, instead of just the highest ranked chain.
</p>
<p><!-- CL 262343 -->
The new <a href="/pkg/crypto/x509/#SystemRootsError.Unwrap"><code>SystemRootsError.Unwrap</code></a>
method allows accessing the <a href="/pkg/crypto/x509/#SystemRootsError.Err"><code>Err</code></a>
field through the <a href="/pkg/errors"><code>errors</code></a> package functions.
</p>
</dd>
</dl><!-- crypto/x509 -->
<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1">encoding/asn1</a></dt>
<dd>
<p><!-- CL 255881 -->
<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> and
<a href="/pkg/encoding/asn1/#UnmarshalWithParams"><code>UnmarshalWithParams</code></a>
now return an error instead of panicking when the argument is not
a pointer or is nil. This change matches the behavior of other
encoding packages such as <a href="/pkg/encoding/json"><code>encoding/json</code></a>.
</p>
</dd>
</dl>
<dl id="encoding/json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
<dd>
<p><!-- CL 234818 -->
The <code>json</code> struct field tags understood by
<a href="/pkg/encoding/json/#Marshal"><code>Marshal</code></a>,
<a href="/pkg/encoding/json/#Unmarshal"><code>Unmarshal</code></a>,
and related functionality now permit semicolon characters within
a JSON object name for a Go struct field.
</p>
</dd>
</dl><!-- encoding/json -->
<dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
<dd>
<p><!-- CL 264024 -->
The encoder has always taken care to avoid using namespace prefixes
beginning with <code>xml</code>, which are reserved by the XML
specification.
Now, following the specification more closely, that check is
case-insensitive, so that prefixes beginning
with <code>XML</code>, <code>XmL</code>, and so on are also
avoided.
</p>
</dd>
</dl><!-- encoding/xml -->
<dl id="flag"><dt><a href="/pkg/flag/">flag</a></dt>
<dd>
<p><!-- CL 240014 -->
The new <a href="/pkg/flag/#Func"><code>Func</code></a> function
allows registering a flag implemented by calling a function,
as a lighter-weight alternative to implementing the
<a href="/pkg/flag/#Value"><code>Value</code></a> interface.
</p>
</dd>
</dl><!-- flag -->
<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
<dd>
<p><!-- CL 261577 -->
The package now defines a
<a href="/pkg/io/#ReadSeekCloser"><code>ReadSeekCloser</code></a> interface.
</p>
</dd>
</dl><!-- io -->
<dl id="log"><dt><a href="/pkg/log/">log</a></dt>
<dd>
<p><!-- CL 264460 -->
The new <a href="/pkg/log/#Default"><code>Default</code></a> function
provides access to the default <a href="/pkg/log/#Logger"><code>Logger</code></a>.
</p>
</dd>
</dl><!-- log -->
<dl id="log/syslog"><dt><a href="/pkg/log/syslog/">log/syslog</a></dt>
<dd>
<p><!-- CL 264297 -->
The <a href="/pkg/log/syslog/#Writer"><code>Writer</code></a>
now uses the local message format
(omitting the host name and using a shorter time stamp)
when logging to custom Unix domain sockets,
matching the format already used for the default log socket.
</p>
</dd>
</dl><!-- log/syslog -->
<dl id="mime/multipart"><dt><a href="/pkg/mime/multipart/">mime/multipart</a></dt>
<dd>
<p><!-- CL 247477 -->
The <a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a>'s
<a href="/pkg/mime/multipart/#Reader.ReadForm"><code>ReadForm</code></a>
method no longer rejects form data
when passed the maximum int64 value as a limit.
</p>
</dd>
</dl><!-- mime/multipart -->
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd>
<p><!-- CL 250357 -->
The case of I/O on a closed network connection, or I/O on a network
connection that is closed before any of the I/O completes, can now
be detected using the new <a href="/pkg/net/#ErrClosed"><code>ErrClosed</code></a>
error. A typical use would be <code>errors.Is(err, net.ErrClosed)</code>.
In earlier releases the only way to reliably detect this case was to
match the string returned by the <code>Error</code> method
with <code>"use of closed network connection"</code>.
</p>
<p><!-- CL 255898 -->
In previous Go releases the default TCP listener backlog size on Linux systems,
set by <code>/proc/sys/net/core/somaxconn</code>, was limited to a maximum of <code>65535</code>.
On Linux kernel version 4.1 and above, the maximum is now <code>4294967295</code>.
</p>
<p><!-- CL 238629 -->
On Linux, host name lookups no longer use DNS before checking
<code>/etc/hosts</code> when <code>/etc/nsswitch.conf</code>
is missing; this is common on musl-based systems and makes
Go programs match the behavior of C programs on those systems.
</p>
</dd>
</dl><!-- net -->
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
<dd>
<p><!-- CL 233637 -->
In the <a href="/pkg/net/http/"><code>net/http</code></a> package, the
behavior of <a href="/pkg/net/http/#StripPrefix"><code>StripPrefix</code></a>
has been changed to strip the prefix from the request URL's
<code>RawPath</code> field in addition to its <code>Path</code> field.
In past releases, only the <code>Path</code> field was trimmed, and so if the
request URL contained any escaped characters the URL would be modified to
have mismatched <code>Path</code> and <code>RawPath</code> fields.
In Go 1.16, <code>StripPrefix</code> trims both fields.
If there are escaped characters in the prefix part of the request URL the
handler serves a 404 instead of its previous behavior of invoking the
underlying handler with a mismatched <code>Path</code>/<code>RawPath</code> pair.
</p>
<p><!-- CL 252497 -->
The <a href="/pkg/net/http/"><code>net/http</code></a> package now rejects HTTP range requests
of the form <code>"Range": "bytes=--N"</code> where <code>"-N"</code> is a negative suffix length, for
example <code>"Range": "bytes=--2"</code>. It now replies with a <code>416 "Range Not Satisfiable"</code> response.
</p>
<p><!-- CL 256498, golang.org/issue/36990 -->
Cookies set with <a href="/pkg/net/http/#SameSiteDefaultMode"><code>SameSiteDefaultMode</code></a>
now behave according to the current spec (no attribute is set) instead of
generating a SameSite key without a value.
</p>
<p><!-- CL 250039 -->
The <a href="/pkg/net/http/#Client">Client</a> now sends
an explicit <code>Content-Length:</code> <code>0</code>
header in <code>PATCH</code> requests with empty bodies,
matching the existing behavior of <code>POST</code> and <code>PUT</code>.
</p>
<p><!-- CL 249440 -->
The <a href="/pkg/net/http/#ProxyFromEnvironment"><code>ProxyFromEnvironment</code></a>
function no longer returns the setting of the <code>HTTP_PROXY</code>
environment variable for <code>https://</code> URLs when
<code>HTTPS_PROXY</code> is unset.
</p>
</dd>
</dl><!-- net/http -->
<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
<dd>
<p><!-- CL 260637 -->
<a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a>
now flushes buffered data more aggressively when proxying
streamed responses with unknown body lengths.
</p>
</dd>
</dl><!-- net/http/httputil -->
<dl id="net/smtp"><dt><a href="/pkg/net/smtp/">net/smtp</a></dt>
<dd>
<p><!-- CL 247257 -->
The <a href="/pkg/net/smtp/#Client">Client</a>'s
<a href="/pkg/net/smtp/#Client.Mail"><code>Mail</code></a>
method now sends the <code>SMTPUTF8</code> directive to
servers that support it, signaling that addresses are encoded in UTF-8.
</p>
</dd>
</dl><!-- net/smtp -->
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
<dd>
<p><!-- CL 242998 -->
<a href="/pkg/os/#Process.Signal"><code>Process.Signal</code></a> now
returns <a href="/pkg/os/#ErrProcessDone"><code>ErrProcessDone</code></a>
instead of the unexported <code>errFinished</code> when the process has
already finished.
</p>
</dd>
</dl><!-- os -->
<dl id="os/signal"><dt><a href="/pkg/os/signal/">os/signal</a></dt>
<dd>
<p><!-- CL 219640 -->
The new
<a href="/pkg/os/signal/#NotifyContext"><code>NotifyContext</code></a>
function allows creating contexts that are canceled upon arrival of
specific signals.
</p>
</dd>
</dl><!-- os/signal -->
<dl id="path"><dt><a href="/pkg/path/">path</a></dt>
<dd>
<p><!-- CL 264397, golang.org/issues/28614 -->
The <a href="/pkg/path/#Match"><code>Match</code></a> function now
returns an error if the unmatched part of the pattern has a
syntax error. Previously, the function returned early on a failed
match, and thus did not report any later syntax error in the
pattern.
</p>
</dd>
</dl><!-- path -->
<dl id="path/filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
<dd>
<p><!-- CL 264397, golang.org/issues/28614 -->
The <a href="/pkg/path/filepath#Match"><code>Match</code></a> and
<a href="/pkg/path/filepath#Glob"><code>Glob</code></a> functions now
return an error if the unmatched part of the pattern has a
syntax error. Previously, the functions returned early on a failed
match, and thus did not report any later syntax error in the
pattern.
</p>
</dd>
</dl><!-- path/filepath -->
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
<dd>
<p><!-- CL 248341, golang.org/issues/40281 -->
<a href="/pkg/reflect/#StructTag"><code>StructTag</code></a>
now allows multiple space-separated keys in key:value pairs,
as in <code>`json xml:"field1"`</code> (equivalent to
<code>`json:"field1" xml:"field1"`</code>).
</p>
</dd>
</dl><!-- reflect -->
<dl id="runtime/debug"><dt><a href="/pkg/runtime/debug/">runtime/debug</a></dt>
<dd>
<p><!-- CL 249677 -->
The <a href="/pkg/runtime#Error"><code>runtime.Error</code></a> values
used when <code>SetPanicOnFault</code> is enabled may now have an
<code>Addr</code> method. If that method exists, it returns the memory
address that triggered the fault.
</p>
</dd>
</dl><!-- runtime/debug -->
<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
<dd>
<p><!-- CL 260858 -->
<a href="/pkg/strconv/#ParseFloat"><code>ParseFloat</code></a> now uses
the <a
href="https://nigeltao.github.io/blog/2020/eisel-lemire.html">Eisel-Lemire
algorithm</a>, improving performance by up to a factor of 2. This can
also speed up decoding textual formats like <a
href="/pkg/encoding/json/"><code>encoding/json</code></a>.
</p>
</dd>
</dl><!-- strconv -->
<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
<dd>
<p><!-- CL 263271 -->
<a href="/pkg/syscall/?GOOS=windows#NewCallback"><code>NewCallback</code></a>
and
<a href="/pkg/syscall/?GOOS=windows#NewCallbackCDecl"><code>NewCallbackCDecl</code></a>
now correctly support callback functions with multiple
sub-<code>uintptr</code>-sized arguments in a row. This may
require changing uses of these functions to eliminate manual
padding between small arguments.
</p>
<p><!-- CL 261917 -->
<a href="/pkg/syscall/?GOOS=windows#SysProcAttr"><code>SysProcAttr</code></a> on Windows has a new NoInheritHandles field that disables inheriting handles when creating a new process.
</p>
<p><!-- CL 269761, golang.org/issue/42584 -->
<a href="/pkg/syscall/?GOOS=windows#DLLError"><code>DLLError</code></a> on Windows now has an Unwrap function for unwrapping its underlying error.
</p>
<p><!-- CL 210639 -->
On Linux,
<a href="/pkg/syscall/#Setgid"><code>Setgid</code></a>,
<a href="/pkg/syscall/#Setuid"><code>Setuid</code></a>,
and related calls are now implemented.
Previously, they returned an <code>syscall.EOPNOTSUPP</code> error.
</p>
</dd>
</dl><!-- syscall -->
<dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
<dd>
<p><!-- CL 254257, golang.org/issue/29770 -->
Newlines characters are now allowed inside action delimiters,
permitting actions to span multiple lines.
</p>
</dd>
</dl><!-- text/template -->
<dl id="text/template/parse"><dt><a href="/pkg/text/template/parse/">text/template/parse</a></dt>
<dd>
<p><!-- CL 229398, golang.org/issue/34652 -->
A new <a href="/pkg/text/template/parse/#CommentNode"><code>CommentNode</code></a>
was added to the parse tree. The <a href="/pkg/text/template/parse/#Mode"><code>Mode</code></a>
field in the <code>parse.Tree</code> enables access to it.
</p>
</dd>
</dl><!-- text/template/parse -->
<dl id="time/tzdata"><dt><a href="/pkg/time/tzdata/">time/tzdata</a></dt>
<dd>
<p><!-- CL 261877 -->
The slim timezone data format is now used for the timezone database in
<code>$GOROOT/lib/time/zoneinfo.zip</code> and the embedded copy in this
package. This reduces the size of the timezone database by about 350 KB.
</p>
</dd>
</dl><!-- time/tzdata -->
<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
<dd>
<p><!-- CL 248765 -->
The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
support throughout the system has been upgraded from Unicode 12.0.0 to
<a href="https://www.unicode.org/versions/Unicode13.0.0/">Unicode 13.0.0</a>,
which adds 5,930 new characters, including four new scripts, and 55 new emoji.
Unicode 13.0.0 also designates plane 3 (U+30000-U+3FFFF) as the tertiary
ideographic plane.
</p>
</dd>
</dl><!-- unicode -->

1175
doc/go1.17.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,979 +0,0 @@
<!--{
"Title": "Go 1.2 Release Notes",
"Path": "/doc/go1.2",
"Template": true
}-->
<h2 id="introduction">Introduction to Go 1.2</h2>
<p>
Since the release of <a href="/doc/go1.1.html">Go version 1.1</a> in April, 2013,
the release schedule has been shortened to make the release process more efficient.
This release, Go version 1.2 or Go 1.2 for short, arrives roughly six months after 1.1,
while 1.1 took over a year to appear after 1.0.
Because of the shorter time scale, 1.2 is a smaller delta than the step from 1.0 to 1.1,
but it still has some significant developments, including
a better scheduler and one new language feature.
Of course, Go 1.2 keeps the <a href="/doc/go1compat.html">promise
of compatibility</a>.
The overwhelming majority of programs built with Go 1.1 (or 1.0 for that matter)
will run without any changes whatsoever when moved to 1.2,
although the introduction of one restriction
to a corner of the language may expose already-incorrect code
(see the discussion of the <a href="#use_of_nil">use of nil</a>).
</p>
<h2 id="language">Changes to the language</h2>
<p>
In the interest of firming up the specification, one corner case has been clarified,
with consequences for programs.
There is also one new language feature.
</p>
<h3 id="use_of_nil">Use of nil</h3>
<p>
The language now specifies that, for safety reasons,
certain uses of nil pointers are guaranteed to trigger a run-time panic.
For instance, in Go 1.0, given code like
</p>
<pre>
type T struct {
X [1<<24]byte
Field int32
}
func main() {
var x *T
...
}
</pre>
<p>
the <code>nil</code> pointer <code>x</code> could be used to access memory incorrectly:
the expression <code>x.Field</code> could access memory at address <code>1<<24</code>.
To prevent such unsafe behavior, in Go 1.2 the compilers now guarantee that any indirection through
a nil pointer, such as illustrated here but also in nil pointers to arrays, nil interface values,
nil slices, and so on, will either panic or return a correct, safe non-nil value.
In short, any expression that explicitly or implicitly requires evaluation of a nil address is an error.
The implementation may inject extra tests into the compiled program to enforce this behavior.
</p>
<p>
Further details are in the
<a href="//golang.org/s/go12nil">design document</a>.
</p>
<p>
<em>Updating</em>:
Most code that depended on the old behavior is erroneous and will fail when run.
Such programs will need to be updated by hand.
</p>
<h3 id="three_index">Three-index slices</h3>
<p>
Go 1.2 adds the ability to specify the capacity as well as the length when using a slicing operation
on an existing array or slice.
A slicing operation creates a new slice by describing a contiguous section of an already-created array or slice:
</p>
<pre>
var array [10]int
slice := array[2:4]
</pre>
<p>
The capacity of the slice is the maximum number of elements that the slice may hold, even after reslicing;
it reflects the size of the underlying array.
In this example, the capacity of the <code>slice</code> variable is 8.
</p>
<p>
Go 1.2 adds new syntax to allow a slicing operation to specify the capacity as well as the length.
A second
colon introduces the capacity value, which must be less than or equal to the capacity of the
source slice or array, adjusted for the origin. For instance,
</p>
<pre>
slice = array[2:4:7]
</pre>
<p>
sets the slice to have the same length as in the earlier example but its capacity is now only 5 elements (7-2).
It is impossible to use this new slice value to access the last three elements of the original array.
</p>
<p>
In this three-index notation, a missing first index (<code>[:i:j]</code>) defaults to zero but the other
two indices must always be specified explicitly.
It is possible that future releases of Go may introduce default values for these indices.
</p>
<p>
Further details are in the
<a href="//golang.org/s/go12slice">design document</a>.
</p>
<p>
<em>Updating</em>:
This is a backwards-compatible change that affects no existing programs.
</p>
<h2 id="impl">Changes to the implementations and tools</h2>
<h3 id="preemption">Pre-emption in the scheduler</h3>
<p>
In prior releases, a goroutine that was looping forever could starve out other
goroutines on the same thread, a serious problem when GOMAXPROCS
provided only one user thread.
In Go 1.2, this is partially addressed: The scheduler is invoked occasionally
upon entry to a function.
This means that any loop that includes a (non-inlined) function call can
be pre-empted, allowing other goroutines to run on the same thread.
</p>
<h3 id="thread_limit">Limit on the number of threads</h3>
<p>
Go 1.2 introduces a configurable limit (default 10,000) to the total number of threads
a single program may have in its address space, to avoid resource starvation
issues in some environments.
Note that goroutines are multiplexed onto threads so this limit does not directly
limit the number of goroutines, only the number that may be simultaneously blocked
in a system call.
In practice, the limit is hard to reach.
</p>
<p>
The new <a href="/pkg/runtime/debug/#SetMaxThreads"><code>SetMaxThreads</code></a> function in the
<a href="/pkg/runtime/debug/"><code>runtime/debug</code></a> package controls the thread count limit.
</p>
<p>
<em>Updating</em>:
Few functions will be affected by the limit, but if a program dies because it hits the
limit, it could be modified to call <code>SetMaxThreads</code> to set a higher count.
Even better would be to refactor the program to need fewer threads, reducing consumption
of kernel resources.
</p>
<h3 id="stack_size">Stack size</h3>
<p>
In Go 1.2, the minimum size of the stack when a goroutine is created has been lifted from 4KB to 8KB.
Many programs were suffering performance problems with the old size, which had a tendency
to introduce expensive stack-segment switching in performance-critical sections.
The new number was determined by empirical testing.
</p>
<p>
At the other end, the new function <a href="/pkg/runtime/debug/#SetMaxStack"><code>SetMaxStack</code></a>
in the <a href="/pkg/runtime/debug"><code>runtime/debug</code></a> package controls
the <em>maximum</em> size of a single goroutine's stack.
The default is 1GB on 64-bit systems and 250MB on 32-bit systems.
Before Go 1.2, it was too easy for a runaway recursion to consume all the memory on a machine.
</p>
<p>
<em>Updating</em>:
The increased minimum stack size may cause programs with many goroutines to use
more memory. There is no workaround, but plans for future releases
include new stack management technology that should address the problem better.
</p>
<h3 id="cgo_and_cpp">Cgo and C++</h3>
<p>
The <a href="/cmd/cgo/"><code>cgo</code></a> command will now invoke the C++
compiler to build any pieces of the linked-to library that are written in C++;
<a href="/cmd/cgo/">the documentation</a> has more detail.
</p>
<h3 id="go_tools_godoc">Godoc and vet moved to the go.tools subrepository</h3>
<p>
Both binaries are still included with the distribution, but the source code for the
godoc and vet commands has moved to the
<a href="//code.google.com/p/go.tools">go.tools</a> subrepository.
</p>
<p>
Also, the core of the godoc program has been split into a
<a href="https://code.google.com/p/go/source/browse/?repo=tools#hg%2Fgodoc">library</a>,
while the command itself is in a separate
<a href="https://code.google.com/p/go/source/browse/?repo=tools#hg%2Fcmd%2Fgodoc">directory</a>.
The move allows the code to be updated easily and the separation into a library and command
makes it easier to construct custom binaries for local sites and different deployment methods.
</p>
<p>
<em>Updating</em>:
Since godoc and vet are not part of the library,
no client Go code depends on the their source and no updating is required.
</p>
<p>
The binary distributions available from <a href="//golang.org">golang.org</a>
include these binaries, so users of these distributions are unaffected.
</p>
<p>
When building from source, users must use "go get" to install godoc and vet.
(The binaries will continue to be installed in their usual locations, not
<code>$GOPATH/bin</code>.)
</p>
<pre>
$ go get code.google.com/p/go.tools/cmd/godoc
$ go get code.google.com/p/go.tools/cmd/vet
</pre>
<h3 id="gccgo">Status of gccgo</h3>
<p>
We expect the future GCC 4.9 release to include gccgo with full
support for Go 1.2.
In the current (4.8.2) release of GCC, gccgo implements Go 1.1.2.
</p>
<h3 id="gc_changes">Changes to the gc compiler and linker</h3>
<p>
Go 1.2 has several semantic changes to the workings of the gc compiler suite.
Most users will be unaffected by them.
</p>
<p>
The <a href="/cmd/cgo/"><code>cgo</code></a> command now
works when C++ is included in the library being linked against.
See the <a href="/cmd/cgo/"><code>cgo</code></a> documentation
for details.
</p>
<p>
The gc compiler displayed a vestigial detail of its origins when
a program had no <code>package</code> clause: it assumed
the file was in package <code>main</code>.
The past has been erased, and a missing <code>package</code> clause
is now an error.
</p>
<p>
On the ARM, the toolchain supports "external linking", which
is a step towards being able to build shared libraries with the gc
toolchain and to provide dynamic linking support for environments
in which that is necessary.
</p>
<p>
In the runtime for the ARM, with <code>5a</code>, it used to be possible to refer
to the runtime-internal <code>m</code> (machine) and <code>g</code>
(goroutine) variables using <code>R9</code> and <code>R10</code> directly.
It is now necessary to refer to them by their proper names.
</p>
<p>
Also on the ARM, the <code>5l</code> linker (sic) now defines the
<code>MOVBS</code> and <code>MOVHS</code> instructions
as synonyms of <code>MOVB</code> and <code>MOVH</code>,
to make clearer the separation between signed and unsigned
sub-word moves; the unsigned versions already existed with a
<code>U</code> suffix.
</p>
<h3 id="cover">Test coverage</h3>
<p>
One major new feature of <a href="/pkg/go/"><code>go test</code></a> is
that it can now compute and, with help from a new, separately installed
"go tool cover" program, display test coverage results.
</p>
<p>
The cover tool is part of the
<a href="https://code.google.com/p/go/source/checkout?repo=tools"><code>go.tools</code></a>
subrepository.
It can be installed by running
</p>
<pre>
$ go get code.google.com/p/go.tools/cmd/cover
</pre>
<p>
The cover tool does two things.
First, when "go test" is given the <code>-cover</code> flag, it is run automatically
to rewrite the source for the package and insert instrumentation statements.
The test is then compiled and run as usual, and basic coverage statistics are reported:
</p>
<pre>
$ go test -cover fmt
ok fmt 0.060s coverage: 91.4% of statements
$
</pre>
<p>
Second, for more detailed reports, different flags to "go test" can create a coverage profile file,
which the cover program, invoked with "go tool cover", can then analyze.
</p>
<p>
Details on how to generate and analyze coverage statistics can be found by running the commands
</p>
<pre>
$ go help testflag
$ go tool cover -help
</pre>
<h3 id="go_doc">The go doc command is deleted</h3>
<p>
The "go doc" command is deleted.
Note that the <a href="/cmd/godoc/"><code>godoc</code></a> tool itself is not deleted,
just the wrapping of it by the <a href="/cmd/go/"><code>go</code></a> command.
All it did was show the documents for a package by package path,
which godoc itself already does with more flexibility.
It has therefore been deleted to reduce the number of documentation tools and,
as part of the restructuring of godoc, encourage better options in future.
</p>
<p>
<em>Updating</em>: For those who still need the precise functionality of running
</p>
<pre>
$ go doc
</pre>
<p>
in a directory, the behavior is identical to running
</p>
<pre>
$ godoc .
</pre>
<h3 id="gocmd">Changes to the go command</h3>
<p>
The <a href="/cmd/go/"><code>go get</code></a> command
now has a <code>-t</code> flag that causes it to download the dependencies
of the tests run by the package, not just those of the package itself.
By default, as before, dependencies of the tests are not downloaded.
</p>
<h2 id="performance">Performance</h2>
<p>
There are a number of significant performance improvements in the standard library; here are a few of them.
</p>
<ul>
<li>
The <a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>
decompresses about 30% faster.
</li>
<li>
The <a href="/pkg/crypto/des/"><code>crypto/des</code></a> package
is about five times faster.
</li>
<li>
The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
encodes about 30% faster.
</li>
<li>
Networking performance on Windows and BSD systems is about 30% faster through the use
of an integrated network poller in the runtime, similar to what was done for Linux and OS X
in Go 1.1.
</li>
</ul>
<h2 id="library">Changes to the standard library</h2>
<h3 id="archive_tar_zip">The archive/tar and archive/zip packages</h3>
<p>
The
<a href="/pkg/archive/tar/"><code>archive/tar</code></a>
and
<a href="/pkg/archive/zip/"><code>archive/zip</code></a>
packages have had a change to their semantics that may break existing programs.
The issue is that they both provided an implementation of the
<a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a>
interface that was not compliant with the specification for that interface.
In particular, their <code>Name</code> method returned the full
path name of the entry, but the interface specification requires that
the method return only the base name (final path element).
</p>
<p>
<em>Updating</em>: Since this behavior was newly implemented and
a bit obscure, it is possible that no code depends on the broken behavior.
If there are programs that do depend on it, they will need to be identified
and fixed manually.
</p>
<h3 id="encoding">The new encoding package</h3>
<p>
There is a new package, <a href="/pkg/encoding/"><code>encoding</code></a>,
that defines a set of standard encoding interfaces that may be used to
build custom marshalers and unmarshalers for packages such as
<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a>,
<a href="/pkg/encoding/json/"><code>encoding/json</code></a>,
and
<a href="/pkg/encoding/binary/"><code>encoding/binary</code></a>.
These new interfaces have been used to tidy up some implementations in
the standard library.
</p>
<p>
The new interfaces are called
<a href="/pkg/encoding/#BinaryMarshaler"><code>BinaryMarshaler</code></a>,
<a href="/pkg/encoding/#BinaryUnmarshaler"><code>BinaryUnmarshaler</code></a>,
<a href="/pkg/encoding/#TextMarshaler"><code>TextMarshaler</code></a>,
and
<a href="/pkg/encoding/#TextUnmarshaler"><code>TextUnmarshaler</code></a>.
Full details are in the <a href="/pkg/encoding/">documentation</a> for the package
and a separate <a href="//golang.org/s/go12encoding">design document</a>.
</p>
<h3 id="fmt_indexed_arguments">The fmt package</h3>
<p>
The <a href="/pkg/fmt/"><code>fmt</code></a> package's formatted print
routines such as <a href="/pkg/fmt/#Printf"><code>Printf</code></a>
now allow the data items to be printed to be accessed in arbitrary order
by using an indexing operation in the formatting specifications.
Wherever an argument is to be fetched from the argument list for formatting,
either as the value to be formatted or as a width or specification integer,
a new optional indexing notation <code>[</code><em>n</em><code>]</code>
fetches argument <em>n</em> instead.
The value of <em>n</em> is 1-indexed.
After such an indexing operating, the next argument to be fetched by normal
processing will be <em>n</em>+1.
</p>
<p>
For example, the normal <code>Printf</code> call
</p>
<pre>
fmt.Sprintf("%c %c %c\n", 'a', 'b', 'c')
</pre>
<p>
would create the string <code>"a b c"</code>, but with indexing operations like this,
</p>
<pre>
fmt.Sprintf("%[3]c %[1]c %c\n", 'a', 'b', 'c')
</pre>
<p>
the result is "<code>"c a b"</code>. The <code>[3]</code> index accesses the third formatting
argument, which is <code>'c'</code>, <code>[1]</code> accesses the first, <code>'a'</code>,
and then the next fetch accesses the argument following that one, <code>'b'</code>.
</p>
<p>
The motivation for this feature is programmable format statements to access
the arguments in different order for localization, but it has other uses:
</p>
<pre>
log.Printf("trace: value %v of type %[1]T\n", expensiveFunction(a.b[c]))
</pre>
<p>
<em>Updating</em>: The change to the syntax of format specifications
is strictly backwards compatible, so it affects no working programs.
</p>
<h3 id="text_template">The text/template and html/template packages</h3>
<p>
The
<a href="/pkg/text/template/"><code>text/template</code></a> package
has a couple of changes in Go 1.2, both of which are also mirrored in the
<a href="/pkg/html/template/"><code>html/template</code></a> package.
</p>
<p>
First, there are new default functions for comparing basic types.
The functions are listed in this table, which shows their names and
the associated familiar comparison operator.
</p>
<table cellpadding="0" summary="Template comparison functions">
<tr>
<th width="50"></th><th width="100">Name</th> <th width="50">Operator</th>
</tr>
<tr>
<td></td><td><code>eq</code></td> <td><code>==</code></td>
</tr>
<tr>
<td></td><td><code>ne</code></td> <td><code>!=</code></td>
</tr>
<tr>
<td></td><td><code>lt</code></td> <td><code>&lt;</code></td>
</tr>
<tr>
<td></td><td><code>le</code></td> <td><code>&lt;=</code></td>
</tr>
<tr>
<td></td><td><code>gt</code></td> <td><code>&gt;</code></td>
</tr>
<tr>
<td></td><td><code>ge</code></td> <td><code>&gt;=</code></td>
</tr>
</table>
<p>
These functions behave slightly differently from the corresponding Go operators.
First, they operate only on basic types (<code>bool</code>, <code>int</code>,
<code>float64</code>, <code>string</code>, etc.).
(Go allows comparison of arrays and structs as well, under some circumstances.)
Second, values can be compared as long as they are the same sort of value:
any signed integer value can be compared to any other signed integer value for example. (Go
does not permit comparing an <code>int8</code> and an <code>int16</code>).
Finally, the <code>eq</code> function (only) allows comparison of the first
argument with one or more following arguments. The template in this example,
</p>
<pre>
{{"{{"}}if eq .A 1 2 3 {{"}}"}} equal {{"{{"}}else{{"}}"}} not equal {{"{{"}}end{{"}}"}}
</pre>
<p>
reports "equal" if <code>.A</code> is equal to <em>any</em> of 1, 2, or 3.
</p>
<p>
The second change is that a small addition to the grammar makes "if else if" chains easier to write.
Instead of writing,
</p>
<pre>
{{"{{"}}if eq .A 1{{"}}"}} X {{"{{"}}else{{"}}"}} {{"{{"}}if eq .A 2{{"}}"}} Y {{"{{"}}end{{"}}"}} {{"{{"}}end{{"}}"}}
</pre>
<p>
one can fold the second "if" into the "else" and have only one "end", like this:
</p>
<pre>
{{"{{"}}if eq .A 1{{"}}"}} X {{"{{"}}else if eq .A 2{{"}}"}} Y {{"{{"}}end{{"}}"}}
</pre>
<p>
The two forms are identical in effect; the difference is just in the syntax.
</p>
<p>
<em>Updating</em>: Neither the "else if" change nor the comparison functions
affect existing programs. Those that
already define functions called <code>eq</code> and so on through a function
map are unaffected because the associated function map will override the new
default function definitions.
</p>
<h3 id="new_packages">New packages</h3>
<p>
There are two new packages.
</p>
<ul>
<li>
The <a href="/pkg/encoding/"><code>encoding</code></a> package is
<a href="#encoding">described above</a>.
</li>
<li>
The <a href="/pkg/image/color/palette/"><code>image/color/palette</code></a> package
provides standard color palettes.
</li>
</ul>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
The following list summarizes a number of minor changes to the library, mostly additions.
See the relevant package documentation for more information about each change.
</p>
<ul>
<li>
The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package
adds the
<a href="/pkg/archive/zip/#File.DataOffset"><code>DataOffset</code></a> accessor
to return the offset of a file's (possibly compressed) data within the archive.
</li>
<li>
The <a href="/pkg/bufio/"><code>bufio</code></a> package
adds <a href="/pkg/bufio/#Reader.Reset"><code>Reset</code></a>
methods to <a href="/pkg/bufio/#Reader"><code>Reader</code></a> and
<a href="/pkg/bufio/#Writer"><code>Writer</code></a>.
These methods allow the <a href="/pkg/io/#Reader"><code>Readers</code></a>
and <a href="/pkg/io/#Writer"><code>Writers</code></a>
to be re-used on new input and output readers and writers, saving
allocation overhead.
</li>
<li>
The <a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>
can now decompress concatenated archives.
</li>
<li>
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>
package adds a <a href="/pkg/compress/flate/#Writer.Reset"><code>Reset</code></a>
method on the <a href="/pkg/compress/flate/#Writer"><code>Writer</code></a>,
to make it possible to reduce allocation when, for instance, constructing an
archive to hold multiple compressed files.
</li>
<li>
The <a href="/pkg/compress/gzip/"><code>compress/gzip</code></a> package's
<a href="/pkg/compress/gzip/#Writer"><code>Writer</code></a> type adds a
<a href="/pkg/compress/gzip/#Writer.Reset"><code>Reset</code></a>
so it may be reused.
</li>
<li>
The <a href="/pkg/compress/zlib/"><code>compress/zlib</code></a> package's
<a href="/pkg/compress/zlib/#Writer"><code>Writer</code></a> type adds a
<a href="/pkg/compress/zlib/#Writer.Reset"><code>Reset</code></a>
so it may be reused.
</li>
<li>
The <a href="/pkg/container/heap/"><code>container/heap</code></a> package
adds a <a href="/pkg/container/heap/#Fix"><code>Fix</code></a>
method to provide a more efficient way to update an item's position in the heap.
</li>
<li>
The <a href="/pkg/container/list/"><code>container/list</code></a> package
adds the <a href="/pkg/container/list/#List.MoveBefore"><code>MoveBefore</code></a>
and
<a href="/pkg/container/list/#List.MoveAfter"><code>MoveAfter</code></a>
methods, which implement the obvious rearrangement.
</li>
<li>
The <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package
adds the a new GCM mode (Galois Counter Mode), which is almost always
used with AES encryption.
</li>
<li>
The
<a href="/pkg/crypto/md5/"><code>crypto/md5</code></a> package
adds a new <a href="/pkg/crypto/md5/#Sum"><code>Sum</code></a> function
to simplify hashing without sacrificing performance.
</li>
<li>
Similarly, the
<a href="/pkg/crypto/md5/"><code>crypto/sha1</code></a> package
adds a new <a href="/pkg/crypto/sha1/#Sum"><code>Sum</code></a> function.
</li>
<li>
Also, the
<a href="/pkg/crypto/sha256/"><code>crypto/sha256</code></a> package
adds <a href="/pkg/crypto/sha256/#Sum256"><code>Sum256</code></a>
and <a href="/pkg/crypto/sha256/#Sum224"><code>Sum224</code></a> functions.
</li>
<li>
Finally, the <a href="/pkg/crypto/sha512/"><code>crypto/sha512</code></a> package
adds <a href="/pkg/crypto/sha512/#Sum512"><code>Sum512</code></a> and
<a href="/pkg/crypto/sha512/#Sum384"><code>Sum384</code></a> functions.
</li>
<li>
The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
adds support for reading and writing arbitrary extensions.
</li>
<li>
The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package adds
support for TLS 1.1, 1.2 and AES-GCM.
</li>
<li>
The <a href="/pkg/database/sql/"><code>database/sql</code></a> package adds a
<a href="/pkg/database/sql/#DB.SetMaxOpenConns"><code>SetMaxOpenConns</code></a>
method on <a href="/pkg/database/sql/#DB"><code>DB</code></a> to limit the
number of open connections to the database.
</li>
<li>
The <a href="/pkg/encoding/csv/"><code>encoding/csv</code></a> package
now always allows trailing commas on fields.
</li>
<li>
The <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a> package
now treats channel and function fields of structures as if they were unexported,
even if they are not. That is, it ignores them completely. Previously they would
trigger an error, which could cause unexpected compatibility problems if an
embedded structure added such a field.
The package also now supports the generic <code>BinaryMarshaler</code> and
<code>BinaryUnmarshaler</code> interfaces of the
<a href="/pkg/encoding/"><code>encoding</code></a> package
described above.
</li>
<li>
The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
now will always escape ampersands as "\u0026" when printing strings.
It will now accept but correct invalid UTF-8 in
<a href="/pkg/encoding/json/#Marshal"><code>Marshal</code></a>
(such input was previously rejected).
Finally, it now supports the generic encoding interfaces of the
<a href="/pkg/encoding/"><code>encoding</code></a> package
described above.
</li>
<li>
The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package
now allows attributes stored in pointers to be marshaled.
It also supports the generic encoding interfaces of the
<a href="/pkg/encoding/"><code>encoding</code></a> package
described above through the new
<a href="/pkg/encoding/xml/#Marshaler"><code>Marshaler</code></a>,
<a href="/pkg/encoding/xml/#Unmarshaler"><code>Unmarshaler</code></a>,
and related
<a href="/pkg/encoding/xml/#MarshalerAttr"><code>MarshalerAttr</code></a> and
<a href="/pkg/encoding/xml/#UnmarshalerAttr"><code>UnmarshalerAttr</code></a>
interfaces.
The package also adds a
<a href="/pkg/encoding/xml/#Encoder.Flush"><code>Flush</code></a> method
to the
<a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a>
type for use by custom encoders. See the documentation for
<a href="/pkg/encoding/xml/#Encoder.EncodeToken"><code>EncodeToken</code></a>
to see how to use it.
</li>
<li>
The <a href="/pkg/flag/"><code>flag</code></a> package now
has a <a href="/pkg/flag/#Getter"><code>Getter</code></a> interface
to allow the value of a flag to be retrieved. Due to the
Go 1 compatibility guidelines, this method cannot be added to the existing
<a href="/pkg/flag/#Value"><code>Value</code></a>
interface, but all the existing standard flag types implement it.
The package also now exports the <a href="/pkg/flag/#CommandLine"><code>CommandLine</code></a>
flag set, which holds the flags from the command line.
</li>
<li>
The <a href="/pkg/go/ast/"><code>go/ast</code></a> package's
<a href="/pkg/go/ast/#SliceExpr"><code>SliceExpr</code></a> struct
has a new boolean field, <code>Slice3</code>, which is set to true
when representing a slice expression with three indices (two colons).
The default is false, representing the usual two-index form.
</li>
<li>
The <a href="/pkg/go/build/"><code>go/build</code></a> package adds
the <code>AllTags</code> field
to the <a href="/pkg/go/build/#Package"><code>Package</code></a> type,
to make it easier to process build tags.
</li>
<li>
The <a href="/pkg/image/draw/"><code>image/draw</code></a> package now
exports an interface, <a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>,
that wraps the standard <a href="/pkg/image/draw/#Draw"><code>Draw</code></a> method.
The Porter-Duff operators now implement this interface, in effect binding an operation to
the draw operator rather than providing it explicitly.
Given a paletted image as its destination, the new
<a href="/pkg/image/draw/#FloydSteinberg"><code>FloydSteinberg</code></a>
implementation of the
<a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>
interface will use the Floyd-Steinberg error diffusion algorithm to draw the image.
To create palettes suitable for such processing, the new
<a href="/pkg/image/draw/#Quantizer"><code>Quantizer</code></a> interface
represents implementations of quantization algorithms that choose a palette
given a full-color image.
There are no implementations of this interface in the library.
</li>
<li>
The <a href="/pkg/image/gif/"><code>image/gif</code></a> package
can now create GIF files using the new
<a href="/pkg/image/gif/#Encode"><code>Encode</code></a>
and <a href="/pkg/image/gif/#EncodeAll"><code>EncodeAll</code></a>
functions.
Their options argument allows specification of an image
<a href="/pkg/image/draw/#Quantizer"><code>Quantizer</code></a> to use;
if it is <code>nil</code>, the generated GIF will use the
<a href="/pkg/image/color/palette/#Plan9"><code>Plan9</code></a>
color map (palette) defined in the new
<a href="/pkg/image/color/palette/"><code>image/color/palette</code></a> package.
The options also specify a
<a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>
to use to create the output image;
if it is <code>nil</code>, Floyd-Steinberg error diffusion is used.
</li>
<li>
The <a href="/pkg/io/#Copy"><code>Copy</code></a> method of the
<a href="/pkg/io/"><code>io</code></a> package now prioritizes its
arguments differently.
If one argument implements <a href="/pkg/io/#WriterTo"><code>WriterTo</code></a>
and the other implements <a href="/pkg/io/#ReaderFrom"><code>ReaderFrom</code></a>,
<a href="/pkg/io/#Copy"><code>Copy</code></a> will now invoke
<a href="/pkg/io/#WriterTo"><code>WriterTo</code></a> to do the work,
so that less intermediate buffering is required in general.
</li>
<li>
The <a href="/pkg/net/"><code>net</code></a> package requires cgo by default
because the host operating system must in general mediate network call setup.
On some systems, though, it is possible to use the network without cgo, and useful
to do so, for instance to avoid dynamic linking.
The new build tag <code>netgo</code> (off by default) allows the construction of a
<code>net</code> package in pure Go on those systems where it is possible.
</li>
<li>
The <a href="/pkg/net/"><code>net</code></a> package adds a new field
<code>DualStack</code> to the <a href="/pkg/net/#Dialer"><code>Dialer</code></a>
struct for TCP connection setup using a dual IP stack as described in
<a href="https://tools.ietf.org/html/rfc6555">RFC 6555</a>.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package will no longer
transmit cookies that are incorrect according to
<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>.
It just logs an error and sends nothing.
Also,
the <a href="/pkg/net/http/"><code>net/http</code></a> package's
<a href="/pkg/net/http/#ReadResponse"><code>ReadResponse</code></a>
function now permits the <code>*Request</code> parameter to be <code>nil</code>,
whereupon it assumes a GET request.
Finally, an HTTP server will now serve HEAD
requests transparently, without the need for special casing in handler code.
While serving a HEAD request, writes to a
<a href="/pkg/net/http/#Handler"><code>Handler</code></a>'s
<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>
are absorbed by the
<a href="/pkg/net/http/#Server"><code>Server</code></a>
and the client receives an empty body as required by the HTTP specification.
</li>
<li>
The <a href="/pkg/os/exec/"><code>os/exec</code></a> package's
<a href="/pkg/os/exec/#Cmd.StdinPipe"><code>Cmd.StdinPipe</code></a> method
returns an <code>io.WriteCloser</code>, but has changed its concrete
implementation from <code>*os.File</code> to an unexported type that embeds
<code>*os.File</code>, and it is now safe to close the returned value.
Before Go 1.2, there was an unavoidable race that this change fixes.
Code that needs access to the methods of <code>*os.File</code> can use an
interface type assertion, such as <code>wc.(interface{ Sync() error })</code>.
</li>
<li>
The <a href="/pkg/runtime/"><code>runtime</code></a> package relaxes
the constraints on finalizer functions in
<a href="/pkg/runtime/#SetFinalizer"><code>SetFinalizer</code></a>: the
actual argument can now be any type that is assignable to the formal type of
the function, as is the case for any normal function call in Go.
</li>
<li>
The <a href="/pkg/sort/"><code>sort</code></a> package has a new
<a href="/pkg/sort/#Stable"><code>Stable</code></a> function that implements
stable sorting. It is less efficient than the normal sort algorithm, however.
</li>
<li>
The <a href="/pkg/strings/"><code>strings</code></a> package adds
an <a href="/pkg/strings/#IndexByte"><code>IndexByte</code></a>
function for consistency with the <a href="/pkg/bytes/"><code>bytes</code></a> package.
</li>
<li>
The <a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package
adds a new set of swap functions that atomically exchange the argument with the
value stored in the pointer, returning the old value.
The functions are
<a href="/pkg/sync/atomic/#SwapInt32"><code>SwapInt32</code></a>,
<a href="/pkg/sync/atomic/#SwapInt64"><code>SwapInt64</code></a>,
<a href="/pkg/sync/atomic/#SwapUint32"><code>SwapUint32</code></a>,
<a href="/pkg/sync/atomic/#SwapUint64"><code>SwapUint64</code></a>,
<a href="/pkg/sync/atomic/#SwapUintptr"><code>SwapUintptr</code></a>,
and
<a href="/pkg/sync/atomic/#SwapPointer"><code>SwapPointer</code></a>,
which swaps an <code>unsafe.Pointer</code>.
</li>
<li>
The <a href="/pkg/syscall/"><code>syscall</code></a> package now implements
<a href="/pkg/syscall/#Sendfile"><code>Sendfile</code></a> for Darwin.
</li>
<li>
The <a href="/pkg/testing/"><code>testing</code></a> package
now exports the <a href="/pkg/testing/#TB"><code>TB</code></a> interface.
It records the methods in common with the
<a href="/pkg/testing/#T"><code>T</code></a>
and
<a href="/pkg/testing/#B"><code>B</code></a> types,
to make it easier to share code between tests and benchmarks.
Also, the
<a href="/pkg/testing/#AllocsPerRun"><code>AllocsPerRun</code></a>
function now quantizes the return value to an integer (although it
still has type <code>float64</code>), to round off any error caused by
initialization and make the result more repeatable.
</li>
<li>
The <a href="/pkg/text/template/"><code>text/template</code></a> package
now automatically dereferences pointer values when evaluating the arguments
to "escape" functions such as "html", to bring the behavior of such functions
in agreement with that of other printing functions such as "printf".
</li>
<li>
In the <a href="/pkg/time/"><code>time</code></a> package, the
<a href="/pkg/time/#Parse"><code>Parse</code></a> function
and
<a href="/pkg/time/#Time.Format"><code>Format</code></a>
method
now handle time zone offsets with seconds, such as in the historical
date "1871-01-01T05:33:02+00:34:08".
Also, pattern matching in the formats for those routines is stricter: a non-lowercase letter
must now follow the standard words such as "Jan" and "Mon".
</li>
<li>
The <a href="/pkg/unicode/"><code>unicode</code></a> package
adds <a href="/pkg/unicode/#In"><code>In</code></a>,
a nicer-to-use but equivalent version of the original
<a href="/pkg/unicode/#IsOneOf"><code>IsOneOf</code></a>,
to see whether a character is a member of a Unicode category.
</li>
</ul>

View file

@ -1,608 +0,0 @@
<!--{
"Title": "Go 1.3 Release Notes",
"Path": "/doc/go1.3",
"Template": true
}-->
<h2 id="introduction">Introduction to Go 1.3</h2>
<p>
The latest Go release, version 1.3, arrives six months after 1.2,
and contains no language changes.
It focuses primarily on implementation work, providing
precise garbage collection,
a major refactoring of the compiler toolchain that results in
faster builds, especially for large projects,
significant performance improvements across the board,
and support for DragonFly BSD, Solaris, Plan 9 and Google's Native Client architecture (NaCl).
It also has an important refinement to the memory model regarding synchronization.
As always, Go 1.3 keeps the <a href="/doc/go1compat.html">promise
of compatibility</a>,
and almost everything
will continue to compile and run without change when moved to 1.3.
</p>
<h2 id="os">Changes to the supported operating systems and architectures</h2>
<h3 id="win2000">Removal of support for Windows 2000</h3>
<p>
Microsoft stopped supporting Windows 2000 in 2010.
Since it has <a href="https://codereview.appspot.com/74790043">implementation difficulties</a>
regarding exception handling (signals in Unix terminology),
as of Go 1.3 it is not supported by Go either.
</p>
<h3 id="dragonfly">Support for DragonFly BSD</h3>
<p>
Go 1.3 now includes experimental support for DragonFly BSD on the <code>amd64</code> (64-bit x86) and <code>386</code> (32-bit x86) architectures.
It uses DragonFly BSD 3.6 or above.
</p>
<h3 id="freebsd">Support for FreeBSD</h3>
<p>
It was not announced at the time, but since the release of Go 1.2, support for Go on FreeBSD
requires FreeBSD 8 or above.
</p>
<p>
As of Go 1.3, support for Go on FreeBSD requires that the kernel be compiled with the
<code>COMPAT_FREEBSD32</code> flag configured.
</p>
<p>
In concert with the switch to EABI syscalls for ARM platforms, Go 1.3 will run only on FreeBSD 10.
The x86 platforms, 386 and amd64, are unaffected.
</p>
<h3 id="nacl">Support for Native Client</h3>
<p>
Support for the Native Client virtual machine architecture has returned to Go with the 1.3 release.
It runs on the 32-bit Intel architectures (<code>GOARCH=386</code>) and also on 64-bit Intel, but using
32-bit pointers (<code>GOARCH=amd64p32</code>).
There is not yet support for Native Client on ARM.
Note that this is Native Client (NaCl), not Portable Native Client (PNaCl).
Details about Native Client are <a href="https://developers.google.com/native-client/dev/">here</a>;
how to set up the Go version is described <a href="//golang.org/wiki/NativeClient">here</a>.
</p>
<h3 id="netbsd">Support for NetBSD</h3>
<p>
As of Go 1.3, support for Go on NetBSD requires NetBSD 6.0 or above.
</p>
<h3 id="openbsd">Support for OpenBSD</h3>
<p>
As of Go 1.3, support for Go on OpenBSD requires OpenBSD 5.5 or above.
</p>
<h3 id="plan9">Support for Plan 9</h3>
<p>
Go 1.3 now includes experimental support for Plan 9 on the <code>386</code> (32-bit x86) architecture.
It requires the <code>Tsemacquire</code> syscall, which has been in Plan 9 since June, 2012.
</p>
<h3 id="solaris">Support for Solaris</h3>
<p>
Go 1.3 now includes experimental support for Solaris on the <code>amd64</code> (64-bit x86) architecture.
It requires illumos, Solaris 11 or above.
</p>
<h2 id="memory">Changes to the memory model</h2>
<p>
The Go 1.3 memory model <a href="https://codereview.appspot.com/75130045">adds a new rule</a>
concerning sending and receiving on buffered channels,
to make explicit that a buffered channel can be used as a simple
semaphore, using a send into the
channel to acquire and a receive from the channel to release.
This is not a language change, just a clarification about an expected property of communication.
</p>
<h2 id="impl">Changes to the implementations and tools</h2>
<h3 id="stacks">Stack</h3>
<p>
Go 1.3 has changed the implementation of goroutine stacks away from the old,
"segmented" model to a contiguous model.
When a goroutine needs more stack
than is available, its stack is transferred to a larger single block of memory.
The overhead of this transfer operation amortizes well and eliminates the old "hot spot"
problem when a calculation repeatedly steps across a segment boundary.
Details including performance numbers are in this
<a href="//golang.org/s/contigstacks">design document</a>.
</p>
<h3 id="garbage_collector">Changes to the garbage collector</h3>
<p>
For a while now, the garbage collector has been <em>precise</em> when examining
values in the heap; the Go 1.3 release adds equivalent precision to values on the stack.
This means that a non-pointer Go value such as an integer will never be mistaken for a
pointer and prevent unused memory from being reclaimed.
</p>
<p>
Starting with Go 1.3, the runtime assumes that values with pointer type
contain pointers and other values do not.
This assumption is fundamental to the precise behavior of both stack expansion
and garbage collection.
Programs that use <a href="/pkg/unsafe/">package unsafe</a>
to store integers in pointer-typed values are illegal and will crash if the runtime detects the behavior.
Programs that use <a href="/pkg/unsafe/">package unsafe</a> to store pointers
in integer-typed values are also illegal but more difficult to diagnose during execution.
Because the pointers are hidden from the runtime, a stack expansion or garbage collection
may reclaim the memory they point at, creating
<a href="//en.wikipedia.org/wiki/Dangling_pointer">dangling pointers</a>.
</p>
<p>
<em>Updating</em>: Code that uses <code>unsafe.Pointer</code> to convert
an integer-typed value held in memory into a pointer is illegal and must be rewritten.
Such code can be identified by <code>go vet</code>.
</p>
<h3 id="map">Map iteration</h3>
<p>
Iterations over small maps no longer happen in a consistent order.
Go 1 defines that &ldquo;<a href="//golang.org/ref/spec#For_statements">The iteration order over maps
is not specified and is not guaranteed to be the same from one iteration to the next.</a>&rdquo;
To keep code from depending on map iteration order,
Go 1.0 started each map iteration at a random index in the map.
A new map implementation introduced in Go 1.1 neglected to randomize
iteration for maps with eight or fewer entries, although the iteration order
can still vary from system to system.
This has allowed people to write Go 1.1 and Go 1.2 programs that
depend on small map iteration order and therefore only work reliably on certain systems.
Go 1.3 reintroduces random iteration for small maps in order to flush out these bugs.
</p>
<p>
<em>Updating</em>: If code assumes a fixed iteration order for small maps,
it will break and must be rewritten not to make that assumption.
Because only small maps are affected, the problem arises most often in tests.
</p>
<h3 id="liblink">The linker</h3>
<p>
As part of the general <a href="//golang.org/s/go13linker">overhaul</a> to
the Go linker, the compilers and linkers have been refactored.
The linker is still a C program, but now the instruction selection phase that
was part of the linker has been moved to the compiler through the creation of a new
library called <code>liblink</code>.
By doing instruction selection only once, when the package is first compiled,
this can speed up compilation of large projects significantly.
</p>
<p>
<em>Updating</em>: Although this is a major internal change, it should have no
effect on programs.
</p>
<h3 id="gccgo">Status of gccgo</h3>
<p>
GCC release 4.9 will contain the Go 1.2 (not 1.3) version of gccgo.
The release schedules for the GCC and Go projects do not coincide,
which means that 1.3 will be available in the development branch but
that the next GCC release, 4.10, will likely have the Go 1.4 version of gccgo.
</p>
<h3 id="gocmd">Changes to the go command</h3>
<p>
The <a href="/cmd/go/"><code>cmd/go</code></a> command has several new
features.
The <a href="/cmd/go/"><code>go run</code></a> and
<a href="/cmd/go/"><code>go test</code></a> subcommands
support a new <code>-exec</code> option to specify an alternate
way to run the resulting binary.
Its immediate purpose is to support NaCl.
</p>
<p>
The test coverage support of the <a href="/cmd/go/"><code>go test</code></a>
subcommand now automatically sets the coverage mode to <code>-atomic</code>
when the race detector is enabled, to eliminate false reports about unsafe
access to coverage counters.
</p>
<p>
The <a href="/cmd/go/"><code>go test</code></a> subcommand
now always builds the package, even if it has no test files.
Previously, it would do nothing if no test files were present.
</p>
<p>
The <a href="/cmd/go/"><code>go build</code></a> subcommand
supports a new <code>-i</code> option to install dependencies
of the specified target, but not the target itself.
</p>
<p>
Cross compiling with <a href="/cmd/cgo/"><code>cgo</code></a> enabled
is now supported.
The CC_FOR_TARGET and CXX_FOR_TARGET environment
variables are used when running all.bash to specify the cross compilers
for C and C++ code, respectively.
</p>
<p>
Finally, the go command now supports packages that import Objective-C
files (suffixed <code>.m</code>) through cgo.
</p>
<h3 id="cgo">Changes to cgo</h3>
<p>
The <a href="/cmd/cgo/"><code>cmd/cgo</code></a> command,
which processes <code>import "C"</code> declarations in Go packages,
has corrected a serious bug that may cause some packages to stop compiling.
Previously, all pointers to incomplete struct types translated to the Go type <code>*[0]byte</code>,
with the effect that the Go compiler could not diagnose passing one kind of struct pointer
to a function expecting another.
Go 1.3 corrects this mistake by translating each different
incomplete struct to a different named type.
</p>
<p>
Given the C declaration <code>typedef struct S T</code> for an incomplete <code>struct S</code>,
some Go code used this bug to refer to the types <code>C.struct_S</code> and <code>C.T</code> interchangeably.
Cgo now explicitly allows this use, even for completed struct types.
However, some Go code also used this bug to pass (for example) a <code>*C.FILE</code>
from one package to another.
This is not legal and no longer works: in general Go packages
should avoid exposing C types and names in their APIs.
</p>
<p>
<em>Updating</em>: Code confusing pointers to incomplete types or
passing them across package boundaries will no longer compile
and must be rewritten.
If the conversion is correct and must be preserved,
use an explicit conversion via <a href="/pkg/unsafe/#Pointer"><code>unsafe.Pointer</code></a>.
</p>
<h3 id="swig">SWIG 3.0 required for programs that use SWIG</h3>
<p>
For Go programs that use SWIG, SWIG version 3.0 is now required.
The <a href="/cmd/go"><code>cmd/go</code></a> command will now link the
SWIG generated object files directly into the binary, rather than
building and linking with a shared library.
</p>
<h3 id="gc_flag">Command-line flag parsing</h3>
<p>
In the gc toolchain, the assemblers now use the
same command-line flag parsing rules as the Go flag package, a departure
from the traditional Unix flag parsing.
This may affect scripts that invoke the tool directly.
For example,
<code>go tool 6a -SDfoo</code> must now be written
<code>go tool 6a -S -D foo</code>.
(The same change was made to the compilers and linkers in <a href="/doc/go1.1#gc_flag">Go 1.1</a>.)
</p>
<h3 id="godoc">Changes to godoc</h3>
<p>
When invoked with the <code>-analysis</code> flag,
<a href="//godoc.org/golang.org/x/tools/cmd/godoc">godoc</a>
now performs sophisticated <a href="/lib/godoc/analysis/help.html">static
analysis</a> of the code it indexes.
The results of analysis are presented in both the source view and the
package documentation view, and include the call graph of each package
and the relationships between
definitions and references,
types and their methods,
interfaces and their implementations,
send and receive operations on channels,
functions and their callers, and
call sites and their callees.
</p>
<h3 id="misc">Miscellany</h3>
<p>
The program <code>misc/benchcmp</code> that compares
performance across benchmarking runs has been rewritten.
Once a shell and awk script in the main repository, it is now a Go program in the <code>go.tools</code> repo.
Documentation is <a href="//godoc.org/golang.org/x/tools/cmd/benchcmp">here</a>.
</p>
<p>
For the few of us that build Go distributions, the tool <code>misc/dist</code> has been
moved and renamed; it now lives in <code>misc/makerelease</code>, still in the main repository.
</p>
<h2 id="performance">Performance</h2>
<p>
The performance of Go binaries for this release has improved in many cases due to changes
in the runtime and garbage collection, plus some changes to libraries.
Significant instances include:
</p>
<ul>
<li>
The runtime handles defers more efficiently, reducing the memory footprint by about two kilobytes
per goroutine that calls defer.
</li>
<li>
The garbage collector has been sped up, using a concurrent sweep algorithm,
better parallelization, and larger pages.
The cumulative effect can be a 50-70% reduction in collector pause time.
</li>
<li>
The race detector (see <a href="/doc/articles/race_detector.html">this guide</a>)
is now about 40% faster.
</li>
<li>
The regular expression package <a href="/pkg/regexp/"><code>regexp</code></a>
is now significantly faster for certain simple expressions due to the implementation of
a second, one-pass execution engine.
The choice of which engine to use is automatic;
the details are hidden from the user.
</li>
</ul>
<p>
Also, the runtime now includes in stack dumps how long a goroutine has been blocked,
which can be useful information when debugging deadlocks or performance issues.
</p>
<h2 id="library">Changes to the standard library</h2>
<h3 id="new_packages">New packages</h3>
<p>
A new package <a href="/pkg/debug/plan9obj/"><code>debug/plan9obj</code></a> was added to the standard library.
It implements access to Plan 9 <a href="https://9p.io/magic/man2html/6/a.out">a.out</a> object files.
</p>
<h3 id="major_library_changes">Major changes to the library</h3>
<p>
A previous bug in <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a>
made it possible to skip verification in TLS inadvertently.
In Go 1.3, the bug is fixed: one must specify either ServerName or
InsecureSkipVerify, and if ServerName is specified it is enforced.
This may break existing code that incorrectly depended on insecure
behavior.
</p>
<p>
There is an important new type added to the standard library: <a href="/pkg/sync/#Pool"><code>sync.Pool</code></a>.
It provides an efficient mechanism for implementing certain types of caches whose memory
can be reclaimed automatically by the system.
</p>
<p>
The <a href="/pkg/testing/"><code>testing</code></a> package's benchmarking helper,
<a href="/pkg/testing/#B"><code>B</code></a>, now has a
<a href="/pkg/testing/#B.RunParallel"><code>RunParallel</code></a> method
to make it easier to run benchmarks that exercise multiple CPUs.
</p>
<p>
<em>Updating</em>: The crypto/tls fix may break existing code, but such
code was erroneous and should be updated.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
The following list summarizes a number of minor changes to the library, mostly additions.
See the relevant package documentation for more information about each change.
</p>
<ul>
<li> In the <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package,
a new <a href="/pkg/crypto/tls/#DialWithDialer"><code>DialWithDialer</code></a>
function lets one establish a TLS connection using an existing dialer, making it easier
to control dial options such as timeouts.
The package also now reports the TLS version used by the connection in the
<a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
struct.
</li>
<li> The <a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a>
function of the <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
now supports parsing (and elsewhere, serialization) of PKCS #10 certificate
signature requests.
</li>
<li>
The formatted print functions of the <code>fmt</code> package now define <code>%F</code>
as a synonym for <code>%f</code> when printing floating-point values.
</li>
<li>
The <a href="/pkg/math/big/"><code>math/big</code></a> package's
<a href="/pkg/math/big/#Int"><code>Int</code></a> and
<a href="/pkg/math/big/#Rat"><code>Rat</code></a> types
now implement
<a href="/pkg/encoding/#TextMarshaler"><code>encoding.TextMarshaler</code></a> and
<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>.
</li>
<li>
The complex power function, <a href="/pkg/math/cmplx/#Pow"><code>Pow</code></a>,
now specifies the behavior when the first argument is zero.
It was undefined before.
The details are in the <a href="/pkg/math/cmplx/#Pow">documentation for the function</a>.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package now exposes the
properties of a TLS connection used to make a client request in the new
<a href="/pkg/net/http/#Response"><code>Response.TLS</code></a> field.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package now
allows setting an optional server error logger
with <a href="/pkg/net/http/#Server"><code>Server.ErrorLog</code></a>.
The default is still that all errors go to stderr.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package now
supports disabling HTTP keep-alive connections on the server
with <a href="/pkg/net/http/#Server.SetKeepAlivesEnabled"><code>Server.SetKeepAlivesEnabled</code></a>.
The default continues to be that the server does keep-alive (reuses
connections for multiple requests) by default.
Only resource-constrained servers or those in the process of graceful
shutdown will want to disable them.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package adds an optional
<a href="/pkg/net/http/#Transport"><code>Transport.TLSHandshakeTimeout</code></a>
setting to cap the amount of time HTTP client requests will wait for
TLS handshakes to complete.
It's now also set by default
on <a href="/pkg/net/http#DefaultTransport"><code>DefaultTransport</code></a>.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package's
<a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport</code></a>,
used by the HTTP client code, now
enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP
keep-alives</a> by default.
Other <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
values with a nil <code>Dial</code> field continue to function the same
as before: no TCP keep-alives are used.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package
now enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP
keep-alives</a> for incoming server requests when
<a href="/pkg/net/http/#ListenAndServe"><code>ListenAndServe</code></a>
or
<a href="/pkg/net/http/#ListenAndServeTLS"><code>ListenAndServeTLS</code></a>
are used.
When a server is started otherwise, TCP keep-alives are not enabled.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package now
provides an
optional <a href="/pkg/net/http/#Server"><code>Server.ConnState</code></a>
callback to hook various phases of a server connection's lifecycle
(see <a href="/pkg/net/http/#ConnState"><code>ConnState</code></a>).
This can be used to implement rate limiting or graceful shutdown.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package's HTTP
client now has an
optional <a href="/pkg/net/http/#Client"><code>Client.Timeout</code></a>
field to specify an end-to-end timeout on requests made using the
client.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package's
<a href="/pkg/net/http/#Request.ParseMultipartForm"><code>Request.ParseMultipartForm</code></a>
method will now return an error if the body's <code>Content-Type</code>
is not <code>multipart/form-data</code>.
Prior to Go 1.3 it would silently fail and return <code>nil</code>.
Code that relies on the previous behavior should be updated.
</li>
<li> In the <a href="/pkg/net/"><code>net</code></a> package,
the <a href="/pkg/net/#Dialer"><code>Dialer</code></a> struct now
has a <code>KeepAlive</code> option to specify a keep-alive period for the connection.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package's
<a href="/pkg/net/http/#Transport"><code>Transport</code></a>
now closes <a href="/pkg/net/http/#Request"><code>Request.Body</code></a>
consistently, even on error.
</li>
<li>
The <a href="/pkg/os/exec/"><code>os/exec</code></a> package now implements
what the documentation has always said with regard to relative paths for the binary.
In particular, it only calls <a href="/pkg/os/exec/#LookPath"><code>LookPath</code></a>
when the binary's file name contains no path separators.
</li>
<li>
The <a href="/pkg/reflect/#Value.SetMapIndex"><code>SetMapIndex</code></a>
function in the <a href="/pkg/reflect/"><code>reflect</code></a> package
no longer panics when deleting from a <code>nil</code> map.
</li>
<li>
If the main goroutine calls
<a href="/pkg/runtime/#Goexit"><code>runtime.Goexit</code></a>
and all other goroutines finish execution, the program now always crashes,
reporting a detected deadlock.
Earlier versions of Go handled this situation inconsistently: most instances
were reported as deadlocks, but some trivial cases exited cleanly instead.
</li>
<li>
The runtime/debug package now has a new function
<a href="/pkg/runtime/debug/#WriteHeapDump"><code>debug.WriteHeapDump</code></a>
that writes out a description of the heap.
</li>
<li>
The <a href="/pkg/strconv/#CanBackquote"><code>CanBackquote</code></a>
function in the <a href="/pkg/strconv/"><code>strconv</code></a> package
now considers the <code>DEL</code> character, <code>U+007F</code>, to be
non-printing.
</li>
<li>
The <a href="/pkg/syscall/"><code>syscall</code></a> package now provides
<a href="/pkg/syscall/#SendmsgN"><code>SendmsgN</code></a>
as an alternate version of
<a href="/pkg/syscall/#Sendmsg"><code>Sendmsg</code></a>
that returns the number of bytes written.
</li>
<li>
On Windows, the <a href="/pkg/syscall/"><code>syscall</code></a> package now
supports the cdecl calling convention through the addition of a new function
<a href="/pkg/syscall/#NewCallbackCDecl"><code>NewCallbackCDecl</code></a>
alongside the existing function
<a href="/pkg/syscall/#NewCallback"><code>NewCallback</code></a>.
</li>
<li>
The <a href="/pkg/testing/"><code>testing</code></a> package now
diagnoses tests that call <code>panic(nil)</code>, which are almost always erroneous.
Also, tests now write profiles (if invoked with profiling flags) even on failure.
</li>
<li>
The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
support throughout the system has been upgraded from
Unicode 6.2.0 to <a href="http://www.unicode.org/versions/Unicode6.3.0/">Unicode 6.3.0</a>.
</li>
</ul>

View file

@ -1,896 +0,0 @@
<!--{
"Title": "Go 1.4 Release Notes",
"Path": "/doc/go1.4",
"Template": true
}-->
<h2 id="introduction">Introduction to Go 1.4</h2>
<p>
The latest Go release, version 1.4, arrives as scheduled six months after 1.3.
</p>
<p>
It contains only one tiny language change,
in the form of a backwards-compatible simple variant of <code>for</code>-<code>range</code> loop,
and a possibly breaking change to the compiler involving methods on pointers-to-pointers.
</p>
<p>
The release focuses primarily on implementation work, improving the garbage collector
and preparing the ground for a fully concurrent collector to be rolled out in the
next few releases.
Stacks are now contiguous, reallocated when necessary rather than linking on new
"segments";
this release therefore eliminates the notorious "hot stack split" problem.
There are some new tools available including support in the <code>go</code> command
for build-time source code generation.
The release also adds support for ARM processors on Android and Native Client (NaCl)
and for AMD64 on Plan 9.
</p>
<p>
As always, Go 1.4 keeps the <a href="/doc/go1compat.html">promise
of compatibility</a>,
and almost everything
will continue to compile and run without change when moved to 1.4.
</p>
<h2 id="language">Changes to the language</h2>
<h3 id="forrange">For-range loops</h3>
<p>
Up until Go 1.3, <code>for</code>-<code>range</code> loop had two forms
</p>
<pre>
for i, v := range x {
...
}
</pre>
<p>
and
</p>
<pre>
for i := range x {
...
}
</pre>
<p>
If one was not interested in the loop values, only the iteration itself, it was still
necessary to mention a variable (probably the <a href="/ref/spec#Blank_identifier">blank identifier</a>, as in
<code>for</code> <code>_</code> <code>=</code> <code>range</code> <code>x</code>), because
the form
</p>
<pre>
for range x {
...
}
</pre>
<p>
was not syntactically permitted.
</p>
<p>
This situation seemed awkward, so as of Go 1.4 the variable-free form is now legal.
The pattern arises rarely but the code can be cleaner when it does.
</p>
<p>
<em>Updating</em>: The change is strictly backwards compatible to existing Go
programs, but tools that analyze Go parse trees may need to be modified to accept
this new form as the
<code>Key</code> field of <a href="/pkg/go/ast/#RangeStmt"><code>RangeStmt</code></a>
may now be <code>nil</code>.
</p>
<h3 id="methodonpointertopointer">Method calls on **T</h3>
<p>
Given these declarations,
</p>
<pre>
type T int
func (T) M() {}
var x **T
</pre>
<p>
both <code>gc</code> and <code>gccgo</code> accepted the method call
</p>
<pre>
x.M()
</pre>
<p>
which is a double dereference of the pointer-to-pointer <code>x</code>.
The Go specification allows a single dereference to be inserted automatically,
but not two, so this call is erroneous according to the language definition.
It has therefore been disallowed in Go 1.4, which is a breaking change,
although very few programs will be affected.
</p>
<p>
<em>Updating</em>: Code that depends on the old, erroneous behavior will no longer
compile but is easy to fix by adding an explicit dereference.
</p>
<h2 id="os">Changes to the supported operating systems and architectures</h2>
<h3 id="android">Android</h3>
<p>
Go 1.4 can build binaries for ARM processors running the Android operating system.
It can also build a <code>.so</code> library that can be loaded by an Android application
using the supporting packages in the <a href="https://golang.org/x/mobile">mobile</a> subrepository.
A brief description of the plans for this experimental port are available
<a href="https://golang.org/s/go14android">here</a>.
</p>
<h3 id="naclarm">NaCl on ARM</h3>
<p>
The previous release introduced Native Client (NaCl) support for the 32-bit x86
(<code>GOARCH=386</code>)
and 64-bit x86 using 32-bit pointers (GOARCH=amd64p32).
The 1.4 release adds NaCl support for ARM (GOARCH=arm).
</p>
<h3 id="plan9amd64">Plan9 on AMD64</h3>
<p>
This release adds support for the Plan 9 operating system on AMD64 processors,
provided the kernel supports the <code>nsec</code> system call and uses 4K pages.
</p>
<h2 id="compatibility">Changes to the compatibility guidelines</h2>
<p>
The <a href="/pkg/unsafe/"><code>unsafe</code></a> package allows one
to defeat Go's type system by exploiting internal details of the implementation
or machine representation of data.
It was never explicitly specified what use of <code>unsafe</code> meant
with respect to compatibility as specified in the
<a href="go1compat.html">Go compatibility guidelines</a>.
The answer, of course, is that we can make no promise of compatibility
for code that does unsafe things.
</p>
<p>
We have clarified this situation in the documentation included in the release.
The <a href="go1compat.html">Go compatibility guidelines</a> and the
docs for the <a href="/pkg/unsafe/"><code>unsafe</code></a> package
are now explicit that unsafe code is not guaranteed to remain compatible.
</p>
<p>
<em>Updating</em>: Nothing technical has changed; this is just a clarification
of the documentation.
</p>
<h2 id="impl">Changes to the implementations and tools</h2>
<h3 id="runtime">Changes to the runtime</h3>
<p>
Prior to Go 1.4, the runtime (garbage collector, concurrency support, interface management,
maps, slices, strings, ...) was mostly written in C, with some assembler support.
In 1.4, much of the code has been translated to Go so that the garbage collector can scan
the stacks of programs in the runtime and get accurate information about what variables
are active.
This change was large but should have no semantic effect on programs.
</p>
<p>
This rewrite allows the garbage collector in 1.4 to be fully precise,
meaning that it is aware of the location of all active pointers in the program.
This means the heap will be smaller as there will be no false positives keeping non-pointers alive.
Other related changes also reduce the heap size, which is smaller by 10%-30% overall
relative to the previous release.
</p>
<p>
A consequence is that stacks are no longer segmented, eliminating the "hot split" problem.
When a stack limit is reached, a new, larger stack is allocated, all active frames for
the goroutine are copied there, and any pointers into the stack are updated.
Performance can be noticeably better in some cases and is always more predictable.
Details are available in <a href="https://golang.org/s/contigstacks">the design document</a>.
</p>
<p>
The use of contiguous stacks means that stacks can start smaller without triggering performance issues,
so the default starting size for a goroutine's stack in 1.4 has been reduced from 8192 bytes to 2048 bytes.
</p>
<p>
As preparation for the concurrent garbage collector scheduled for the 1.5 release,
writes to pointer values in the heap are now done by a function call,
called a write barrier, rather than directly from the function updating the value.
In this next release, this will permit the garbage collector to mediate writes to the heap while it is running.
This change has no semantic effect on programs in 1.4, but was
included in the release to test the compiler and the resulting performance.
</p>
<p>
The implementation of interface values has been modified.
In earlier releases, the interface contained a word that was either a pointer or a one-word
scalar value, depending on the type of the concrete object stored.
This implementation was problematical for the garbage collector,
so as of 1.4 interface values always hold a pointer.
In running programs, most interface values were pointers anyway,
so the effect is minimal, but programs that store integers (for example) in
interfaces will see more allocations.
</p>
<p>
As of Go 1.3, the runtime crashes if it finds a memory word that should contain
a valid pointer but instead contains an obviously invalid pointer (for example, the value 3).
Programs that store integers in pointer values may run afoul of this check and crash.
In Go 1.4, setting the <a href="/pkg/runtime/"><code>GODEBUG</code></a> variable
<code>invalidptr=0</code> disables
the crash as a workaround, but we cannot guarantee that future releases will be
able to avoid the crash; the correct fix is to rewrite code not to alias integers and pointers.
</p>
<h3 id="asm">Assembly</h3>
<p>
The language accepted by the assemblers <code>cmd/5a</code>, <code>cmd/6a</code>
and <code>cmd/8a</code> has had several changes,
mostly to make it easier to deliver type information to the runtime.
</p>
<p>
First, the <code>textflag.h</code> file that defines flags for <code>TEXT</code> directives
has been copied from the linker source directory to a standard location so it can be
included with the simple directive
</p>
<pre>
#include "textflag.h"
</pre>
<p>
The more important changes are in how assembler source can define the necessary
type information.
For most programs it will suffice to move data
definitions (<code>DATA</code> and <code>GLOBL</code> directives)
out of assembly into Go files
and to write a Go declaration for each assembly function.
The <a href="/doc/asm#runtime">assembly document</a> describes what to do.
</p>
<p>
<em>Updating</em>:
Assembly files that include <code>textflag.h</code> from its old
location will still work, but should be updated.
For the type information, most assembly routines will need no change,
but all should be examined.
Assembly source files that define data,
functions with non-empty stack frames, or functions that return pointers
need particular attention.
A description of the necessary (but simple) changes
is in the <a href="/doc/asm#runtime">assembly document</a>.
</p>
<p>
More information about these changes is in the <a href="/doc/asm">assembly document</a>.
</p>
<h3 id="gccgo">Status of gccgo</h3>
<p>
The release schedules for the GCC and Go projects do not coincide.
GCC release 4.9 contains the Go 1.2 version of gccgo.
The next release, GCC 5, will likely have the Go 1.4 version of gccgo.
</p>
<h3 id="internalpackages">Internal packages</h3>
<p>
Go's package system makes it easy to structure programs into components with clean boundaries,
but there are only two forms of access: local (unexported) and global (exported).
Sometimes one wishes to have components that are not exported,
for instance to avoid acquiring clients of interfaces to code that is part of a public repository
but not intended for use outside the program to which it belongs.
</p>
<p>
The Go language does not have the power to enforce this distinction, but as of Go 1.4 the
<a href="/cmd/go/"><code>go</code></a> command introduces
a mechanism to define "internal" packages that may not be imported by packages outside
the source subtree in which they reside.
</p>
<p>
To create such a package, place it in a directory named <code>internal</code> or in a subdirectory of a directory
named internal.
When the <code>go</code> command sees an import of a package with <code>internal</code> in its path,
it verifies that the package doing the import
is within the tree rooted at the parent of the <code>internal</code> directory.
For example, a package <code>.../a/b/c/internal/d/e/f</code>
can be imported only by code in the directory tree rooted at <code>.../a/b/c</code>.
It cannot be imported by code in <code>.../a/b/g</code> or in any other repository.
</p>
<p>
For Go 1.4, the internal package mechanism is enforced for the main Go repository;
from 1.5 and onward it will be enforced for any repository.
</p>
<p>
Full details of the mechanism are in
<a href="https://golang.org/s/go14internal">the design document</a>.
</p>
<h3 id="canonicalimports">Canonical import paths</h3>
<p>
Code often lives in repositories hosted by public services such as <code>github.com</code>,
meaning that the import paths for packages begin with the name of the hosting service,
<code>github.com/rsc/pdf</code> for example.
One can use
<a href="/cmd/go/#hdr-Remote_import_paths">an existing mechanism</a>
to provide a "custom" or "vanity" import path such as
<code>rsc.io/pdf</code>, but
that creates two valid import paths for the package.
That is a problem: one may inadvertently import the package through the two
distinct paths in a single program, which is wasteful;
miss an update to a package because the path being used is not recognized to be
out of date;
or break clients using the old path by moving the package to a different hosting service.
</p>
<p>
Go 1.4 introduces an annotation for package clauses in Go source that identify a canonical
import path for the package.
If an import is attempted using a path that is not canonical,
the <a href="/cmd/go/"><code>go</code></a> command
will refuse to compile the importing package.
</p>
<p>
The syntax is simple: put an identifying comment on the package line.
For our example, the package clause would read:
</p>
<pre>
package pdf // import "rsc.io/pdf"
</pre>
<p>
With this in place,
the <code>go</code> command will
refuse to compile a package that imports <code>github.com/rsc/pdf</code>,
ensuring that the code can be moved without breaking users.
</p>
<p>
The check is at build time, not download time, so if <code>go</code> <code>get</code>
fails because of this check, the mis-imported package has been copied to the local machine
and should be removed manually.
</p>
<p>
To complement this new feature, a check has been added at update time to verify
that the local package's remote repository matches that of its custom import.
The <code>go</code> <code>get</code> <code>-u</code> command will fail to
update a package if its remote repository has changed since it was first
downloaded.
The new <code>-f</code> flag overrides this check.
</p>
<p>
Further information is in
<a href="https://golang.org/s/go14customimport">the design document</a>.
</p>
<h3 id="subrepo">Import paths for the subrepositories</h3>
<p>
The Go project subrepositories (<code>code.google.com/p/go.tools</code> and so on)
are now available under custom import paths replacing <code>code.google.com/p/go.</code> with <code>golang.org/x/</code>,
as in <code>golang.org/x/tools</code>.
We will add canonical import comments to the code around June 1, 2015,
at which point Go 1.4 and later will stop accepting the old <code>code.google.com</code> paths.
</p>
<p>
<em>Updating</em>: All code that imports from subrepositories should change
to use the new <code>golang.org</code> paths.
Go 1.0 and later can resolve and import the new paths, so updating will not break
compatibility with older releases.
Code that has not updated will stop compiling with Go 1.4 around June 1, 2015.
</p>
<h3 id="gogenerate">The go generate subcommand</h3>
<p>
The <a href="/cmd/go/"><code>go</code></a> command has a new subcommand,
<a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go generate</code></a>,
to automate the running of tools to generate source code before compilation.
For example, it can be used to run the <a href="/cmd/yacc"><code>yacc</code></a>
compiler-compiler on a <code>.y</code> file to produce the Go source file implementing the grammar,
or to automate the generation of <code>String</code> methods for typed constants using the new
<a href="https://godoc.org/golang.org/x/tools/cmd/stringer">stringer</a>
tool in the <code>golang.org/x/tools</code> subrepository.
</p>
<p>
For more information, see the
<a href="https://golang.org/s/go1.4-generate">design document</a>.
</p>
<h3 id="filenames">Change to file name handling</h3>
<p>
Build constraints, also known as build tags, control compilation by including or excluding files
(see the documentation <a href="/pkg/go/build/"><code>/go/build</code></a>).
Compilation can also be controlled by the name of the file itself by "tagging" the file with
a suffix (before the <code>.go</code> or <code>.s</code> extension) with an underscore
and the name of the architecture or operating system.
For instance, the file <code>gopher_arm.go</code> will only be compiled if the target
processor is an ARM.
</p>
<p>
Before Go 1.4, a file called just <code>arm.go</code> was similarly tagged, but this behavior
can break sources when new architectures are added, causing files to suddenly become tagged.
In 1.4, therefore, a file will be tagged in this manner only if the tag (architecture or operating
system name) is preceded by an underscore.
</p>
<p>
<em>Updating</em>: Packages that depend on the old behavior will no longer compile correctly.
Files with names like <code>windows.go</code> or <code>amd64.go</code> should either
have explicit build tags added to the source or be renamed to something like
<code>os_windows.go</code> or <code>support_amd64.go</code>.
</p>
<h3 id="gocmd">Other changes to the go command</h3>
<p>
There were a number of minor changes to the
<a href="/cmd/go/"><code>cmd/go</code></a>
command worth noting.
</p>
<ul>
<li>
Unless <a href="/cmd/cgo/"><code>cgo</code></a> is being used to build the package,
the <code>go</code> command now refuses to compile C source files,
since the relevant C compilers
(<a href="/cmd/6c/"><code>6c</code></a> etc.)
are intended to be removed from the installation in some future release.
(They are used today only to build part of the runtime.)
It is difficult to use them correctly in any case, so any extant uses are likely incorrect,
so we have disabled them.
</li>
<li>
The <a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>test</code></a>
subcommand has a new flag, <code>-o</code>, to set the name of the resulting binary,
corresponding to the same flag in other subcommands.
The non-functional <code>-file</code> flag has been removed.
</li>
<li>
The <a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>test</code></a>
subcommand will compile and link all <code>*_test.go</code> files in the package,
even when there are no <code>Test</code> functions in them.
It previously ignored such files.
</li>
<li>
The behavior of the
<a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>build</code></a>
subcommand's
<code>-a</code> flag has been changed for non-development installations.
For installations running a released distribution, the <code>-a</code> flag will no longer
rebuild the standard library and commands, to avoid overwriting the installation's files.
</li>
</ul>
<h3 id="pkg">Changes to package source layout</h3>
<p>
In the main Go source repository, the source code for the packages was kept in
the directory <code>src/pkg</code>, which made sense but differed from
other repositories, including the Go subrepositories.
In Go 1.4, the<code> pkg</code> level of the source tree is now gone, so for example
the <a href="/pkg/fmt/"><code>fmt</code></a> package's source, once kept in
directory <code>src/pkg/fmt</code>, now lives one level higher in <code>src/fmt</code>.
</p>
<p>
<em>Updating</em>: Tools like <code>godoc</code> that discover source code
need to know about the new location. All tools and services maintained by the Go team
have been updated.
</p>
<h3 id="swig">SWIG</h3>
<p>
Due to runtime changes in this release, Go 1.4 requires SWIG 3.0.3.
</p>
<h3 id="misc">Miscellany</h3>
<p>
The standard repository's top-level <code>misc</code> directory used to contain
Go support for editors and IDEs: plugins, initialization scripts and so on.
Maintaining these was becoming time-consuming
and needed external help because many of the editors listed were not used by
members of the core team.
It also required us to make decisions about which plugin was best for a given
editor, even for editors we do not use.
</p>
<p>
The Go community at large is much better suited to managing this information.
In Go 1.4, therefore, this support has been removed from the repository.
Instead, there is a curated, informative list of what's available on
a <a href="//golang.org/wiki/IDEsAndTextEditorPlugins">wiki page</a>.
</p>
<h2 id="performance">Performance</h2>
<p>
Most programs will run about the same speed or slightly faster in 1.4 than in 1.3;
some will be slightly slower.
There are many changes, making it hard to be precise about what to expect.
</p>
<p>
As mentioned above, much of the runtime was translated to Go from C,
which led to some reduction in heap sizes.
It also improved performance slightly because the Go compiler is better
at optimization, due to things like inlining, than the C compiler used to build
the runtime.
</p>
<p>
The garbage collector was sped up, leading to measurable improvements for
garbage-heavy programs.
On the other hand, the new write barriers slow things down again, typically
by about the same amount but, depending on their behavior, some programs
may be somewhat slower or faster.
</p>
<p>
Library changes that affect performance are documented below.
</p>
<h2 id="library">Changes to the standard library</h2>
<h3 id="new_packages">New packages</h3>
<p>
There are no new packages in this release.
</p>
<h3 id="major_library_changes">Major changes to the library</h3>
<h4 id="scanner">bufio.Scanner</h4>
<p>
The <a href="/pkg/bufio/#Scanner"><code>Scanner</code></a> type in the
<a href="/pkg/bufio/"><code>bufio</code></a> package
has had a bug fixed that may require changes to custom
<a href="/pkg/bufio/#SplitFunc"><code>split functions</code></a>.
The bug made it impossible to generate an empty token at EOF; the fix
changes the end conditions seen by the split function.
Previously, scanning stopped at EOF if there was no more data.
As of 1.4, the split function will be called once at EOF after input is exhausted,
so the split function can generate a final empty token
as the documentation already promised.
</p>
<p>
<em>Updating</em>: Custom split functions may need to be modified to
handle empty tokens at EOF as desired.
</p>
<h4 id="syscall">syscall</h4>
<p>
The <a href="/pkg/syscall/"><code>syscall</code></a> package is now frozen except
for changes needed to maintain the core repository.
In particular, it will no longer be extended to support new or different system calls
that are not used by the core.
The reasons are described at length in <a href="https://golang.org/s/go1.4-syscall">a
separate document</a>.
</p>
<p>
A new subrepository, <a href="https://golang.org/x/sys">golang.org/x/sys</a>,
has been created to serve as the location for new developments to support system
calls on all kernels.
It has a nicer structure, with three packages that each hold the implementation of
system calls for one of
<a href="https://godoc.org/golang.org/x/sys/unix">Unix</a>,
<a href="https://godoc.org/golang.org/x/sys/windows">Windows</a> and
<a href="https://godoc.org/golang.org/x/sys/plan9">Plan 9</a>.
These packages will be curated more generously, accepting all reasonable changes
that reflect kernel interfaces in those operating systems.
See the documentation and the article mentioned above for more information.
</p>
<p>
<em>Updating</em>: Existing programs are not affected as the <code>syscall</code>
package is largely unchanged from the 1.3 release.
Future development that requires system calls not in the <code>syscall</code> package
should build on <code>golang.org/x/sys</code> instead.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
The following list summarizes a number of minor changes to the library, mostly additions.
See the relevant package documentation for more information about each change.
</p>
<ul>
<li>
The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package's
<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> now supports a
<a href="/pkg/archive/zip/#Writer.Flush"><code>Flush</code></a> method.
</li>
<li>
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>,
and <a href="/pkg/compress/zlib/"><code>compress/zlib</code></a>
packages now support a <code>Reset</code> method
for the decompressors, allowing them to reuse buffers and improve performance.
The <a href="/pkg/compress/gzip/"><code>compress/gzip</code></a> package also has a
<a href="/pkg/compress/gzip/#Reader.Multistream"><code>Multistream</code></a> method to control support
for multistream files.
</li>
<li>
The <a href="/pkg/crypto/"><code>crypto</code></a> package now has a
<a href="/pkg/crypto/#Signer"><code>Signer</code></a> interface, implemented by the
<code>PrivateKey</code> types in
<a href="/pkg/crypto/ecdsa"><code>crypto/ecdsa</code></a> and
<a href="/pkg/crypto/rsa"><code>crypto/rsa</code></a>.
</li>
<li>
The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
now supports ALPN as defined in <a href="https://tools.ietf.org/html/rfc7301">RFC 7301</a>.
</li>
<li>
The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
now supports programmatic selection of server certificates
through the new <a href="/pkg/crypto/tls/#Config.CertificateForName"><code>CertificateForName</code></a> function
of the <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> struct.
</li>
<li>
Also in the crypto/tls package, the server now supports
<a href="https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00">TLS_FALLBACK_SCSV</a>
to help clients detect fallback attacks.
(The Go client does not support fallback at all, so it is not vulnerable to
those attacks.)
</li>
<li>
The <a href="/pkg/database/sql/"><code>database/sql</code></a> package can now list all registered
<a href="/pkg/database/sql/#Drivers"><code>Drivers</code></a>.
</li>
<li>
The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a> package now supports
<a href="/pkg/debug/dwarf/#UnspecifiedType"><code>UnspecifiedType</code></a>s.
</li>
<li>
In the <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package,
optional elements with a default value will now only be omitted if they have that value.
</li>
<li>
The <a href="/pkg/encoding/csv/"><code>encoding/csv</code></a> package no longer
quotes empty strings but does quote the end-of-data marker <code>\.</code> (backslash dot).
This is permitted by the definition of CSV and allows it to work better with Postgres.
</li>
<li>
The <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a> package has been rewritten to eliminate
the use of unsafe operations, allowing it to be used in environments that do not permit use of the
<a href="/pkg/unsafe/"><code>unsafe</code></a> package.
For typical uses it will be 10-30% slower, but the delta is dependent on the type of the data and
in some cases, especially involving arrays, it can be faster.
There is no functional change.
</li>
<li>
The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package's
<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> can now report its input offset.
</li>
<li>
In the <a href="/pkg/fmt/"><code>fmt</code></a> package,
formatting of pointers to maps has changed to be consistent with that of pointers
to structs, arrays, and so on.
For instance, <code>&amp;map[string]int{"one":</code> <code>1}</code> now prints by default as
<code>&amp;map[one:</code> <code>1]</code> rather than as a hexadecimal pointer value.
</li>
<li>
The <a href="/pkg/image/"><code>image</code></a> package's
<a href="/pkg/image/#Image"><code>Image</code></a>
implementations like
<a href="/pkg/image/#RGBA"><code>RGBA</code></a> and
<a href="/pkg/image/#Gray"><code>Gray</code></a> have specialized
<a href="/pkg/image/#RGBA.RGBAAt"><code>RGBAAt</code></a> and
<a href="/pkg/image/#Gray.GrayAt"><code>GrayAt</code></a> methods alongside the general
<a href="/pkg/image/#Image.At"><code>At</code></a> method.
</li>
<li>
The <a href="/pkg/image/png/"><code>image/png</code></a> package now has an
<a href="/pkg/image/png/#Encoder"><code>Encoder</code></a>
type to control the compression level used for encoding.
</li>
<li>
The <a href="/pkg/math/"><code>math</code></a> package now has a
<a href="/pkg/math/#Nextafter32"><code>Nextafter32</code><a/> function.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package's
<a href="/pkg/net/http/#Request"><code>Request</code></a> type
has a new <a href="/pkg/net/http/#Request.BasicAuth"><code>BasicAuth</code></a> method
that returns the username and password from authenticated requests using the
HTTP Basic Authentication
Scheme.
</li>
<li>The <a href="/pkg/net/http/"><code>net/http</code></a> package's
<a href="/pkg/net/http/#Request"><code>Transport</code></a> type
has a new <a href="/pkg/net/http/#Transport.DialTLS"><code>DialTLS</code></a> hook
that allows customizing the behavior of outbound TLS connections.
</li>
<li>
The <a href="/pkg/net/http/httputil/"><code>net/http/httputil</code></a> package's
<a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a> type
has a new field,
<a href="/pkg/net/http/#ReverseProxy.ErrorLog"><code>ErrorLog</code></a>, that
provides user control of logging.
</li>
<li>
The <a href="/pkg/os/"><code>os</code></a> package
now implements symbolic links on the Windows operating system
through the <a href="/pkg/os/#Symlink"><code>Symlink</code></a> function.
Other operating systems already have this functionality.
There is also a new <a href="/pkg/os/#Unsetenv"><code>Unsetenv</code></a> function.
</li>
<li>
The <a href="/pkg/reflect/"><code>reflect</code></a> package's
<a href="/pkg/reflect/#Type"><code>Type</code></a> interface
has a new method, <a href="/pkg/reflect/#type.Comparable"><code>Comparable</code></a>,
that reports whether the type implements general comparisons.
</li>
<li>
Also in the <a href="/pkg/reflect/"><code>reflect</code></a> package, the
<a href="/pkg/reflect/#Value"><code>Value</code></a> interface is now three instead of four words
because of changes to the implementation of interfaces in the runtime.
This saves memory but has no semantic effect.
</li>
<li>
The <a href="/pkg/runtime/"><code>runtime</code></a> package
now implements monotonic clocks on Windows,
as it already did for the other systems.
</li>
<li>
The <a href="/pkg/runtime/"><code>runtime</code></a> package's
<a href="/pkg/runtime/#MemStats.Mallocs"><code>Mallocs</code></a> counter
now counts very small allocations that were missed in Go 1.3.
This may break tests using <a href="/pkg/runtime/#ReadMemStats"><code>ReadMemStats</code></a>
or <a href="/pkg/testing/#AllocsPerRun"><code>AllocsPerRun</code></a>
due to the more accurate answer.
</li>
<li>
In the <a href="/pkg/runtime/"><code>runtime</code></a> package,
an array <a href="/pkg/runtime/#MemStats.PauseEnd"><code>PauseEnd</code></a>
has been added to the
<a href="/pkg/runtime/#MemStats"><code>MemStats</code></a>
and <a href="/pkg/runtime/#GCStats"><code>GCStats</code></a> structs.
This array is a circular buffer of times when garbage collection pauses ended.
The corresponding pause durations are already recorded in
<a href="/pkg/runtime/#MemStats.PauseNs"><code>PauseNs</code></a>
</li>
<li>
The <a href="/pkg/runtime/race/"><code>runtime/race</code></a> package
now supports FreeBSD, which means the
<a href="/pkg/cmd/go/"><code>go</code></a> command's <code>-race</code>
flag now works on FreeBSD.
</li>
<li>
The <a href="/pkg/sync/atomic/"><code>sync/atomic</code></a> package
has a new type, <a href="/pkg/sync/atomic/#Value"><code>Value</code></a>.
<code>Value</code> provides an efficient mechanism for atomic loads and
stores of values of arbitrary type.
</li>
<li>
In the <a href="/pkg/syscall/"><code>syscall</code></a> package's
implementation on Linux, the
<a href="/pkg/syscall/#Setuid"><code>Setuid</code></a>
and <a href="/pkg/syscall/#Setgid"><code>Setgid</code></a> have been disabled
because those system calls operate on the calling thread, not the whole process, which is
different from other platforms and not the expected result.
</li>
<li>
The <a href="/pkg/testing/"><code>testing</code></a> package
has a new facility to provide more control over running a set of tests.
If the test code contains a function
<pre>
func TestMain(m *<a href="/pkg/testing/#M"><code>testing.M</code></a>)
</pre>
that function will be called instead of running the tests directly.
The <code>M</code> struct contains methods to access and run the tests.
</li>
<li>
Also in the <a href="/pkg/testing/"><code>testing</code></a> package,
a new <a href="/pkg/testing/#Coverage"><code>Coverage</code></a>
function reports the current test coverage fraction,
enabling individual tests to report how much they are contributing to the
overall coverage.
</li>
<li>
The <a href="/pkg/text/scanner/"><code>text/scanner</code></a> package's
<a href="/pkg/text/scanner/#Scanner"><code>Scanner</code></a> type
has a new function,
<a href="/pkg/text/scanner/#Scanner.IsIdentRune"><code>IsIdentRune</code></a>,
allowing one to control the definition of an identifier when scanning.
</li>
<li>
The <a href="/pkg/text/template/"><code>text/template</code></a> package's boolean
functions <code>eq</code>, <code>lt</code>, and so on have been generalized to allow comparison
of signed and unsigned integers, simplifying their use in practice.
(Previously one could only compare values of the same signedness.)
All negative values compare less than all unsigned values.
</li>
<li>
The <code>time</code> package now uses the standard symbol for the micro prefix,
the micro symbol (U+00B5 'µ'), to print microsecond durations.
<a href="/pkg/time/#ParseDuration"><code>ParseDuration</code></a> still accepts <code>us</code>
but the package no longer prints microseconds as <code>us</code>.
<br>
<em>Updating</em>: Code that depends on the output format of durations
but does not use ParseDuration will need to be updated.
</li>
</ul>

File diff suppressed because it is too large Load diff

View file

@ -1,923 +0,0 @@
<!--{
"Title": "Go 1.6 Release Notes",
"Path": "/doc/go1.6",
"Template": true
}-->
<!--
Edit .,s;^PKG:([a-z][A-Za-z0-9_/]+);<a href="/pkg/\1/"><code>\1</code></a>;g
Edit .,s;^([a-z][A-Za-z0-9_/]+)\.([A-Z][A-Za-z0-9_]+\.)?([A-Z][A-Za-z0-9_]+)([ .',]|$);<a href="/pkg/\1/#\2\3"><code>\3</code></a>\4;g
-->
<style>
main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.6</h2>
<p>
The latest Go release, version 1.6, arrives six months after 1.5.
Most of its changes are in the implementation of the language, runtime, and libraries.
There are no changes to the language specification.
As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>.
We expect almost all Go programs to continue to compile and run as before.
</p>
<p>
The release adds new ports to <a href="#ports">Linux on 64-bit MIPS and Android on 32-bit x86</a>;
defined and enforced <a href="#cgo">rules for sharing Go pointers with C</a>;
transparent, automatic <a href="#http2">support for HTTP/2</a>;
and a new mechanism for <a href="#template">template reuse</a>.
</p>
<h2 id="language">Changes to the language</h2>
<p>
There are no language changes in this release.
</p>
<h2 id="ports">Ports</h2>
<p>
Go 1.6 adds experimental ports to
Linux on 64-bit MIPS (<code>linux/mips64</code> and <code>linux/mips64le</code>).
These ports support <code>cgo</code> but only with internal linking.
</p>
<p>
Go 1.6 also adds an experimental port to Android on 32-bit x86 (<code>android/386</code>).
</p>
<p>
On FreeBSD, Go 1.6 defaults to using <code>clang</code>, not <code>gcc</code>, as the external C compiler.
</p>
<p>
On Linux on little-endian 64-bit PowerPC (<code>linux/ppc64le</code>),
Go 1.6 now supports <code>cgo</code> with external linking and
is roughly feature complete.
</p>
<p>
On NaCl, Go 1.5 required SDK version pepper-41.
Go 1.6 adds support for later SDK versions.
</p>
<p>
On 32-bit x86 systems using the <code>-dynlink</code> or <code>-shared</code> compilation modes,
the register CX is now overwritten by certain memory references and should
be avoided in hand-written assembly.
See the <a href="/doc/asm#x86">assembly documentation</a> for details.
</p>
<h2 id="tools">Tools</h2>
<h3 id="cgo">Cgo</h3>
<p>
There is one major change to <a href="/cmd/cgo/"><code>cgo</code></a>, along with one minor change.
</p>
<p>
The major change is the definition of rules for sharing Go pointers with C code,
to ensure that such C code can coexist with Go's garbage collector.
Briefly, Go and C may share memory allocated by Go
when a pointer to that memory is passed to C as part of a <code>cgo</code> call,
provided that the memory itself contains no pointers to Go-allocated memory,
and provided that C does not retain the pointer after the call returns.
These rules are checked by the runtime during program execution:
if the runtime detects a violation, it prints a diagnosis and crashes the program.
The checks can be disabled by setting the environment variable
<code>GODEBUG=cgocheck=0</code>, but note that the vast majority of
code identified by the checks is subtly incompatible with garbage collection
in one way or another.
Disabling the checks will typically only lead to more mysterious failure modes.
Fixing the code in question should be strongly preferred
over turning off the checks.
See the <a href="/cmd/cgo/#hdr-Passing_pointers"><code>cgo</code> documentation</a> for more details.
</p>
<p>
The minor change is
the addition of explicit <code>C.complexfloat</code> and <code>C.complexdouble</code> types,
separate from Go's <code>complex64</code> and <code>complex128</code>.
Matching the other numeric types, C's complex types and Go's complex type are
no longer interchangeable.
</p>
<h3 id="compiler">Compiler Toolchain</h3>
<p>
The compiler toolchain is mostly unchanged.
Internally, the most significant change is that the parser is now hand-written
instead of generated from <a href="/cmd/yacc/">yacc</a>.
</p>
<p>
The compiler, linker, and <code>go</code> command have a new flag <code>-msan</code>,
analogous to <code>-race</code> and only available on linux/amd64,
that enables interoperation with the <a href="https://clang.llvm.org/docs/MemorySanitizer.html">Clang MemorySanitizer</a>.
Such interoperation is useful mainly for testing a program containing suspect C or C++ code.
</p>
<p>
The linker has a new option <code>-libgcc</code> to set the expected location
of the C compiler support library when linking <a href="/cmd/cgo/"><code>cgo</code></a> code.
The option is only consulted when using <code>-linkmode=internal</code>,
and it may be set to <code>none</code> to disable the use of a support library.
</p>
<p>
The implementation of <a href="/doc/go1.5#link">build modes started in Go 1.5</a> has been expanded to more systems.
This release adds support for the <code>c-shared</code> mode on <code>android/386</code>, <code>android/amd64</code>,
<code>android/arm64</code>, <code>linux/386</code>, and <code>linux/arm64</code>;
for the <code>shared</code> mode on <code>linux/386</code>, <code>linux/arm</code>, <code>linux/amd64</code>, and <code>linux/ppc64le</code>;
and for the new <code>pie</code> mode (generating position-independent executables) on
<code>android/386</code>, <code>android/amd64</code>, <code>android/arm</code>, <code>android/arm64</code>, <code>linux/386</code>,
<code>linux/amd64</code>, <code>linux/arm</code>, <code>linux/arm64</code>, and <code>linux/ppc64le</code>.
See the <a href="https://golang.org/s/execmodes">design document</a> for details.
</p>
<p>
As a reminder, the linker's <code>-X</code> flag changed in Go 1.5.
In Go 1.4 and earlier, it took two arguments, as in
</p>
<pre>
-X importpath.name value
</pre>
<p>
Go 1.5 added an alternative syntax using a single argument
that is itself a <code>name=value</code> pair:
</p>
<pre>
-X importpath.name=value
</pre>
<p>
In Go 1.5 the old syntax was still accepted, after printing a warning
suggesting use of the new syntax instead.
Go 1.6 continues to accept the old syntax and print the warning.
Go 1.7 will remove support for the old syntax.
</p>
<h3 id="gccgo">Gccgo</h3>
<p>
The release schedules for the GCC and Go projects do not coincide.
GCC release 5 contains the Go 1.4 version of gccgo.
The next release, GCC 6, will have the Go 1.6.1 version of gccgo.
</p>
<h3 id="go_command">Go command</h3>
<p>
The <a href="/cmd/go"><code>go</code></a> command's basic operation
is unchanged, but there are a number of changes worth noting.
</p>
<p>
Go 1.5 introduced experimental support for vendoring,
enabled by setting the <code>GO15VENDOREXPERIMENT</code> environment variable to <code>1</code>.
Go 1.6 keeps the vendoring support, no longer considered experimental,
and enables it by default.
It can be disabled explicitly by setting
the <code>GO15VENDOREXPERIMENT</code> environment variable to <code>0</code>.
Go 1.7 will remove support for the environment variable.
</p>
<p>
The most likely problem caused by enabling vendoring by default happens
in source trees containing an existing directory named <code>vendor</code> that
does not expect to be interpreted according to new vendoring semantics.
In this case, the simplest fix is to rename the directory to anything other
than <code>vendor</code> and update any affected import paths.
</p>
<p>
For details about vendoring,
see the documentation for the <a href="/cmd/go/#hdr-Vendor_Directories"><code>go</code> command</a>
and the <a href="https://golang.org/s/go15vendor">design document</a>.
</p>
<p>
There is a new build flag, <code>-msan</code>,
that compiles Go with support for the LLVM memory sanitizer.
This is intended mainly for use when linking against C or C++ code
that is being checked with the memory sanitizer.
</p>
<h3 id="doc_command">Go doc command</h3>
<p>
Go 1.5 introduced the
<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go doc</code></a> command,
which allows references to packages using only the package name, as in
<code>go</code> <code>doc</code> <code>http</code>.
In the event of ambiguity, the Go 1.5 behavior was to use the package
with the lexicographically earliest import path.
In Go 1.6, ambiguity is resolved by preferring import paths with
fewer elements, breaking ties using lexicographic comparison.
An important effect of this change is that original copies of packages
are now preferred over vendored copies.
Successful searches also tend to run faster.
</p>
<h3 id="vet_command">Go vet command</h3>
<p>
The <a href="/cmd/vet"><code>go vet</code></a> command now diagnoses
passing function or method values as arguments to <code>Printf</code>,
such as when passing <code>f</code> where <code>f()</code> was intended.
</p>
<h2 id="performance">Performance</h2>
<p>
As always, the changes are so general and varied that precise statements
about performance are difficult to make.
Some programs may run faster, some slower.
On average the programs in the Go 1 benchmark suite run a few percent faster in Go 1.6
than they did in Go 1.5.
The garbage collector's pauses are even lower than in Go 1.5,
especially for programs using
a large amount of memory.
</p>
<p>
There have been significant optimizations bringing more than 10% improvements
to implementations of the
<a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>,
<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>,
<a href="/pkg/crypto/aes/"><code>crypto/aes</code></a>,
<a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a>,
<a href="/pkg/crypto/ecdsa/"><code>crypto/ecdsa</code></a>, and
<a href="/pkg/sort/"><code>sort</code></a> packages.
</p>
<h2 id="library">Core library</h2>
<h3 id="http2">HTTP/2</h3>
<p>
Go 1.6 adds transparent support in the
<a href="/pkg/net/http/"><code>net/http</code></a> package
for the new <a href="https://http2.github.io/">HTTP/2 protocol</a>.
Go clients and servers will automatically use HTTP/2 as appropriate when using HTTPS.
There is no exported API specific to details of the HTTP/2 protocol handling,
just as there is no exported API specific to HTTP/1.1.
</p>
<p>
Programs that must disable HTTP/2 can do so by setting
<a href="/pkg/net/http/#Transport"><code>Transport.TLSNextProto</code></a> (for clients)
or
<a href="/pkg/net/http/#Server"><code>Server.TLSNextProto</code></a> (for servers)
to a non-nil, empty map.
</p>
<p>
Programs that must adjust HTTP/2 protocol-specific details can import and use
<a href="https://golang.org/x/net/http2"><code>golang.org/x/net/http2</code></a>,
in particular its
<a href="https://godoc.org/golang.org/x/net/http2/#ConfigureServer">ConfigureServer</a>
and
<a href="https://godoc.org/golang.org/x/net/http2/#ConfigureTransport">ConfigureTransport</a>
functions.
</p>
<h3 id="runtime">Runtime</h3>
<p>
The runtime has added lightweight, best-effort detection of concurrent misuse of maps.
As always, if one goroutine is writing to a map, no other goroutine should be
reading or writing the map concurrently.
If the runtime detects this condition, it prints a diagnosis and crashes the program.
The best way to find out more about the problem is to run the program
under the
<a href="https://blog.golang.org/race-detector">race detector</a>,
which will more reliably identify the race
and give more detail.
</p>
<p>
For program-ending panics, the runtime now by default
prints only the stack of the running goroutine,
not all existing goroutines.
Usually only the current goroutine is relevant to a panic,
so omitting the others significantly reduces irrelevant output
in a crash message.
To see the stacks from all goroutines in crash messages, set the environment variable
<code>GOTRACEBACK</code> to <code>all</code>
or call
<a href="/pkg/runtime/debug/#SetTraceback"><code>debug.SetTraceback</code></a>
before the crash, and rerun the program.
See the <a href="/pkg/runtime/#hdr-Environment_Variables">runtime documentation</a> for details.
</p>
<p>
<em>Updating</em>:
Uncaught panics intended to dump the state of the entire program,
such as when a timeout is detected or when explicitly handling a received signal,
should now call <code>debug.SetTraceback("all")</code> before panicking.
Searching for uses of
<a href="/pkg/os/signal/#Notify"><code>signal.Notify</code></a> may help identify such code.
</p>
<p>
On Windows, Go programs in Go 1.5 and earlier forced
the global Windows timer resolution to 1ms at startup
by calling <code>timeBeginPeriod(1)</code>.
Go no longer needs this for good scheduler performance,
and changing the global timer resolution caused problems on some systems,
so the call has been removed.
</p>
<p>
When using <code>-buildmode=c-archive</code> or
<code>-buildmode=c-shared</code> to build an archive or a shared
library, the handling of signals has changed.
In Go 1.5 the archive or shared library would install a signal handler
for most signals.
In Go 1.6 it will only install a signal handler for the
synchronous signals needed to handle run-time panics in Go code:
SIGBUS, SIGFPE, SIGSEGV.
See the <a href="/pkg/os/signal">os/signal</a> package for more
details.
</p>
<h3 id="reflect">Reflect</h3>
<p>
The
<a href="/pkg/reflect/"><code>reflect</code></a> package has
<a href="https://golang.org/issue/12367">resolved a long-standing incompatibility</a>
between the gc and gccgo toolchains
regarding embedded unexported struct types containing exported fields.
Code that walks data structures using reflection, especially to implement
serialization in the spirit
of the
<a href="/pkg/encoding/json/"><code>encoding/json</code></a> and
<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> packages,
may need to be updated.
</p>
<p>
The problem arises when using reflection to walk through
an embedded unexported struct-typed field
into an exported field of that struct.
In this case, <code>reflect</code> had incorrectly reported
the embedded field as exported, by returning an empty <code>Field.PkgPath</code>.
Now it correctly reports the field as unexported
but ignores that fact when evaluating access to exported fields
contained within the struct.
</p>
<p>
<em>Updating</em>:
Typically, code that previously walked over structs and used
</p>
<pre>
f.PkgPath != ""
</pre>
<p>
to exclude inaccessible fields
should now use
</p>
<pre>
f.PkgPath != "" &amp;&amp; !f.Anonymous
</pre>
<p>
For example, see the changes to the implementations of
<a href="https://go-review.googlesource.com/#/c/14011/2/src/encoding/json/encode.go"><code>encoding/json</code></a> and
<a href="https://go-review.googlesource.com/#/c/14012/2/src/encoding/xml/typeinfo.go"><code>encoding/xml</code></a>.
</p>
<h3 id="sort">Sorting</h3>
<p>
In the
<a href="/pkg/sort/"><code>sort</code></a>
package,
the implementation of
<a href="/pkg/sort/#Sort"><code>Sort</code></a>
has been rewritten to make about 10% fewer calls to the
<a href="/pkg/sort/#Interface"><code>Interface</code></a>'s
<code>Less</code> and <code>Swap</code>
methods, with a corresponding overall time savings.
The new algorithm does choose a different ordering than before
for values that compare equal (those pairs for which <code>Less(i,</code> <code>j)</code> and <code>Less(j,</code> <code>i)</code> are false).
</p>
<p>
<em>Updating</em>:
The definition of <code>Sort</code> makes no guarantee about the final order of equal values,
but the new behavior may still break programs that expect a specific order.
Such programs should either refine their <code>Less</code> implementations
to report the desired order
or should switch to
<a href="/pkg/sort/#Stable"><code>Stable</code></a>,
which preserves the original input order
of equal values.
</p>
<h3 id="template">Templates</h3>
<p>
In the
<a href="/pkg/text/template/">text/template</a> package,
there are two significant new features to make writing templates easier.
</p>
<p>
First, it is now possible to <a href="/pkg/text/template/#hdr-Text_and_spaces">trim spaces around template actions</a>,
which can make template definitions more readable.
A minus sign at the beginning of an action says to trim space before the action,
and a minus sign at the end of an action says to trim space after the action.
For example, the template
</p>
<pre>
{{"{{"}}23 -}}
&lt;
{{"{{"}}- 45}}
</pre>
<p>
formats as <code>23&lt;45</code>.
</p>
<p>
Second, the new <a href="/pkg/text/template/#hdr-Actions"><code>{{"{{"}}block}}</code> action</a>,
combined with allowing redefinition of named templates,
provides a simple way to define pieces of a template that
can be replaced in different instantiations.
There is <a href="/pkg/text/template/#example_Template_block">an example</a>
in the <code>text/template</code> package that demonstrates this new feature.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<ul>
<li>
The <a href="/pkg/archive/tar/"><code>archive/tar</code></a> package's
implementation corrects many bugs in rare corner cases of the file format.
One visible change is that the
<a href="/pkg/archive/tar/#Reader"><code>Reader</code></a> type's
<a href="/pkg/archive/tar/#Reader.Read"><code>Read</code></a> method
now presents the content of special file types as being empty,
returning <code>io.EOF</code> immediately.
</li>
<li>
In the <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package, the
<a href="/pkg/archive/zip/#Reader"><code>Reader</code></a> type now has a
<a href="/pkg/archive/zip/#Reader.RegisterDecompressor"><code>RegisterDecompressor</code></a> method,
and the
<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> type now has a
<a href="/pkg/archive/zip/#Writer.RegisterCompressor"><code>RegisterCompressor</code></a> method,
enabling control over compression options for individual zip files.
These take precedence over the pre-existing global
<a href="/pkg/archive/zip/#RegisterDecompressor"><code>RegisterDecompressor</code></a> and
<a href="/pkg/archive/zip/#RegisterCompressor"><code>RegisterCompressor</code></a> functions.
</li>
<li>
The <a href="/pkg/bufio/"><code>bufio</code></a> package's
<a href="/pkg/bufio/#Scanner"><code>Scanner</code></a> type now has a
<a href="/pkg/bufio/#Scanner.Buffer"><code>Buffer</code></a> method,
to specify an initial buffer and maximum buffer size to use during scanning.
This makes it possible, when needed, to scan tokens larger than
<code>MaxScanTokenSize</code>.
Also for the <code>Scanner</code>, the package now defines the
<a href="/pkg/bufio/#ErrFinalToken"><code>ErrFinalToken</code></a> error value, for use by
<a href="/pkg/bufio/#SplitFunc">split functions</a> to abort processing or to return a final empty token.
</li>
<li>
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a> package
has deprecated its
<a href="/pkg/compress/flate/#ReadError"><code>ReadError</code></a> and
<a href="/pkg/compress/flate/#WriteError"><code>WriteError</code></a> error implementations.
In Go 1.5 they were only rarely returned when an error was encountered;
now they are never returned, although they remain defined for compatibility.
</li>
<li>
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>, and
<a href="/pkg/compress/zlib/"><code>compress/zlib</code></a> packages
now report
<a href="/pkg/io/#ErrUnexpectedEOF"><code>io.ErrUnexpectedEOF</code></a> for truncated input streams, instead of
<a href="/pkg/io/#EOF"><code>io.EOF</code></a>.
</li>
<li>
The <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package now
overwrites the destination buffer in the event of a GCM decryption failure.
This is to allow the AESNI code to avoid using a temporary buffer.
</li>
<li>
The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
has a variety of minor changes.
It now allows
<a href="/pkg/crypto/tls/#Listen"><code>Listen</code></a>
to succeed when the
<a href="/pkg/crypto/tls/#Config"><code>Config</code></a>
has a nil <code>Certificates</code>, as long as the <code>GetCertificate</code> callback is set,
it adds support for RSA with AES-GCM cipher suites,
and
it adds a
<a href="/pkg/crypto/tls/#RecordHeaderError"><code>RecordHeaderError</code></a>
to allow clients (in particular, the <a href="/pkg/net/http/"><code>net/http</code></a> package)
to report a better error when attempting a TLS connection to a non-TLS server.
</li>
<li>
The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
now permits certificates to contain negative serial numbers
(technically an error, but unfortunately common in practice),
and it defines a new
<a href="/pkg/crypto/x509/#InsecureAlgorithmError"><code>InsecureAlgorithmError</code></a>
to give a better error message when rejecting a certificate
signed with an insecure algorithm like MD5.
</li>
<li>
The <a href="/pkg/debug/dwarf"><code>debug/dwarf</code></a> and
<a href="/pkg/debug/elf/"><code>debug/elf</code></a> packages
together add support for compressed DWARF sections.
User code needs no updating: the sections are decompressed automatically when read.
</li>
<li>
The <a href="/pkg/debug/elf/"><code>debug/elf</code></a> package
adds support for general compressed ELF sections.
User code needs no updating: the sections are decompressed automatically when read.
However, compressed
<a href="/pkg/debug/elf/#Section"><code>Sections</code></a> do not support random access:
they have a nil <code>ReaderAt</code> field.
</li>
<li>
The <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package
now exports
<a href="/pkg/encoding/asn1/#pkg-constants">tag and class constants</a>
useful for advanced parsing of ASN.1 structures.
</li>
<li>
Also in the <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package,
<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now rejects various non-standard integer and length encodings.
</li>
<li>
The <a href="/pkg/encoding/base64"><code>encoding/base64</code></a> package's
<a href="/pkg/encoding/base64/#Decoder"><code>Decoder</code></a> has been fixed
to process the final bytes of its input. Previously it processed as many four-byte tokens as
possible but ignored the remainder, up to three bytes.
The <code>Decoder</code> therefore now handles inputs in unpadded encodings (like
<a href="/pkg/encoding/base64/#RawURLEncoding">RawURLEncoding</a>) correctly,
but it also rejects inputs in padded encodings that are truncated or end with invalid bytes,
such as trailing spaces.
</li>
<li>
The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
now checks the syntax of a
<a href="/pkg/encoding/json/#Number"><code>Number</code></a>
before marshaling it, requiring that it conforms to the JSON specification for numeric values.
As in previous releases, the zero <code>Number</code> (an empty string) is marshaled as a literal 0 (zero).
</li>
<li>
The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package's
<a href="/pkg/encoding/xml/#Marshal"><code>Marshal</code></a>
function now supports a <code>cdata</code> attribute, such as <code>chardata</code>
but encoding its argument in one or more <code>&lt;![CDATA[ ... ]]&gt;</code> tags.
</li>
<li>
Also in the <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package,
<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a>'s
<a href="/pkg/encoding/xml/#Decoder.Token"><code>Token</code></a> method
now reports an error when encountering EOF before seeing all open tags closed,
consistent with its general requirement that tags in the input be properly matched.
To avoid that requirement, use
<a href="/pkg/encoding/xml/#Decoder.RawToken"><code>RawToken</code></a>.
</li>
<li>
The <a href="/pkg/fmt/"><code>fmt</code></a> package now allows
any integer type as an argument to
<a href="/pkg/fmt/#Printf"><code>Printf</code></a>'s <code>*</code> width and precision specification.
In previous releases, the argument to <code>*</code> was required to have type <code>int</code>.
</li>
<li>
Also in the <a href="/pkg/fmt/"><code>fmt</code></a> package,
<a href="/pkg/fmt/#Scanf"><code>Scanf</code></a> can now scan hexadecimal strings using %X, as an alias for %x.
Both formats accept any mix of upper- and lower-case hexadecimal.
</li>
<li>
The <a href="/pkg/image/"><code>image</code></a>
and
<a href="/pkg/image/color/"><code>image/color</code></a> packages
add
<a href="/pkg/image/#NYCbCrA"><code>NYCbCrA</code></a>
and
<a href="/pkg/image/color/#NYCbCrA"><code>NYCbCrA</code></a>
types, to support Y'CbCr images with non-premultiplied alpha.
</li>
<li>
The <a href="/pkg/io/"><code>io</code></a> package's
<a href="/pkg/io/#MultiWriter"><code>MultiWriter</code></a>
implementation now implements a <code>WriteString</code> method,
for use by
<a href="/pkg/io/#WriteString"><code>WriteString</code></a>.
</li>
<li>
In the <a href="/pkg/math/big/"><code>math/big</code></a> package,
<a href="/pkg/math/big/#Int"><code>Int</code></a> adds
<a href="/pkg/math/big/#Int.Append"><code>Append</code></a>
and
<a href="/pkg/math/big/#Int.Text"><code>Text</code></a>
methods to give more control over printing.
</li>
<li>
Also in the <a href="/pkg/math/big/"><code>math/big</code></a> package,
<a href="/pkg/math/big/#Float"><code>Float</code></a> now implements
<a href="/pkg/encoding/#TextMarshaler"><code>encoding.TextMarshaler</code></a> and
<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>,
allowing it to be serialized in a natural form by the
<a href="/pkg/encoding/json/"><code>encoding/json</code></a> and
<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> packages.
</li>
<li>
Also in the <a href="/pkg/math/big/"><code>math/big</code></a> package,
<a href="/pkg/math/big/#Float"><code>Float</code></a>'s
<a href="/pkg/math/big/#Float.Append"><code>Append</code></a> method now supports the special precision argument -1.
As in
<a href="/pkg/strconv/#ParseFloat"><code>strconv.ParseFloat</code></a>,
precision -1 means to use the smallest number of digits necessary such that
<a href="/pkg/math/big/#Float.Parse"><code>Parse</code></a>
reading the result into a <code>Float</code> of the same precision
will yield the original value.
</li>
<li>
The <a href="/pkg/math/rand/"><code>math/rand</code></a> package
adds a
<a href="/pkg/math/rand/#Read"><code>Read</code></a>
function, and likewise
<a href="/pkg/math/rand/#Rand"><code>Rand</code></a> adds a
<a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> method.
These make it easier to generate pseudorandom test data.
Note that, like the rest of the package,
these should not be used in cryptographic settings;
for such purposes, use the <a href="/pkg/crypto/rand/"><code>crypto/rand</code></a> package instead.
</li>
<li>
The <a href="/pkg/net/"><code>net</code></a> package's
<a href="/pkg/net/#ParseMAC"><code>ParseMAC</code></a> function now accepts 20-byte IP-over-InfiniBand (IPoIB) link-layer addresses.
</li>
<li>
Also in the <a href="/pkg/net/"><code>net</code></a> package,
there have been a few changes to DNS lookups.
First, the
<a href="/pkg/net/#DNSError"><code>DNSError</code></a> error implementation now implements
<a href="/pkg/net/#Error"><code>Error</code></a>,
and in particular its new
<a href="/pkg/net/#DNSError.IsTemporary"><code>IsTemporary</code></a>
method returns true for DNS server errors.
Second, DNS lookup functions such as
<a href="/pkg/net/#LookupAddr"><code>LookupAddr</code></a>
now return rooted domain names (with a trailing dot)
on Plan 9 and Windows, to match the behavior of Go on Unix systems.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package has
a number of minor additions beyond the HTTP/2 support already discussed.
First, the
<a href="/pkg/net/http/#FileServer"><code>FileServer</code></a> now sorts its generated directory listings by file name.
Second, the
<a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a> function now refuses to serve a result
if the request's URL path contains &ldquo;..&rdquo; (dot-dot) as a path element.
Programs should typically use <code>FileServer</code> and
<a href="/pkg/net/http/#Dir"><code>Dir</code></a>
instead of calling <code>ServeFile</code> directly.
Programs that need to serve file content in response to requests for URLs containing dot-dot can
still call <a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a>.
Third, the
<a href="/pkg/net/http/#Client"><code>Client</code></a> now allows user code to set the
<code>Expect:</code> <code>100-continue</code> header (see
<a href="/pkg/net/http/#Transport"><code>Transport.ExpectContinueTimeout</code></a>).
Fourth, there are
<a href="/pkg/net/http/#pkg-constants">five new error codes</a>:
<code>StatusPreconditionRequired</code> (428),
<code>StatusTooManyRequests</code> (429),
<code>StatusRequestHeaderFieldsTooLarge</code> (431), and
<code>StatusNetworkAuthenticationRequired</code> (511) from RFC 6585,
as well as the recently-approved
<code>StatusUnavailableForLegalReasons</code> (451).
Fifth, the implementation and documentation of
<a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
has been substantially changed.
The <a href="/pkg/net/http/#Hijacker"><code>Hijacker</code></a>
interface now works correctly on connections that have previously
been used with <code>CloseNotifier</code>.
The documentation now describes when <code>CloseNotifier</code>
is expected to work.
</li>
<li>
Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
there are a few changes related to the handling of a
<a href="/pkg/net/http/#Request"><code>Request</code></a> data structure with its <code>Method</code> field set to the empty string.
An empty <code>Method</code> field has always been documented as an alias for <code>"GET"</code>
and it remains so.
However, Go 1.6 fixes a few routines that did not treat an empty
<code>Method</code> the same as an explicit <code>"GET"</code>.
Most notably, in previous releases
<a href="/pkg/net/http/#Client"><code>Client</code></a> followed redirects only with
<code>Method</code> set explicitly to <code>"GET"</code>;
in Go 1.6 <code>Client</code> also follows redirects for the empty <code>Method</code>.
Finally,
<a href="/pkg/net/http/#NewRequest"><code>NewRequest</code></a> accepts a <code>method</code> argument that has not been
documented as allowed to be empty.
In past releases, passing an empty <code>method</code> argument resulted
in a <code>Request</code> with an empty <code>Method</code> field.
In Go 1.6, the resulting <code>Request</code> always has an initialized
<code>Method</code> field: if its argument is an empty string, <code>NewRequest</code>
sets the <code>Method</code> field in the returned <code>Request</code> to <code>"GET"</code>.
</li>
<li>
The <a href="/pkg/net/http/httptest/"><code>net/http/httptest</code></a> package's
<a href="/pkg/net/http/httptest/#ResponseRecorder"><code>ResponseRecorder</code></a> now initializes a default Content-Type header
using the same content-sniffing algorithm as in
<a href="/pkg/net/http/#Server"><code>http.Server</code></a>.
</li>
<li>
The <a href="/pkg/net/url/"><code>net/url</code></a> package's
<a href="/pkg/net/url/#Parse"><code>Parse</code></a> is now stricter and more spec-compliant regarding the parsing
of host names.
For example, spaces in the host name are no longer accepted.
</li>
<li>
Also in the <a href="/pkg/net/url/"><code>net/url</code></a> package,
the <a href="/pkg/net/url/#Error"><code>Error</code></a> type now implements
<a href="/pkg/net/#Error"><code>net.Error</code></a>.
</li>
<li>
The <a href="/pkg/os/"><code>os</code></a> package's
<a href="/pkg/os/#IsExist"><code>IsExist</code></a>,
<a href="/pkg/os/#IsNotExist"><code>IsNotExist</code></a>,
and
<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>
now return correct results when inquiring about an
<a href="/pkg/os/#SyscallError"><code>SyscallError</code></a>.
</li>
<li>
On Unix-like systems, when a write
to <a href="/pkg/os/#pkg-variables"><code>os.Stdout</code>
or <code>os.Stderr</code></a> (more precisely, an <code>os.File</code>
opened for file descriptor 1 or 2) fails due to a broken pipe error,
the program will raise a <code>SIGPIPE</code> signal.
By default this will cause the program to exit; this may be changed by
calling the
<a href="/pkg/os/signal"><code>os/signal</code></a>
<a href="/pkg/os/signal/#Notify"><code>Notify</code></a> function
for <code>syscall.SIGPIPE</code>.
A write to a broken pipe on a file descriptor other 1 or 2 will simply
return <code>syscall.EPIPE</code> (possibly wrapped in
<a href="/pkg/os#PathError"><code>os.PathError</code></a>
and/or <a href="/pkg/os#SyscallError"><code>os.SyscallError</code></a>)
to the caller.
The old behavior of raising an uncatchable <code>SIGPIPE</code> signal
after 10 consecutive writes to a broken pipe no longer occurs.
</li>
<li>
In the <a href="/pkg/os/exec/"><code>os/exec</code></a> package,
<a href="/pkg/os/exec/#Cmd"><code>Cmd</code></a>'s
<a href="/pkg/os/exec/#Cmd.Output"><code>Output</code></a> method continues to return an
<a href="/pkg/os/exec/#ExitError"><code>ExitError</code></a> when a command exits with an unsuccessful status.
If standard error would otherwise have been discarded,
the returned <code>ExitError</code> now holds a prefix and suffix
(currently 32 kB) of the failed command's standard error output,
for debugging or for inclusion in error messages.
The <code>ExitError</code>'s
<a href="/pkg/os/exec/#ExitError.String"><code>String</code></a>
method does not show the captured standard error;
programs must retrieve it from the data structure
separately.
</li>
<li>
On Windows, the <a href="/pkg/path/filepath/"><code>path/filepath</code></a> package's
<a href="/pkg/path/filepath/#Join"><code>Join</code></a> function now correctly handles the case when the base is a relative drive path.
For example, <code>Join(`c:`,</code> <code>`a`)</code> now
returns <code>`c:a`</code> instead of <code>`c:\a`</code> as in past releases.
This may affect code that expects the incorrect result.
</li>
<li>
In the <a href="/pkg/regexp/"><code>regexp</code></a> package,
the
<a href="/pkg/regexp/#Regexp"><code>Regexp</code></a> type has always been safe for use by
concurrent goroutines.
It uses a <a href="/pkg/sync/#Mutex"><code>sync.Mutex</code></a> to protect
a cache of scratch spaces used during regular expression searches.
Some high-concurrency servers using the same <code>Regexp</code> from many goroutines
have seen degraded performance due to contention on that mutex.
To help such servers, <code>Regexp</code> now has a
<a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a> method,
which makes a copy of a <code>Regexp</code> that shares most of the structure
of the original but has its own scratch space cache.
Two goroutines can use different copies of a <code>Regexp</code>
without mutex contention.
A copy does have additional space overhead, so <code>Copy</code>
should only be used when contention has been observed.
</li>
<li>
The <a href="/pkg/strconv/"><code>strconv</code></a> package adds
<a href="/pkg/strconv/#IsGraphic"><code>IsGraphic</code></a>,
similar to <a href="/pkg/strconv/#IsPrint"><code>IsPrint</code></a>.
It also adds
<a href="/pkg/strconv/#QuoteToGraphic"><code>QuoteToGraphic</code></a>,
<a href="/pkg/strconv/#QuoteRuneToGraphic"><code>QuoteRuneToGraphic</code></a>,
<a href="/pkg/strconv/#AppendQuoteToGraphic"><code>AppendQuoteToGraphic</code></a>,
and
<a href="/pkg/strconv/#AppendQuoteRuneToGraphic"><code>AppendQuoteRuneToGraphic</code></a>,
analogous to
<a href="/pkg/strconv/#QuoteToASCII"><code>QuoteToASCII</code></a>,
<a href="/pkg/strconv/#QuoteRuneToASCII"><code>QuoteRuneToASCII</code></a>,
and so on.
The <code>ASCII</code> family escapes all space characters except ASCII space (U+0020).
In contrast, the <code>Graphic</code> family does not escape any Unicode space characters (category Zs).
</li>
<li>
In the <a href="/pkg/testing/"><code>testing</code></a> package,
when a test calls
<a href="/pkg/testing/#T.Parallel">t.Parallel</a>,
that test is paused until all non-parallel tests complete, and then
that test continues execution with all other parallel tests.
Go 1.6 changes the time reported for such a test:
previously the time counted only the parallel execution,
but now it also counts the time from the start of testing
until the call to <code>t.Parallel</code>.
</li>
<li>
The <a href="/pkg/text/template/"><code>text/template</code></a> package
contains two minor changes, in addition to the <a href="#template">major changes</a>
described above.
First, it adds a new
<a href="/pkg/text/template/#ExecError"><code>ExecError</code></a> type
returned for any error during
<a href="/pkg/text/template/#Template.Execute"><code>Execute</code></a>
that does not originate in a <code>Write</code> to the underlying writer.
Callers can distinguish template usage errors from I/O errors by checking for
<code>ExecError</code>.
Second, the
<a href="/pkg/text/template/#Template.Funcs"><code>Funcs</code></a> method
now checks that the names used as keys in the
<a href="/pkg/text/template/#FuncMap"><code>FuncMap</code></a>
are identifiers that can appear in a template function invocation.
If not, <code>Funcs</code> panics.
</li>
<li>
The <a href="/pkg/time/"><code>time</code></a> package's
<a href="/pkg/time/#Parse"><code>Parse</code></a> function has always rejected any day of month larger than 31,
such as January 32.
In Go 1.6, <code>Parse</code> now also rejects February 29 in non-leap years,
February 30, February 31, April 31, June 31, September 31, and November 31.
</li>
</ul>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,202 +0,0 @@
<!--{
"Title": "Go 1 and the Future of Go Programs",
"Path": "/doc/go1compat"
}-->
<h2 id="introduction">Introduction</h2>
<p>
The release of Go version 1, Go 1 for short, is a major milestone
in the development of the language. Go 1 is a stable platform for
the growth of programs and projects written in Go.
</p>
<p>
Go 1 defines two things: first, the specification of the language;
and second, the specification of a set of core APIs, the "standard
packages" of the Go library. The Go 1 release includes their
implementation in the form of two compiler suites (gc and gccgo),
and the core libraries themselves.
</p>
<p>
It is intended that programs written to the Go 1 specification will
continue to compile and run correctly, unchanged, over the lifetime
of that specification. At some indefinite point, a Go 2 specification
may arise, but until that time, Go programs that work today should
continue to work even as future "point" releases of Go 1 arise (Go
1.1, Go 1.2, etc.).
</p>
<p>
Compatibility is at the source level. Binary compatibility for
compiled packages is not guaranteed between releases. After a point
release, Go source will need to be recompiled to link against the
new release.
</p>
<p>
The APIs may grow, acquiring new packages and features, but not in
a way that breaks existing Go 1 code.
</p>
<h2 id="expectations">Expectations</h2>
<p>
Although we expect that the vast majority of programs will maintain
this compatibility over time, it is impossible to guarantee that
no future change will break any program. This document is an attempt
to set expectations for the compatibility of Go 1 software in the
future. There are a number of ways in which a program that compiles
and runs today may fail to do so after a future point release. They
are all unlikely but worth recording.
</p>
<ul>
<li>
Security. A security issue in the specification or implementation
may come to light whose resolution requires breaking compatibility.
We reserve the right to address such security issues.
</li>
<li>
Unspecified behavior. The Go specification tries to be explicit
about most properties of the language, but there are some aspects
that are undefined. Programs that depend on such unspecified behavior
may break in future releases.
</li>
<li>
Specification errors. If it becomes necessary to address an
inconsistency or incompleteness in the specification, resolving the
issue could affect the meaning or legality of existing programs.
We reserve the right to address such issues, including updating the
implementations. Except for security issues, no incompatible changes
to the specification would be made.
</li>
<li>
Bugs. If a compiler or library has a bug that violates the
specification, a program that depends on the buggy behavior may
break if the bug is fixed. We reserve the right to fix such bugs.
</li>
<li>
Struct literals. For the addition of features in later point
releases, it may be necessary to add fields to exported structs in
the API. Code that uses unkeyed struct literals (such as pkg.T{3,
"x"}) to create values of these types would fail to compile after
such a change. However, code that uses keyed literals (pkg.T{A:
3, B: "x"}) will continue to compile after such a change. We will
update such data structures in a way that allows keyed struct
literals to remain compatible, although unkeyed literals may fail
to compile. (There are also more intricate cases involving nested
data structures or interfaces, but they have the same resolution.)
We therefore recommend that composite literals whose type is defined
in a separate package should use the keyed notation.
</li>
<li>
Methods. As with struct fields, it may be necessary to add methods
to types.
Under some circumstances, such as when the type is embedded in
a struct along with another type,
the addition of the new method may break
the struct by creating a conflict with an existing method of the other
embedded type.
We cannot protect against this rare case and do not guarantee compatibility
should it arise.
</li>
<li>
Dot imports. If a program imports a standard package
using <code>import . "path"</code>, additional names defined in the
imported package in future releases may conflict with other names
defined in the program. We do not recommend the use of <code>import .</code>
outside of tests, and using it may cause a program to fail
to compile in future releases.
</li>
<li>
Use of package <code>unsafe</code>. Packages that import
<a href="/pkg/unsafe/"><code>unsafe</code></a>
may depend on internal properties of the Go implementation.
We reserve the right to make changes to the implementation
that may break such programs.
</li>
</ul>
<p>
Of course, for all of these possibilities, should they arise, we
would endeavor whenever feasible to update the specification,
compilers, or libraries without affecting existing code.
</p>
<p>
These same considerations apply to successive point releases. For
instance, code that runs under Go 1.2 should be compatible with Go
1.2.1, Go 1.3, Go 1.4, etc., although not necessarily with Go 1.1
since it may use features added only in Go 1.2
</p>
<p>
Features added between releases, available in the source repository
but not part of the numbered binary releases, are under active
development. No promise of compatibility is made for software using
such features until they have been released.
</p>
<p>
Finally, although it is not a correctness issue, it is possible
that the performance of a program may be affected by
changes in the implementation of the compilers or libraries upon
which it depends.
No guarantee can be made about the performance of a
given program between releases.
</p>
<p>
Although these expectations apply to Go 1 itself, we hope similar
considerations would be made for the development of externally
developed software based on Go 1.
</p>
<h2 id="subrepos">Sub-repositories</h2>
<p>
Code in sub-repositories of the main go tree, such as
<a href="//golang.org/x/net">golang.org/x/net</a>,
may be developed under
looser compatibility requirements. However, the sub-repositories
will be tagged as appropriate to identify versions that are compatible
with the Go 1 point releases.
</p>
<h2 id="operating_systems">Operating systems</h2>
<p>
It is impossible to guarantee long-term compatibility with operating
system interfaces, which are changed by outside parties.
The <a href="/pkg/syscall/"><code>syscall</code></a> package
is therefore outside the purview of the guarantees made here.
As of Go version 1.4, the <code>syscall</code> package is frozen.
Any evolution of the system call interface must be supported elsewhere,
such as in the
<a href="//golang.org/x/sys">go.sys</a> subrepository.
For details and background, see
<a href="//golang.org/s/go1.4-syscall">this document</a>.
</p>
<h2 id="tools">Tools</h2>
<p>
Finally, the Go toolchain (compilers, linkers, build tools, and so
on) is under active development and may change behavior. This
means, for instance, that scripts that depend on the location and
properties of the tools may be broken by a point release.
</p>
<p>
These caveats aside, we believe that Go 1 will be a firm foundation
for the development of Go and its ecosystem.
</p>

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of Oct 7, 2020",
"Subtitle": "Version of Jul 1, 2021",
"Path": "/ref/spec"
}-->
@ -830,7 +830,7 @@ The underlying type of <code>[]B1</code>, <code>B3</code>, and <code>B4</code> i
<h3 id="Method_sets">Method sets</h3>
<p>
A type may have a <i>method set</i> associated with it.
A type has a (possibly empty) <i>method set</i> associated with it.
The method set of an <a href="#Interface_types">interface type</a> is its interface.
The method set of any other type <code>T</code> consists of all
<a href="#Method_declarations">methods</a> declared with receiver type <code>T</code>.
@ -3400,7 +3400,7 @@ A type assertion used in an <a href="#Assignments">assignment</a> or initializat
v, ok = x.(T)
v, ok := x.(T)
var v, ok = x.(T)
var v, ok T1 = x.(T)
var v, ok interface{} = x.(T) // dynamic types of v and ok are T and bool
</pre>
<p>
@ -3446,7 +3446,7 @@ In a function call, the function value and arguments are evaluated in
After they are evaluated, the parameters of the call are passed by value to the function
and the called function begins execution.
The return parameters of the function are passed by value
back to the calling function when the function returns.
back to the caller when the function returns.
</p>
<p>
@ -3532,9 +3532,9 @@ within <code>Greeting</code>, <code>who</code> will have the value
</p>
<p>
If the final argument is assignable to a slice type <code>[]T</code>, it is
passed unchanged as the value for a <code>...T</code> parameter if the argument
is followed by <code>...</code>. In this case no new slice is created.
If the final argument is assignable to a slice type <code>[]T</code> and
is followed by <code>...</code>, it is passed unchanged as the value
for a <code>...T</code> parameter. In this case no new slice is created.
</p>
<p>
@ -3681,8 +3681,8 @@ The bitwise logical and shift operators apply to integers only.
^ bitwise XOR integers
&amp;^ bit clear (AND NOT) integers
&lt;&lt; left shift integer &lt;&lt; unsigned integer
&gt;&gt; right shift integer &gt;&gt; unsigned integer
&lt;&lt; left shift integer &lt;&lt; integer &gt;= 0
&gt;&gt; right shift integer &gt;&gt; integer &gt;= 0
</pre>
@ -4164,6 +4164,10 @@ in any of these cases:
<li>
<code>x</code> is a string and <code>T</code> is a slice of bytes or runes.
</li>
<li>
<code>x</code> is a slice, <code>T</code> is a pointer to an array,
and the slice and array types have <a href="#Type_identity">identical</a> element types.
</li>
</ul>
<p>
@ -4314,6 +4318,24 @@ MyRunes("白鵬翔") // []rune{0x767d, 0x9d6c, 0x7fd4}
</li>
</ol>
<h4 id="Conversions_from_slice_to_array_pointer">Conversions from slice to array pointer</h4>
<p>
Converting a slice to an array pointer yields a pointer to the underlying array of the slice.
If the <a href="#Length_and_capacity">length</a> of the slice is less than the length of the array,
a <a href="#Run_time_panics">run-time panic</a> occurs.
</p>
<pre>
s := make([]byte, 2, 4)
s0 := (*[0]byte)(s) // s0 != nil
s2 := (*[2]byte)(s) // &amp;s2[0] == &amp;s[0]
s4 := (*[4]byte)(s) // panics: len([4]byte) > len(s)
var t []string
t0 := (*[0]string)(t) // t0 == nil
t1 := (*[1]string)(t) // panics: len([1]string) > len(s)
</pre>
<h3 id="Constant_expressions">Constant expressions</h3>
@ -4648,7 +4670,7 @@ The following built-in functions are not permitted in statement context:
<pre>
append cap complex imag len make new real
unsafe.Alignof unsafe.Offsetof unsafe.Sizeof
unsafe.Add unsafe.Alignof unsafe.Offsetof unsafe.Sizeof unsafe.Slice
</pre>
<pre>
@ -4887,7 +4909,7 @@ if x := f(); x &lt; y {
<p>
"Switch" statements provide multi-way execution.
An expression or type specifier is compared to the "cases"
An expression or type is compared to the "cases"
inside the "switch" to determine which branch
to execute.
</p>
@ -4931,9 +4953,9 @@ ExprSwitchCase = "case" ExpressionList | "default" .
<p>
If the switch expression evaluates to an untyped constant, it is first implicitly
<a href="#Conversions">converted</a> to its <a href="#Constants">default type</a>;
if it is an untyped boolean value, it is first implicitly converted to type <code>bool</code>.
<a href="#Conversions">converted</a> to its <a href="#Constants">default type</a>.
The predeclared untyped value <code>nil</code> cannot be used as a switch expression.
The switch expression type must be <a href="#Comparison_operators">comparable</a>.
</p>
<p>
@ -4998,7 +5020,7 @@ floating point, or string constants in case expressions.
A type switch compares types rather than values. It is otherwise similar
to an expression switch. It is marked by a special switch expression that
has the form of a <a href="#Type_assertions">type assertion</a>
using the reserved word <code>type</code> rather than an actual type:
using the keyword <code>type</code> rather than an actual type:
</p>
<pre>
@ -6689,6 +6711,10 @@ type Pointer *ArbitraryType
func Alignof(variable ArbitraryType) uintptr
func Offsetof(selector ArbitraryType) uintptr
func Sizeof(variable ArbitraryType) uintptr
type IntegerType int // shorthand for an integer type; it is not a real type
func Add(ptr Pointer, len IntegerType) Pointer
func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType
</pre>
<p>
@ -6745,6 +6771,40 @@ Calls to <code>Alignof</code>, <code>Offsetof</code>, and
<code>Sizeof</code> are compile-time constant expressions of type <code>uintptr</code>.
</p>
<p>
The function <code>Add</code> adds <code>len</code> to <code>ptr</code>
and returns the updated pointer <code>unsafe.Pointer(uintptr(ptr) + uintptr(len))</code>.
The <code>len</code> argument must be of integer type or an untyped <a href="#Constants">constant</a>.
A constant <code>len</code> argument must be <a href="#Representability">representable</a> by a value of type <code>int</code>;
if it is an untyped constant it is given type <code>int</code>.
The rules for <a href="/pkg/unsafe#Pointer">valid uses</a> of <code>Pointer</code> still apply.
</p>
<p>
The function <code>Slice</code> returns a slice whose underlying array starts at <code>ptr</code>
and whose length and capacity are <code>len</code>.
<code>Slice(ptr, len)</code> is equivalent to
</p>
<pre>
(*[len]ArbitraryType)(unsafe.Pointer(ptr))[:]
</pre>
<p>
except that, as a special case, if <code>ptr</code>
is <code>nil</code> and <code>len</code> is zero,
<code>Slice</code> returns <code>nil</code>.
</p>
<p>
The <code>len</code> argument must be of integer type or an untyped <a href="#Constants">constant</a>.
A constant <code>len</code> argument must be non-negative and <a href="#Representability">representable</a> by a value of type <code>int</code>;
if it is an untyped constant it is given type <code>int</code>.
At run time, if <code>len</code> is negative,
or if <code>ptr</code> is <code>nil</code> and <code>len</code> is not zero,
a <a href="#Run_time_panics">run-time panic</a> occurs.
</p>
<h3 id="Size_and_alignment_guarantees">Size and alignment guarantees</h3>
<p>

View file

@ -1,3 +0,0 @@
The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
The design is licensed under the Creative Commons 3.0 Attributions license.
Read this article for more details: https://blog.golang.org/gopher

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -1,238 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 32 32.000001"
id="svg4416"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="favicon.svg"
inkscape:export-filename="../../favicon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4418" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="17.966652"
inkscape:cy="9.2991824"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:snap-bbox="true"
inkscape:snap-bbox-edge-midpoints="false"
inkscape:bbox-nodes="true"
showguides="false"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-global="false">
<inkscape:grid
type="xygrid"
id="grid5148" />
</sodipodi:namedview>
<metadata
id="metadata4421">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="icon"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)">
<ellipse
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="ellipse4216"
cx="-907.35657"
cy="479.90009"
rx="3.5793996"
ry="3.8207953"
transform="matrix(-0.49169095,-0.87076978,-0.87076978,0.49169095,0,0)"
inkscape:transform-center-x="0.67794294"
inkscape:transform-center-y="-2.3634048" />
<ellipse
inkscape:transform-center-y="-2.3633882"
inkscape:transform-center-x="-0.67793718"
transform="matrix(0.49169095,-0.87076978,0.87076978,0.49169095,0,0)"
ry="3.8207953"
rx="3.5793996"
cy="507.8461"
cx="-891.57654"
id="ellipse4463"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 16.091693,1021.3642 c -1.105749,0.01 -2.210341,0.049 -3.31609,0.09 C 6.8422558,1021.6738 2,1026.3942 2,1032.3622 c 0,2.9786 0,13 0,20 l 28,0 c 0,-8 0,-16 0,-20 0,-5.9683 -4.667345,-10.4912 -10.59023,-10.908 -1.10575,-0.078 -2.212328,-0.099 -3.318077,-0.09 z"
id="path4465"
sodipodi:nodetypes="ccsccscc" />
<path
inkscape:transform-center-y="-1.3604657"
inkscape:transform-center-x="-0.98424303"
sodipodi:nodetypes="sssssss"
inkscape:connector-curvature="0"
id="path4469"
d="m 4.6078867,1025.0462 c 0.459564,0.2595 1.818262,1.2013 1.980983,1.648 0.183401,0.5035 0.159385,1.0657 -0.114614,1.551 -0.346627,0.6138 -1.005341,0.9487 -1.696421,0.9365 -0.339886,-0.01 -1.720283,-0.6372 -2.042561,-0.8192 -0.97754,-0.5519 -1.350795,-1.7418 -0.833686,-2.6576 0.517109,-0.9158 1.728749,-1.2107 2.706299,-0.6587 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32850246;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4473"
width="3.0866659"
height="3.5313663"
x="14.406213"
y="1035.6842"
ry="0.62426329" />
<path
inkscape:connector-curvature="0"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 16,1023.3622 c -9,0 -12,3.7153 -12,9 l 0,20 24,0 c -0.04889,-7.3562 0,-18 0,-20 0,-5.2848 -3,-9 -12,-9 z"
id="path4471"
sodipodi:nodetypes="zsccsz" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 27.074073,1025.0462 c -0.45957,0.2595 -1.818257,1.2013 -1.980979,1.648 -0.183401,0.5035 -0.159384,1.0657 0.114614,1.551 0.346627,0.6138 1.005335,0.9487 1.696415,0.9365 0.33988,-0.01 1.72029,-0.6372 2.04256,-0.8192 0.97754,-0.5519 1.35079,-1.7418 0.83369,-2.6576 -0.51711,-0.9158 -1.72876,-1.2107 -2.7063,-0.6587 z"
id="path4481"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssss"
inkscape:transform-center-x="0.98424094"
inkscape:transform-center-y="-1.3604657" />
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="circle4477"
cx="21.175734"
cy="1030.3542"
r="4.6537542"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<circle
r="4.8316345"
cy="1030.3542"
cx="10.339486"
id="circle4483"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename=".\rect4485.png"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32941176;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4246"
width="3.6673687"
height="4.1063409"
x="14.115863"
y="1035.9174"
ry="0.72590536" />
<rect
ry="0.72590536"
y="1035.2253"
x="14.115863"
height="4.1063409"
width="3.6673687"
id="rect4485"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fffcfb;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32941176;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 19.999735,1036.5289 c 0,0.838 -0.871228,1.2682 -2.144766,1.1659 -0.02366,0 -0.04795,-0.6004 -0.254147,-0.5832 -0.503669,0.042 -1.095902,-0.02 -1.685964,-0.02 -0.612939,0 -1.206342,0.1826 -1.68549,0.017 -0.110233,-0.038 -0.178298,0.5838 -0.261532,0.5816 -1.243685,-0.033 -2.078803,-0.3383 -2.078803,-1.1618 0,-1.2118 1.815635,-2.1941 4.055351,-2.1941 2.239704,0 4.055351,0.9823 4.055351,2.1941 z"
id="path4487"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssssss"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
sodipodi:nodetypes="sssssssss"
inkscape:connector-curvature="0"
id="path4489"
d="m 19.977414,1035.7004 c 0,0.5685 -0.433659,0.8554 -1.138091,1.0001 -0.291933,0.06 -0.630371,0.096 -1.003719,0.1166 -0.56405,0.032 -1.207782,0.031 -1.89122,0.031 -0.672834,0 -1.307182,0 -1.864904,-0.029 -0.306268,-0.017 -0.589429,-0.043 -0.843164,-0.084 -0.813833,-0.1318 -1.324962,-0.417 -1.324962,-1.0344 0,-1.1601 1.805642,-2.1006 4.03303,-2.1006 2.227377,0 4.03303,0.9405 4.03303,2.1006 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c38c74;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<ellipse
cy="1033.8501"
cx="15.944382"
id="ellipse4491"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#23201f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
rx="2.0801733"
ry="1.343747"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#171311;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="circle4493"
cx="12.414201"
cy="1030.3542"
r="1.9630634"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<circle
r="1.9630634"
cy="1030.3542"
cx="23.110121"
id="circle4495"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#171311;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4497"
d="m 5.0055377,1027.2727 c -1.170435,-1.0835 -2.026973,-0.7721 -2.044172,-0.7463"
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 4.3852457,1026.9152 c -1.158557,0.036 -1.346704,0.6303 -1.33881,0.6523"
id="path4499"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 26.630533,1027.1724 c 1.17043,-1.0835 2.02697,-0.7721 2.04417,-0.7463"
id="path4501"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4503"
d="m 27.321773,1026.673 c 1.15856,0.036 1.3467,0.6302 1.3388,0.6522"
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

Some files were not shown because too many files have changed in this diff Show more