Closed hwittenborn closed 1 year ago
Yes, that looks like https://pkg.go.dev/mvdan.cc/sh/v3/syntax#ParseError. You can always look at the type via fmt.Printf("%#v\n", err)
.
Oh cool, I didn't know you could find out types like that. I'm still learning a bunch about interfaces, so it's definitely a bunch of learning I'm getting done. I'll give that a look in a bit, thanks a ton for the help! :)
I'm working on using
shell.Expand
as part of my project, but I was wondering if the return type for errors was anything concrete.I saw that the error contained some useful line information:
but I wasn't sure how to reliable extract that from the error message. Is there a type I can cast the interface into to pull that information out with?