mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Go generics and changes in v1.18 (#5)
* ArrayIn to use generics. * interface{} -> any.
This commit is contained in:
@ -79,14 +79,14 @@ type VideoConfig struct {
|
||||
}
|
||||
|
||||
func (config *VideoConfig) GetPipeline(screen ScreenSize) (string, error) {
|
||||
values := map[string]interface{}{
|
||||
values := map[string]any{
|
||||
"width": screen.Width,
|
||||
"height": screen.Height,
|
||||
"fps": screen.Rate,
|
||||
}
|
||||
|
||||
language := []gval.Language{
|
||||
gval.Function("round", func(args ...interface{}) (interface{}, error) {
|
||||
gval.Function("round", func(args ...any) (any, error) {
|
||||
return (int)(math.Round(args[0].(float64))), nil
|
||||
}),
|
||||
}
|
||||
|
Reference in New Issue
Block a user