Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Prometheus and docker-compose #11
Add Prometheus and docker-compose #11
Changes from 6 commits
80df259
c632062
4179c2b
e7e1098
77626bd
754d5f6
d190a63
caa2cca
057bfd5
8c4307a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Linked List Implementation in Go
This repository contains a simple implementation of a linked list in Go. It supports basic operations such as insert, find, get, and remove. Each of these operations is accompanied by comprehensive unit tests to ensure the correctness and stability of the implementation.
Getting Started
Prerequisites
Ensure you have Go installed on your system. You can verify this by running
go version
in your command line. If Go is not installed, you can download and install it from the official Go website.Running the Code
To run the main application which demonstrates some linked list operations, use the following command:
Run Server on port 8080
Inset Value:
Get a Value:
curl -X GET "http://localhost:8080/v1/get/1"
Remove Value:
curl -X GET "http://localhost:8080/v1/find/10"
Find Value:
curl -X DELETE "http://localhost:8080/v1/remove/1"
Items List:
curl -X GET "http://localhost:8080/v1/list"
Running All Tests
go test ./linkedlist/ -v
Run property-based test
Run unit tests
go test -run TestLinkedListInsert ./linkedlist/ -v
Running Specific Function Tests
Hurl tests
Run your app and then replace your port with the 8080 below and then run the following command
Api v2
We are using echo for creating the v2 of the apis
Inset Value:
Get a Value By Index:
curl -X GET "http://localhost:8080/v2/numbers/index/1"
Find Value:
curl -X GET "http://localhost:8080/v2/numbers/value/10"
Remove Value:
curl -X DELETE "http://localhost:8080/v2/numbers/1"
Config
you can add configs in config/config.yaml file and then for hot reloading you can send a SIGHUP to the app after changing the config file
Start the Docker Compose Services
Open your browser and go to
http://localhost:3000
to access the Grafana web interface.