Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBOR and panic on IntValue from OptionContentFormat #92

Open
ptone opened this issue May 7, 2017 · 0 comments
Open

CBOR and panic on IntValue from OptionContentFormat #92

ptone opened this issue May 7, 2017 · 0 comments

Comments

@ptone
Copy link
Contributor

ptone commented May 7, 2017

I'm trying to work with CBOR which is missing as a media type constant, but is currently value 60 in the registry.

But when trying to get the IntValue of

msg.GetOption(canopus.OptionContentFormat)

I get a panic

panic: interface conversion: interface {} is uint32, not int

goroutine 27 [running]:
github.com/zubairhamed/canopus.(*CoapOption).IntValue(0xc42000c280, 0x1)
	/Users/ptone/Projects/code/go/src/github.com/zubairhamed/canopus/options.go:48 +0x62
main.main.func6(0x43dcf40, 0xc420018390, 0x0, 0x0)

replicated simply as
https://play.golang.org/p/s03CZymM0c

This is coming from the Copper Firefox extension when setting the Content Format setting in the debug panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant