From bfb26104e3b578f778ac5d5f36ab6fc7067d63c9 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 20 Oct 2021 16:25:53 +0200 Subject: [PATCH] Update readme from Go port. --- source/ports/go_port/source/README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source/ports/go_port/source/README.md b/source/ports/go_port/source/README.md index bcf805c52..fcf455fcb 100644 --- a/source/ports/go_port/source/README.md +++ b/source/ports/go_port/source/README.md @@ -59,18 +59,17 @@ func main() { go build ``` -In case of using precompiled binaries (in Linux), when running any application using MetaCall, you must set the environment variable `LD_LIBRARY_PATH` pointing to the MetaCall library (a part of setting any other required environment variable related to MetaCall if needed). For example: - -```sh -export LD_LIBRARY_PATH="/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib" -``` - -`go build` may require to set CGO environment variables pointing to MetaCall libraries in case of undefined C headers during compilation : - -```sh -export CGO_CFLAGS=-I"/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/include" -export CGO_LDFLAGS=-L"/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib" -``` +In case of using precompiled binaries (in Linux): + - When building, `go build` may require to set CGO environment variables pointing to MetaCall libraries in case of undefined C headers during compilation: + ```sh + export CGO_CFLAGS="-I/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/include" + export CGO_LDFLAGS="-L/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib" + ``` + + - When running any application using MetaCall, you must set the environment variable `LD_LIBRARY_PATH` pointing to the MetaCall library (a part of setting any other required environment variable related to MetaCall if needed). For example: + ```sh + export LD_LIBRARY_PATH="/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib" + ``` ## Testing @@ -82,7 +81,7 @@ go test ## Benchmarks -For running tests: +For running benchmarks: ```sh go test -bench=.