https://github.com/yezarela/parker
Not peter parker, just a parker in Golang
https://github.com/yezarela/parker
go interactive-shell
Last synced: 11 months ago
JSON representation
Not peter parker, just a parker in Golang
- Host: GitHub
- URL: https://github.com/yezarela/parker
- Owner: yezarela
- Created: 2019-05-18T07:29:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T10:05:18.000Z (about 7 years ago)
- Last Synced: 2025-03-31T02:20:06.530Z (about 1 year ago)
- Topics: go, interactive-shell
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parker
Not peter parker, just a parker in Golang.
## Getting Started
These instructions will guide you to know about the project and running this on your machine.
### Prerequisites
Before started, please assure that your environment follows these specs:
- Go version 1.12+
- Linux/Unix Machine
The folder structure in this project is based on [aws-sdk-go/service](https://github.com/aws/aws-sdk-go/tree/master/service) directory structure. Each folder represents a package.
- `cmd` folder contains handlers to handle commands given from interactive shell.
- `park` folder contains the core algorithms to implement parker.
- `utils` folder contains some helper functions.
Each of the folders must contain a file named `errors.go` which declares the error types, and another file named `service.go` which is the core logic of the package.
### Running
To run the app, you need to build the binary first, just run the following command
```
make build / make b
```
Now, you can run the app
```
make run
```
Or simply run this command to build and run with a single tap
```
make
```
After you run this, it will display an interactive shell. These are list of available commands
$ init [cap] initialize parker with given capacity
$ park [reg] [color] park a car with reg number and color
$ leave [id] remove a car from given slot id
$ get [id] get a car by slot id
$ search [term] search cars by reg number / color
$ exit exit
## Running the tests
To run the unit tests, run this
```
make test
```