Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/runtime/secret/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
// Do itself.
//
// Limitations:
// - Currently only supported on linux/amd64 and linux/arm64. On unsupported
// platforms, Do will invoke f directly.
// - Currently only supported on linux/amd64 and linux/arm64.
// On unsupported platforms, Do will invoke f directly.
// - Protection does not extend to any global variables written by f.
// - Protection does not extend to any new goroutines made by f.
// - If f calls runtime.Goexit, erasure can be delayed by defers
Expand Down Expand Up @@ -108,7 +108,8 @@ func doHelper(f func()) (p any) {
return
}

// Enabled reports whether [Do] appears anywhere on the call stack.
// Enabled returns true if [Do] appears anywhere on the call stack
// and the platform is supported (see [Do] for details).
func Enabled() bool {
return count() > 0
}
Expand Down