All patterns are implemented with examples, for OSX/Linux users simplely run make
command as below
# run factory method pattern example
make factory
# run singleton pattern example
make singleton
If you don't want to use make
, you can run as below
# run factory method pattern example
go run main.go -pattern factory
# run singleton pattern example
go run main.go -pattern factory