omdb package is a GO package which provides simple and fast way of getting moving ratings from OMDB web site.
To start using omdb package, install
- go
- docker
This project structure as follows
omdm
+----bin
| +----makefile
| +----omdbRun.sh
+----conf
| +----config.yml
+----docker
| +----dockerfile
+----utils
| +----utils.go
| +----utils_test.go
+----main.go
+----go.mod
+----go.sum
+----ReadMe.md
-
Export environemtn variable for local project path
$export LOCAL_LIB_PATH = <project local path> // Ex. ${HOME}/omdb
-
Create docker:
$make build -f ${LOCAL_LIB_PATH}/bin/makefile -e "${LOCAL_LIB_PATH}"
-
Run docker:
$make run -f ${LOCAL_LIB_PATH}/bin/makefile -e "title=<movie title>" // ex. frozen
-
Build using go build command from project directory
$ cd ${LOCAL_LIB_PATH} $ go build -o main .
-
Run
$ ./main -title=<title> // Ex. frozen
-
Test
$ go test ./utils -v
-
Code Coverage
$ go test ./utils -v -cover