chainguard-dev / chainguard-dev/tw
tw/commands: add a new command to get free port
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 36
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 6
Description
Current workaround are:
${FREE_PORT}PORT=$(for p in $(shuf -i 30000-40000 -n 10); do (echo > /dev/tcp/127.0.0.1/$p) >/dev/null 2>&1 || { echo $p; break; }; done)
This command should check whether the selected PORT is actually FREE or not. If its not, it should iterate over.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the existing commands under tw/commands and how new commands are registered. Check the current command tests, if present, then implement the requested command so it checks the selected port and iterates when that port is occupied; done means the command returns a free port.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100