You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
I expect the retrieved enum to work as an argument.
Screenshots
N/A
Version Information (please complete the following information):
macOS version (run uname -a): Darwin Michaels-MacBook-Air.local 23.2.0 Darwin Kernel Version 23.2.0: Fri Oct 13 09:28:08 PDT 2023; root:xnu-10002.60.54~14/RELEASE_ARM64_T8112 arm64
Golang version (run go version): go version go1.21.4 darwin/arm64
Additional context
N/A
The text was updated successfully, but these errors were encountered:
It appears that if it gets a value of an argument to check against an enum it forces it to be a string. I will fix it to check if the type of value we get is or evaluates to a variable and if so, skip the check as we can't know the output of an action at this time.
Describe the bug
I run into a panic when I try to use an enum that I retrieved from a list as an argument.
To Reproduce
Debug output
Parsing custom actions... ### CUSTOM ACTIONS ###
done!
Parsing test.cherri...
panic: interface conversion: interface {} is main.action, not string
goroutine 1 [running]:
main.checkEnum({{0x100d76fac, 0x6}, {0x100d766ce, 0x4}, {0x100d7ad07, 0xe}, {0x0, 0x0}, {0x1400007e3c0, 0xa, ...}, ...}, ...)
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/action.go:268 +0x210
main.checkArg(0x14000165468, 0x14000165378)
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/action.go:396 +0xac
main.collectArgument(0x100dc8ca0?, 0x14000165468, 0x14000010640?)
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:413 +0x2dc
main.collectArguments()
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:380 +0x12c
main.collectAction()
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:1185 +0x220
main.collectValue(0x140001657b0, 0x140001657c0, 0xa)
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:307 +0x4e4
main.collectVariableValue(0x0, 0x140001657b0, 0x140001657c0, 0x140001657f0, 0x140001657e0)
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:240 +0x3c
main.collectVariable(0x0)
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:485 +0x6e8
main.parse()
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:147 +0x480
main.initParse()
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/parser.go:49 +0x2f4
main.main()
/Users/michaelogezi/go/pkg/mod/github.com/electrikmilk/cherri@v0.1.11-beta.0.20231201134025-7ca10989beb1/main.go:75 +0x35c
Expected behavior
I expect the retrieved enum to work as an argument.
Screenshots
N/A
Version Information (please complete the following information):
uname -a
): Darwin Michaels-MacBook-Air.local 23.2.0 Darwin Kernel Version 23.2.0: Fri Oct 13 09:28:08 PDT 2023; root:xnu-10002.60.54~14/RELEASE_ARM64_T8112 arm64go version
): go version go1.21.4 darwin/arm64Additional context
N/A
The text was updated successfully, but these errors were encountered: