mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-06 07:56:55 +08:00
Add support of Chat Notifications
This commit is contained in:
@@ -27,6 +27,10 @@ func Eval[T any](
|
||||
if value == "" {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
if v, ok := any(value).(T); ok {
|
||||
return v, nil
|
||||
}
|
||||
_, err = fmt.Sscanf(value, "%v", &result)
|
||||
if err != nil {
|
||||
return result, fmt.Errorf("unable to scan value '%v' into %T: %w", value, result, err)
|
||||
|
Reference in New Issue
Block a user