Created
February 20, 2019 05:34
-
-
Save vitiko/325fa4e337c8ccef723f91a3bf4ff656 to your computer and use it in GitHub Desktop.
ToByter / From byter interfaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ( | |
// FromByter interface supports FromBytes func for converting from slice of bytes to target type | |
FromByter interface { | |
FromBytes([]byte) (interface{}, error) | |
} | |
// ToByter interface supports ToBytes func for converting to slice of bytes from source type | |
ToByter interface { | |
ToBytes() ([]byte, error) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment