Bytes returns a byte slice of the snowflake ID
()
| 299 | |
| 300 | // Bytes returns a byte slice of the snowflake ID |
| 301 | func (f ID) Bytes() []byte { |
| 302 | return []byte(f.String()) |
| 303 | } |
| 304 | |
| 305 | // ParseBytes converts a byte slice into a snowflake ID |
| 306 | func ParseBytes(id []byte) (ID, error) { |