This is a project for Golang exercises.
- Data structure solutions
- Dev interview: coding solutions
- Dev interview: examples
- Dev setup
- Go API example
- Go CLI example (TBD)
- Online coding examples | Golang Notes | Gotchas
- Package solutions
- Utilities
Installing Go
may not be needed if you choose to use Docker. With running a go-coding container, you can clone this repo at any location on your disk, for example $HOME/projects
, without having to set $GOPATH
. And you can still access (e.g. for editing) the source code locally.
```
# assume in your projects folder
cd $HOME/projects
git clone https://github.com/dockerian/go-coding.git
cd go-coding
```
To build and run in docker container, see here.
The Makefile
has included build
, test
, run
targets. For example, to build, simply change to the project directory and run
make build # or ./build.sh
or to run tests
make test # or ./run.sh test
- MessageSender test
-
In order to run the test, inject environment variables to set user, pass, recipient, e.g.
MAIL_TO='[email protected]' \ MAIL_USER='[email protected]' MAIL_PASS='pass!wd' \ make e2e
Default mail server (
MAIL_HOST
):smtp.office365.com
.
Default auth:MAIL_TLS=true
(otherwise using justLoginAuth
)
Default sender (MAIL_USER
):[email protected]
.
And default recipient (MAIL_TO
):[email protected]
.
-
This project uses godocdown
and $(DOC_PACKAGES)
in Makefile
to generate documentations for some library packages
make doc