To run the application using Dockerfile, follow these steps:
-
Build the Docker image:
docker build -t bc-code-generator-app . -
Run the container:
docker run -d --name bc-code-generator-app bc-code-generator-app
-
Login to the container via Bash:
docker exec -it bc-code-generator-app bash
To run the application using docker-compose, follow these steps:
- Run the app in detached mode:
docker-compose up -d
To build the application from the source code, follow these steps:
- To build the application, run the following command:
go build -o ./build/bc-code-generator-app
To run the application, you can choose one of the following methods:
-
Run the application using the built binary:
./build/bc-code-generator-app
-
Run the application without building the binary file:
go run main.go
To execute tests
-
Execute all test functions in your package and get detailed output, including test names, execution times, and results
go test -v -
Execute all benchmark functions in your package and measure performance. It executes functions starting with 'Benchmark' and outputs results
go test -bench=.