Documentation
¶
Overview ¶
Package gomock provides a simple in-memory JSON-based mock server for testing and development. It allows creating a lightweight HTTP server that can handle CRUD operations on JSON collections.
The server supports the following HTTP methods:
- GET: Retrieve all items in a collection or a specific item by ID
- POST: Create a new item in a collection
- PUT: Update an existing item in a collection
- DELETE: Remove an item from a collection
Usage:
go run main.go -db=mydata.json -port=8080
Flags:
-db string Path to the JSON database file (default "db.json") -port int Port number for the server to listen on (default 3000)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.