Created
January 13, 2019 18:32
-
-
Save prakashpandey/45f52119f9bbdc37f65cf9fe45c8308b to your computer and use it in GitHub Desktop.
define interface in golang
This file contains hidden or 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
// Geometry interface | |
type Geometry interface { | |
area() float32 | |
parameter() float32 | |
numOfSides() int | |
} | |
// Color interface | |
type Color interface { | |
getColor() string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment