From: Jeff Wentworth Date: Sat, 14 Aug 2021 09:46:32 +0000 (+0000) Subject: sync/atomic: fix documentation for CompareAndSwap X-Git-Tag: go1.18beta1~1799 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0a0a160d4df488939892a1adaca6c530fb784cc8;p=gostls13.git sync/atomic: fix documentation for CompareAndSwap Fixes #47699 The documentation for CompareAndSwap atomic/value incorrectly labelled the function as CompareAndSwapPointer. This PR fixes that. Change-Id: I6db08fdfe166570b775248fd24550f5d28e3434e GitHub-Last-Rev: 41f78707928f48c9cdac26b6a4f618d4284e1ca1 GitHub-Pull-Request: golang/go#47700 Reviewed-on: https://go-review.googlesource.com/c/go/+/342210 Reviewed-by: Keith Randall Reviewed-by: Daniel Martí Trust: Daniel Martí Run-TryBot: Daniel Martí TryBot-Result: Go Bot --- diff --git a/src/sync/atomic/value.go b/src/sync/atomic/value.go index 61f81d8fd3..3500cd22f4 100644 --- a/src/sync/atomic/value.go +++ b/src/sync/atomic/value.go @@ -126,7 +126,7 @@ func (v *Value) Swap(new interface{}) (old interface{}) { } } -// CompareAndSwapPointer executes the compare-and-swap operation for the Value. +// CompareAndSwap executes the compare-and-swap operation for the Value. // // All calls to CompareAndSwap for a given Value must use values of the same // concrete type. CompareAndSwap of an inconsistent type panics, as does