pkg/audit: Improve Reporter.ReporterAudits doc (#2266)
Add what the method returns because from the method name and the signature name, it wasn't clear why and when a report is returned.
This commit is contained in:
parent
c35c8e4c24
commit
fa802dc429
@ -44,8 +44,10 @@ func NewReporter(log *zap.Logger, overlay *overlay.Cache, containment Containmen
|
|||||||
maxReverifyCount: maxReverifyCount}
|
maxReverifyCount: maxReverifyCount}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RecordAudits saves audit details to overlay
|
// RecordAudits saves audit results to overlay cache. When no error, it returns
|
||||||
func (reporter *Reporter) RecordAudits(ctx context.Context, req *Report) (failed *Report, err error) {
|
// nil for both return values, otherwise it returns the report with the fields
|
||||||
|
// set to the values which have been saved and the error.
|
||||||
|
func (reporter *Reporter) RecordAudits(ctx context.Context, req *Report) (_ *Report, err error) {
|
||||||
defer mon.Task()(&ctx)(&err)
|
defer mon.Task()(&ctx)(&err)
|
||||||
if req == nil {
|
if req == nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user