V
V
v- death2015-11-04 22:00:57
go
v- death, 2015-11-04 22:00:57

How to convert to []byte?

Hello. How to convert type errors to []byte in go? thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2015-11-04
@vGrabko99

[]byte(err.Error())
error is an interface that has one Error() method that returns a string (error text).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question