More compliant cap.Differs documentation. Deprecation has a stylized comment format as per go.dev. Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
diff --git a/cap/flags.go b/cap/flags.go index 88ad355..df7a9a5 100644 --- a/cap/flags.go +++ b/cap/flags.go
@@ -208,9 +208,23 @@ // Differs processes the result of Compare and determines if the // Flag's components were different. // -// Use of this function is deprecated in favor of the (Diff).Has() -// function, where Diff is returned as a result of the (*Set).Cf() -// function. +// Deprecated: Replace with (Diff).Has(). +// +// Example, replace this: +// +// diff, err := a.Compare(b) +// ... +// if diff & (1 << Effective) { +// ... different effective capabilities ... +// } +// +// with this: +// +// diff, err := a.Cf(b) +// ... +// if diff.Has(Effective) { +// ... different effective capabilities ... +// } func Differs(cf uint, vec Flag) bool { return cf&(1<<vec) != 0 }