9 lines
119 B
Go
9 lines
119 B
Go
|
package utils
|
||
|
|
||
|
import "encoding/json"
|
||
|
|
||
|
func ToBytes(data interface{}) []byte {
|
||
|
b, _ := json.Marshal(data)
|
||
|
return b
|
||
|
}
|