A golang coding task for simscale
Although go modules is taking care of this through indirect dependency if you want to have it manually installed please run
make deps #Just a neat way to install github.com/mitchellh/gox
NOTE: if you are having the repo cloned under
$GOPATH
you might want to setGO111MODULE
toon
export GO111MODULE=on
To Run the app locally use
make run i=<PATH/TO/INPUT/FILE> o=<PATH/TO/OUTPUT/FILE>
The app itself use --input-file
, -i
for input file and --output-file
, -o
for output file
To be able to cross compile the app for differet platforms I user gox
make build
The app can be fully dockerized and this can be done by running
make run/docker
NOTE: This command expects 3 env variables to be set:
DOCKER_MOUNT_DIR
: directory where the input file residesDOCKER_INPUT_FILE
: name of input file e.g.,small-log.txt
DOCKER_OUTPUT_FILE
: name of output file e.g.,small-trace.txt
This command will build the app, image and run the docker container. To build the docker image only run
make build/docker
To run unit tests
make test
To include benchmark tests
make test/benchmark
Check Out the Overview to understand more about the repo structure, datastructures, algorithems used, techniques...etc.