add options for components

This commit is contained in:
ginuerzh
2023-10-26 22:20:10 +08:00
parent 33adbb9027
commit e5fa371586
21 changed files with 42 additions and 42 deletions

View File

@ -37,7 +37,7 @@ func FileRecorder(filename string, opts ...FileRecorderOption) recorder.Recorder
}
}
func (r *fileRecorder) Record(ctx context.Context, b []byte) error {
func (r *fileRecorder) Record(ctx context.Context, b []byte, opts ...recorder.RecordOption) error {
f, err := os.OpenFile(r.filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return err