Go Service Library
This open-source project contains a collection of high-quality Go (Golang) packages.
Each package follows common conventions and can be individually imported into any project.
This package collection forms the base structure for fully-fledged, production-ready web services.
A new web service can be generated by using the command make project CONFIG=project.cfg
.
The newly generated project's name, description, etc., can be set in the file specified via the CONFIG parameter.
The package documentation is available at: https://pkg.go.dev/github.com/Vonage/gosrvlib/
- category Library
- license MIT
- link https://github.com/Vonage/gosrvlib
To quickly get started with this project, follow these steps:
- Make sure you have installed the latest version of Go and Python3 for additional tests.
- Clone the repository:
git clone https://github.com/Vonage/gosrvlib.git
. - Change to the project directory:
cd gosrvlib
. - Install the required dependencies and test everything:
DEVMODE=LOCAL make x
.
Now you are ready to start developing with gosrvlib!
This project includes a Makefile that allows you to easily test and build the project on a Linux-compatible system using simple commands. All the artifacts and reports generated using this Makefile are stored in the target folder.
Alternatively, you can build everything inside a Docker container using the command make dbuild
, which utilizes the environment defined in resources/docker/Dockerfile.dev
.
To see all available options:
make help
Before committing the code, please format it and check if it passes all tests using
DEVMODE=LOCAL make x
Please check the examples/service
folder for an example of a service based on this library.
The following command generates a new project from the example using the data set in the project.cfg
file:
make project CONFIG=project.cfg