Double definition of Variable/Function not usable anymore.
Previously I had State(State) == '"'"'stalledUP'"'"'" on github.com/antonmedv/expr v1.12.5
This seems to have been made illegal on a following version (I think v1.13?). I've upgraded to v1.16.9 and it's still a problem.
expr.Function(
"State",
func(params ...any) (any, error) {
return string(params[0].(qbittorrent.TorrentState)), nil
},
new(func(qbittorrent.TorrentState) string),
),
You've added a lot of functions that I don't need to implement anymore (yay!).
But I still can't figure out how to get around this hack that I added to compare 2 qbittorrent.TorrentStates as you can't call qbittorrent.TorrentState types(?) (qbittorrent.TorrentStateStalledUp) the language.
https://github.com/KyleSanderson/upgraderr/blob/f4ce699f74d33a8f2b6438a6a3edaa8c45de5bb8/main.go#L1300 https://github.com/autobrr/go-qbittorrent/blob/main/domain.go
Help/tips/guidance would be greatly appreciated.
Could you please explain a little bit in more details what you trying to achieve?
How do I compare two qbittorrent.TorrentState 's? This change is going to break the interface which is regrettable but I'd much rather resolve the problem then ask people to change State() for the new built-in string()