jesusprubio / up

📶 Troubleshoot problems with your Internet connection
MIT License
446 stars 20 forks source link

feat: handle stdin piped input #71

Closed DnFreddie closed 1 day ago

DnFreddie commented 4 days ago

Added functionality to handle input via STDIN. If STDIN input is available, it is read and used to set the DNS resolver. If no STDIN input is detected, the program falls back to parsing command-line arguments. Errors encountered while reading from STDIN are logged as fatal. I can add also the validation for the right DNS string if u want .

Closes #39

jesusprubio commented 4 days ago

I was thinking in this use case. For example an user checking a list of IP addresses/URLs domains. I can't see why an user would use this feature? What use case do you have in mind?

DnFreddie commented 4 days ago

A ok now I understand thank u for feedback I will fix this

DnFreddie commented 4 days ago

I updated the program to read from stdin, parse URLs, added testing, and modified Probe.Do to accept an array of addresses or use defaults if empty.

DnFreddie commented 3 days ago

Fixed the issue i think it's ready to merge details in commit message