refactor: replace interface{} with any for modern Go style
Update callback function signatures to use the any alias introduced in Go 1.18, improving code readability and following current Go conventions. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -30,7 +30,7 @@ func Play(ctx context.Context, path string, local bool) error {
|
||||
done := make(chan struct{})
|
||||
defer close(done)
|
||||
|
||||
_, err = eventManager.Attach(libvlc.MediaPlayerEndReached, func(libvlc.Event, interface{}) {
|
||||
_, err = eventManager.Attach(libvlc.MediaPlayerEndReached, func(libvlc.Event, any) {
|
||||
done <- struct{}{}
|
||||
}, nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user