{"id":16539540,"url":"https://github.com/al3rez/parking-lot","last_synced_at":"2026-04-21T19:01:18.958Z","repository":{"id":127306852,"uuid":"205311269","full_name":"al3rez/parking-lot","owner":"al3rez","description":"Parking lot - Gojek :car:","archived":false,"fork":false,"pushed_at":"2019-09-03T01:49:07.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-09T10:39:19.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/al3rez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-30T05:33:21.000Z","updated_at":"2024-02-10T12:52:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"42255200-54c2-4b62-9b5d-75f97afafec1","html_url":"https://github.com/al3rez/parking-lot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/al3rez/parking-lot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fparking-lot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fparking-lot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fparking-lot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fparking-lot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al3rez","download_url":"https://codeload.github.com/al3rez/parking-lot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fparking-lot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32105868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T18:49:33.987Z","updated_at":"2026-04-21T19:01:18.856Z","avatar_url":"https://github.com/al3rez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parking-lot [![Build Status](https://travis-ci.com/azbshiri/parking-lot.svg?token=1dbZM2CNEGcT8cVBF1Eg\u0026branch=master)](https://travis-ci.com/azbshiri/parking-lot) [![codebeat badge](https://codebeat.co/badges/7ef052e3-35ff-4cab-88f9-e13393c8ab35)](https://codebeat.co/a/alireza-bashiri/projects/github-com-azbshiri-parking-lot)\nThis is a solution for Gojek parking lot test\n\n![](https://www.ardanlabs.com/images/gopher-kart/gopher-blue-updated.gif)\n\n\n# Installation\nTo build this locally you should either have [Go](https://docs.docker.com/install/) or [Docker](https://golang.org/doc/install) installed.\n\n\n\n\n```shell script\n$ cd parking-lot\n$ go install\n$ parking-lot -h\nUsage of parking-lot:\n  -f string\n        Execute parking lot instructions from given file\n  -i    Execute parking lot instructions from interactive shell\n\n```\n\n### Building `parking-lot` binary inside a Docker container:\n\n```shell script\n$ cd parking-lot\n$ docker build -t parking-lot\n$ docker run -ti parking-lot -h\nUsage of parking-lot:\n  -f string\n        Execute parking lot instructions from given file\n  -i    Execute parking lot instructions from interactive shell\n```\n\n\n\n# CLI Usage\n```shell script\nUsage of parking-lot:\n  -f string\n        Execute parking lot instructions from given file\n  -i    Execute parking lot instructions from interactive shell\n  -stdin\n        Execute parking lot instructions from standard streams\n````\n\n### Read instructions from a file (locally)\n```shell script\n$ parking-lot -f file_inputs.txt\nCreated a parking lot with 6 slots\nAllocated slot number: 1\nAllocated slot number: 2\nAllocated slot number: 3\nAllocated slot number: 5\nAllocated slot number: 5\nAllocated slot number: 6\n...\n```\n\n### Read instructions from a file (it's actually standard stream) (Docker)\n```shell script\n$ cat file_inputs.txt | docker run -i parking-lot -i -stdin\ncreated a parking lot with 6 slots\nallocated slot number: 1\nallocated slot number: 2\nallocated slot number: 3\nallocated slot number: 5\nallocated slot number: 5\nallocated slot number: 6\n...\n```\n\n```shell script\n$ cat file_inputs.txt | parking-lot -i -stdin\ncreated a parking lot with 6 slots\nallocated slot number: 1\nallocated slot number: 2\nallocated slot number: 3\nallocated slot number: 5\nallocated slot number: 5\nallocated slot number: 6\n...\n```\n\n### Read instructions from interactive shell (locally/Docker)\n```shell script\n$ docker run -ti parking-lot -i\nparking-lot\u003e create_parking_lot 6\nCreated a parking lot with 6 slots\nparking-lot\u003e park KA-01-HH-1234 White\n...\n```\n\n```shell script\n$ parking-lot -i\nparking-lot\u003e create_parking_lot 6\nCreated a parking lot with 6 slots\nparking-lot\u003e park KA-01-HH-1234 White\nAllocated slot number: 1\nparking-lot\u003e park KA-01-HH-1234 White\nAllocated slot number: 2\n...\n```\n\n# Running tests\n\n```shell script\n$ cd parking-lot\n$ go test -v ./...\n````\n\n# TODO\n- [ ] Abstract out error handling in cli.Context\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3rez%2Fparking-lot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal3rez%2Fparking-lot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3rez%2Fparking-lot/lists"}