go-interface
Simple Go program which demonstrate Interface
concept in Go programming language.
How to run the sample
-
Ensure that you have setup GoLang in your machine.
-
Ensure that you have setup
$GOPATH
environment variable. Refer to this if you have not setup it. -
Run this command to get this source code:
go get github.com/wendysanarwanto/go-interface
. The source code will be placed in$GOPATH/src/github.com/wendysanarwanto/go-interface
directory. -
Build the source code by running this command:
go build github.com/wendysanarwanto/go-interface
-
Run the compiled binary by running this command:
go run github.com/wendysanarwanto/go-interface
-
To run the test, use this command:
go test