1
0
mirror of https://github.com/golang/go synced 2024-11-22 16:34:47 -07:00

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: 41f7870792
GitHub-Pull-Request: golang/go#47700
Reviewed-on: https://go-review.googlesource.com/c/go/+/342210
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Trust: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Jeff Wentworth 2021-08-14 09:46:32 +00:00 committed by Keith Randall
parent 49c688e45c
commit 0a0a160d4d

View File

@ -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