Documentation
¶
Overview ¶
Package nocopy provides types to prevent copying of structs after first use, useful for ensuring proper handling of sensitive data structures.
See README.md for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CopyChecker ¶
type CopyChecker uintptr
CopyChecker holds back pointer to itself to detect object copying.
func (*CopyChecker) Check ¶
func (c *CopyChecker) Check()
Check panics if the object has been copied since the last call to Check.
type NoCopy ¶
type NoCopy struct{}
NoCopy may be added to structs which must not be copied after the first use.
See https://golang.org/issues/8005#issuecomment-190753527 for details.
Note that it must not be embedded, due to the Lock and Unlock methods.
Click to show internal directories.
Click to hide internal directories.