- 26 Nov, 2018 2 commits
-
-
Rob Pike authored
Now that maps are printed in deterministic order, the map example can have multiple keys without breaking the build. Change-Id: Iccec0cd76a3d41c75d8d4eb768ec0ac09ad9f2ad Reviewed-on: https://go-review.googlesource.com/c/151218Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
The String method is n-squared and overwrites its receiver. Fix both issues, with only a slight loss of clarity. Fixes #28773 Change-Id: I588f69d4cbd72931b28b984671512834473bd466 Reviewed-on: https://go-review.googlesource.com/c/151217Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Nov, 2018 1 commit
-
-
Alex Brainman authored
TestImportTableInUnknownSection was introduced in CL 110555 to test PE executable with import table located in section other than ".idata". We used atmfd.dll for that purpose, but it seems atmfd.dll is not present on some systems. Use kernel32.dll instead. kernel32.dll import table is located in ".rdata" section, so it should do the job. And every Windows system has kernel32.dll file. Also make TestImportTableInUnknownSection run on windows-arm, since windows-arm should also have kernel32.dll file. Updates #27904 Change-Id: Ie005ee10e46ae0c06e83929d581e89f86c051eea Reviewed-on: https://go-review.googlesource.com/c/151137 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 23 Nov, 2018 4 commits
-
-
David Chase authored
This makes it easier to track names of function arguments for debugging purposes. Change-Id: Ic34856fe0b910005e1c7bc051d769d489a4b158e Reviewed-on: https://go-review.googlesource.com/c/150098 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
Yury Smolsky authored
This CL adds a button that collapses values list of a block. Button is displayed for every block with non-empty values. Change-Id: I4b65af81e25349f38341df487d42698c9d006a00 Reviewed-on: https://go-review.googlesource.com/c/144557 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
Austin Clements authored
On some platforms, assembly in internal/syscall/unix references unexported runtime symbols. Catch these references so the compiler can generate the necessary ABI wrappers. Fixes #28769. Updates #27539. Change-Id: I118eebfb8b3d907b4c3562198e6afb49854f5827 Reviewed-on: https://go-review.googlesource.com/c/149817 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by:
Clément Chigot <clement.chigot@atos.net> Reviewed-by:
Keith Randall <khr@golang.org>
-
Cherry Zhang authored
When using softfloat, floating point ops are rewritten to integer ops. The types of store ops were not rewritten. This may lower to floating point stores, which are problematic. This CL fixes this by rewriting the store types as well. This fixes test/fixedbugs/issue28688.go on Wasm. Softfloat mode is not used by default on Wasm, and it is not needed as Wasm spec supports floating points. But it is nice to have the correct types. Change-Id: Ib5e19e19fa9491b15c2f60320f8724cace5cefb5 Reviewed-on: https://go-review.googlesource.com/c/149965 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 22 Nov, 2018 2 commits
-
-
David Heuschmann authored
UserHomeDir used to return an empty string if the corresponding environment variable was not set. Changed it to return an error if the variable is not set, to have the same signature and behaviour as UserCacheDir. Fixes #28562 Change-Id: I42c497e8011ecfbbadebe7de1751575273be221c Reviewed-on: https://go-review.googlesource.com/c/150418 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Hana Kim authored
The performance improvement is not as big as we hoped. Until the API is feature complete, we postpone the release and avoid added complexity. This change was prepared by reverting all the changes affected src/cmd/trace and src/internal/traceparser packages after golang.org/cl/137635, and then bringing back MMU computation APIs (originally in src/internal/traceparser) to the src/internal/trace package. Revert "cmd/trace: use new traceparser to parse the raw trace files" This reverts https://golang.org/cl/145457 (commit 08816cb8). Revert "internal/traceparser: provide parser that uses less space and parses segments of runtime trace files" This reverts https://golang.org/cl/137635 (commit daaf361f). Change-Id: Ic2a068a7dbaf4053cd9674ca7bde9c58e74385b4 Reviewed-on: https://go-review.googlesource.com/c/150517 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
- 21 Nov, 2018 8 commits
-
-
David du Colombier authored
CL 150497 enabled TestRemoveAllDot on "noat" systems. However, this test is failing on Plan 9 because the rmdir system call allows to remove "." on Plan 9. This change prevents the "noat" implementation of RemoveAll to remove ".", so it remains consistent with the "at" implementation. Fixes #28903. Change-Id: Ifc8fe36bdd8053a4e416f0590663c844c97ce72a Reviewed-on: https://go-review.googlesource.com/c/150621 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
David Chase authored
This case was missed entirely and caused such params to be unprintable. This change gives them stack addresses for the entire function (which is correct). Change-Id: Ia4f706450219e48bce65b6395d3d9792df142fb5 Reviewed-on: https://go-review.googlesource.com/c/150657 Run-TryBot: David Chase <drchase@google.com> Reviewed-by:
Heschi Kreinick <heschi@google.com>
-
Yury Smolsky authored
CL 142517 has used some formats incorrectly. This change fixes it by using %v for errors and invoking Block.Kind.String(). Format map stays intact. Updates #28177 Change-Id: If53b6cc54ba3c1ffc17b005225787e3b546de404 Reviewed-on: https://go-review.googlesource.com/c/150798 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
Austin Clements authored
This adds a debug check to throw immediately if any pointers are added to the gcWork buffer after the mark completion barrier. The intent is to catch the source of the cached GC work that occasionally produces "P has cached GC work at end of mark termination" failures. The result should be that we get "throwOnGCWork" throws instead of "P has cached GC work at end of mark termination" throws, but with useful stack traces. This should be reverted before the release. I've been unable to reproduce this issue locally, but this issue appears fairly regularly on the builders, so the intent is to catch it on the builders. This probably slows down the GC slightly. For #27993. Change-Id: I5035e14058ad313bfbd3d68c41ec05179147a85c Reviewed-on: https://go-review.googlesource.com/c/149969 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
For #27993. Change-Id: I20127e8a9844c2c488f38e1ab1f8f5a27a5df03e Reviewed-on: https://go-review.googlesource.com/c/149968 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
haormj authored
Fixes #28904 Change-Id: I8d416c47479a266735a39c926fd2f0f2bb25d57b GitHub-Last-Rev: 3a7865a5be27937833cf4f65c242c639e51665c4 GitHub-Pull-Request: golang/go#28907 Reviewed-on: https://go-review.googlesource.com/c/150737Reviewed-by:
Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Yury Smolsky authored
This CL adds CFGs to ssa.html. It execs dot to generate SVG, which then gets inlined into the html. Some standard naming and javascript hacks enable integration with the rest of ssa.html. Clicking on blocks highlights the relevant part of the CFG, and vice versa. Sample output and screenshots can be seen in #28177. CFGs can be turned on with the suffix mask: :* - dump CFG for every phase :lower - just the lower phase :lower-layout - lower through layout :w,x-y - phases w and x through y Calling dot after every pass is noticeably slow, instead use the range of phases. Dead blocks are not displayed on CFG. User can zoom and pan individual CFG when the automatic adjustment has failed. Dot-related errors are reported without bringing down the process. Fixes #28177 Change-Id: Id52c42d86c4559ca737288aa10561b67a119c63d Reviewed-on: https://go-review.googlesource.com/c/142517 Run-TryBot: Yury Smolsky <yury@smolsky.by> Reviewed-by:
David Chase <drchase@google.com>
-
Cherry Zhang authored
In race mode, these functions are defined and declared in different packages, which therefore don't have implicit arg maps. When they are defer'd, and the stack needs to move, the runtime fails with missing stack maps. This CL adds arg maps (FUNCDATA) to them. Updates #28848 Change-Id: I0271563b7e78e7797ce2990c303dced957efaa86 Reviewed-on: https://go-review.googlesource.com/c/150457 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 20 Nov, 2018 12 commits
-
-
Richard Musiol authored
Using fmt.Scanln in a browser environment caused a panic, since there was no stub for fs.read. This commit adds a stub that returns ENOSYS. Fixes #27773. Change-Id: I79b019039e4bc90da51d71a4edddf3bd7809ff45 Reviewed-on: https://go-review.googlesource.com/c/150617 Run-TryBot: Richard Musiol <neelance@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
The playground is not using GOOS=js, so it is not able to use the package syscall/js. Examples that depend on syscall/js should not show a "Run" button. Fixes #28526. Change-Id: I8b2fcdd0c0ee517a5c3864bf459f813129542389 Reviewed-on: https://go-review.googlesource.com/c/148918Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Return a PathError instead of an unwrapped syscall.EINVAL if the path ends with dots. As suggested by Roger Peppe in CL 150158. Change-Id: I4d82a6ff64a979b67a843a1cc4fea58ed9326aed Reviewed-on: https://go-review.googlesource.com/c/150160 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Prohibiting RemoveAll with paths that end in ".." was added with CL 137442 in this release cycle, but it worked before and it should continue to work. Also run TestRemoveAllDot on all systems; the test is not specific to the use of unlinkat and friends. Change-Id: I277784c8915cd748fec318d2936062440d5d1fde Reviewed-on: https://go-review.googlesource.com/c/150497Reviewed-by:
Tobias Klauser <tobias.klauser@gmail.com>
-
Brad Fitzpatrick authored
CL 150417 was submitted before I could recommend this change to remove an unnecessary allocation. Updates #28849 Change-Id: I4cd655f62bb3d00eda6c997f074785385bceee0c Reviewed-on: https://go-review.googlesource.com/c/150498Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
The js/wasm architecture does not support signals at all, but there are already some signal constants defined because of stdlib dependencies. This change adds a dummy constant for syscall.SIGTERM as well, to make js/wasm compatible with more existing Go code. There is the Go proverb "Syscall must always be guarded with build tags.", so code should not expect syscall.SIGTERM to exist. Still, adding SIGTERM should do more good than harm. Fixes #28719. Change-Id: I3554b484f96a21427491c04eb1dd57e7af5bd62f Reviewed-on: https://go-review.googlesource.com/c/150477 Run-TryBot: Richard Musiol <neelance@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
os.TempDir() did not return a proper directory on Windows with js/wasm, because js/wasm only uses the Unix variant of TempDir. This commit passes the temporary directory provided by Node.js to the Go runtime by adding it as a default value for the TMPDIR environment variable. It makes TempDir compatible with all platforms. Fixes #27306. Change-Id: I8b17e44cfb2ca41939ab2a4f918698fe330cb8bc Reviewed-on: https://go-review.googlesource.com/c/150437 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
majiang authored
We should be able to build docker after this get applied. Updates #13192 Change-Id: I5378d3518fac52d6bd4c97828884c1b382b7ace5 GitHub-Last-Rev: 210b7bc2e172f641f1102982e04542bf73a1aa46 GitHub-Pull-Request: golang/go#28546 Reviewed-on: https://go-review.googlesource.com/c/146898Reviewed-by:
Jiang Ma <ma.jiang@zte.com.cn> Reviewed-by:
Clément Chigot <clement.chigot@atos.net> Reviewed-by:
Lynn Boger <laboger@linux.vnet.ibm.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Heuschmann authored
FormatMediaType used rune&0x80==0 to check if parameter values consisted of valid ascii charaters. Comparing strings using their runes instead of their bytes leads to some non-ascii strings to pass as valid. E.g. the rune for 'Ą' is 0x104, 0x104 & 0x80 => 0. Its byte representation is 0xc4 0x84, both of which result in non zero values when masked with 0x80 Fixes #28849 Change-Id: Ib9fb4968bcbbec0197d81136f380d40a2a56c14b Reviewed-on: https://go-review.googlesource.com/c/150417 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Markus authored
ValueOf() panics if x is not one of the expected types. Change-Id: I1105e46bd09a5ab13c162b77c1c50cc45bce27a2 GitHub-Last-Rev: 34a88ce8206954d94f0a884ab7f6494116c54a2d GitHub-Pull-Request: golang/go#28846 Reviewed-on: https://go-review.googlesource.com/c/150138Reviewed-by:
Richard Musiol <neelance@gmail.com>
-
Vladimir Kovpak authored
This commit performs replace double quote to backquote, so now all examples looks consistent. Change-Id: I8cf760ce1bdeff9619a88e531161b9516385241b GitHub-Last-Rev: e3e636cebbf41528b8a73f9a3fe5afa10876f964 GitHub-Pull-Request: golang/go#28879 Reviewed-on: https://go-review.googlesource.com/c/150397Reviewed-by:
Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tobias Klauser authored
Fixes #27619 Change-Id: If18df696c0778efe894a4a249d4964db1b02e5d6 Reviewed-on: https://go-review.googlesource.com/c/150159Reviewed-by:
Yuval Pavel Zholkover <paulzhol@gmail.com> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 19 Nov, 2018 8 commits
-
-
Santhosh Kumar Tekuri authored
Change-Id: I7a1046f5e0aedbbdd1106a616de410fe4e0cb7d8 Reviewed-on: https://go-review.googlesource.com/c/92295 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Vladimir Kovpak authored
This commit adds examples for Match, Find, FindAllSubmatch, FindSubmatch and Match functions. Change-Id: I2bdf8c3cee6e89d618109397378c1fc91aaf1dfb GitHub-Last-Rev: 33f34b7adca2911a4fff9638c93e846fb0021465 GitHub-Pull-Request: golang/go#28837 Reviewed-on: https://go-review.googlesource.com/c/150020 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Xia Bin authored
Change-Id: I70afd2f7b6783926174c4e66565b711cffeb97c5 Reviewed-on: https://go-review.googlesource.com/c/150141 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Michael Ellis authored
Per https://semver.org/#spec-item-10, build metadata may include a series of dot separated identifiers. Fixes #28647 Change-Id: I98655c62584a822953df71fba32b4a2cafe7a04b Reviewed-on: https://go-review.googlesource.com/c/148835Reviewed-by:
Bryan C. Mills <bcmills@google.com>
-
Alan Donovan authored
cmd/vet, now simplified to a single function call is now authoritative, not a copy of vet-lite. The update-xtools.sh script now uses the imports of cmd/vet as the roots for vendoring. Change-Id: I4faef3fcf3db10b3a3930726e8d0720a3c8395da Reviewed-on: https://go-review.googlesource.com/c/150297 Run-TryBot: Alan Donovan <adonovan@google.com> Reviewed-by:
Daniel Martí <mvdan@mvdan.cc>
-
Alan Donovan authored
- restore and rework cmd/vet/doc.go, which was clobbered during the vet-lite switch. - document go vet -vettool=prog flag and how to run an alternative checker. - make 'go vet -help' show how to list vet tool's flags. Example: $ go vet -help usage: go vet [-n] [-x] [-vettool prog] [build flags] [vet flags] [packages] Run 'go help vet' for details. Run 'go tool vet help' for the vet tool's flags. $ go vet -vettool=~/bin/myvet -help usage: go vet [-n] [-x] [-vettool prog] [build flags] [vet flags] [packages] Run 'go help vet' for details. Run '~/bin/myvet help' for the vet tool's flags. Updates #28840 Change-Id: Ieb79dfe29e1df074f865bc9a9d47b44199675d7d Reviewed-on: https://go-review.googlesource.com/c/147018Reviewed-by:
Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Martí authored
Mainly to pull the fix for the regression in #28792. Change-Id: If71ae783fd9a9e3935186b49fdf501ba098235a2 Reviewed-on: https://go-review.googlesource.com/c/150161 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Josh Bleecher Snyder authored
This change does a bulk rename of several identifiers in the compiler. See #27167 and https://docs.google.com/document/d/19_ExiylD9MRfeAjKIfEsMU1_RGhuxB9sA0b5Zv7byVI/ for context and for discussion of these particular renames. Commands run to generate this change: gorename -from '"cmd/compile/internal/gc".OPROC' -to OGO gorename -from '"cmd/compile/internal/gc".OCOM' -to OBITNOT gorename -from '"cmd/compile/internal/gc".OMINUS' -to ONEG gorename -from '"cmd/compile/internal/gc".OIND' -to ODEREF gorename -from '"cmd/compile/internal/gc".OARRAYBYTESTR' -to OBYTES2STR gorename -from '"cmd/compile/internal/gc".OARRAYBYTESTRTMP' -to OBYTES2STRTMP gorename -from '"cmd/compile/internal/gc".OARRAYRUNESTR' -to ORUNES2STR gorename -from '"cmd/compile/internal/gc".OSTRARRAYBYTE' -to OSTR2BYTES gorename -from '"cmd/compile/internal/gc".OSTRARRAYBYTETMP' -to OSTR2BYTESTMP gorename -from '"cmd/compile/internal/gc".OSTRARRAYRUNE' -to OSTR2RUNES gorename -from '"cmd/compile/internal/gc".Etop' -to ctxStmt gorename -from '"cmd/compile/internal/gc".Erv' -to ctxExpr gorename -from '"cmd/compile/internal/gc".Ecall' -to ctxCallee gorename -from '"cmd/compile/internal/gc".Efnstruct' -to ctxMultiOK gorename -from '"cmd/compile/internal/gc".Easgn' -to ctxAssign gorename -from '"cmd/compile/internal/gc".Ecomplit' -to ctxCompLit Not altered: parameters and local variables (mostly in typecheck.go) named top, which should probably now be called ctx (and which should probably have a named type). Also not altered: Field called Top in gc.Func. gorename -from '"cmd/compile/internal/gc".Node.Isddd' -to IsDDD gorename -from '"cmd/compile/internal/gc".Node.SetIsddd' -to SetIsDDD gorename -from '"cmd/compile/internal/gc".nodeIsddd' -to nodeIsDDD gorename -from '"cmd/compile/internal/types".Field.Isddd' -to IsDDD gorename -from '"cmd/compile/internal/types".Field.SetIsddd' -to SetIsDDD gorename -from '"cmd/compile/internal/types".fieldIsddd' -to fieldIsDDD Not altered: function gc.hasddd, params and local variables called isddd Also not altered: fmt.go prints nodes using "isddd(%v)". cd cmd/compile/internal/gc; go generate I then manually found impacted comments using exact string match and fixed them up by hand. The comment changes were trivial. Passes toolstash-check. Fixes #27167. If this experiment is deemed a success, we will open a new tracking issue for renames to do at the end of the 1.13 cycles. Change-Id: I2dc541533d2ab0d06cb3d31d65df205ecfb151e8 Reviewed-on: https://go-review.googlesource.com/c/150140 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 18 Nov, 2018 2 commits
-
-
Ian Lance Taylor authored
Fixes #28834 Change-Id: I95d6874e62d36974415f43843881a4ae85b3c7ce Reviewed-on: https://go-review.googlesource.com/c/149964 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by:
Alan Donovan <adonovan@google.com> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Tobias Klauser authored
CL 146020 changed the behavior of RemoveAll("") on unix systems using the *at functions to return syscall.EINVAL instead of nil. Adjust the *at implementation to retain this behavior as is the case on the *noat systems. Additionally, also make sure RemoveAll("") on systems not using the "at functions (e.g. nacl and js/wasm) follow the same behavior (which wasn't the case previously). Fixes #28830 Change-Id: I8383c1423fefe871d18ff49134a1d23077ec6867 Reviewed-on: https://go-review.googlesource.com/c/150158 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
roger peppe <rogpeppe@gmail.com>
-
- 17 Nov, 2018 1 commit
-
-
sevki authored
Procedure names should reflect what they do; function names should reflect what they return. Functions are used in expressions, often in things like if's, so they need to read appropriately. if CheckHMAC(a, b, key) is unhelpful because we can't deduce whether CheckHMAC returns true on error or non-error; instead if ValidHMAC(a, b, key) makes the point clear and makes a future mistake in using the routine less likely. https://www.lysator.liu.se/c/pikestyle.html Change-Id: I7c4b1981c90c8d7475ddd8ec18dee3db2e0f42df GitHub-Last-Rev: 32199a418b5e5507259fa4b6715da8a9c185f90a GitHub-Pull-Request: golang/go#28823 Reviewed-on: https://go-review.googlesource.com/c/149857Reviewed-by:
Filippo Valsorda <filippo@golang.org>
-