Last active
July 9, 2022 16:28
-
-
Save liampulles/ae4ab6989b0f80f09306aa52be9537fe to your computer and use it in GitHub Desktop.
Golang implementation check example
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 Hashable interface { | |
Hash() []byte | |
} | |
type BasicThingy string | |
type StructThingy struct{} | |
// Implementation checks: | |
var _ Hashable = (BasicThingy)("") | |
var _ Hashable = &StructThingy{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment