boltqueue icon indicating copy to clipboard operation
boltqueue copied to clipboard

dequeue panics

Open blinkinglight opened this issue 6 years ago • 0 comments

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10b7402]

goroutine 1 [running]:
github.com/flowchartsman/boltqueue.(*Message).ToString(...)
	/Users/user/gocode/src/github.com/flowchartsman/boltqueue/message.go:23
main.main()
	/Users/user/gocode/src/mano/boltq/main.go:27 +0xd2
exit status 2

hack

// ToString outputs the string representation of the message's value
func (m *Message) ToString() string {
	if m != nil {
		return string(m.value)
	}
	return ""
}

blinkinglight avatar Jul 28 '18 11:07 blinkinglight