Skip to content

dev: clean code arround CLI args usage #4557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 28, 2024
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 20, 2024

There is a mix between args from os.Args and args from Cobra.

The PR removes the usage os.Args, cleans the related functions, and adds tests.

@ldez ldez added enhancement New feature or improvement topic: cleanup Related to code, process, or doc cleanup labels Mar 20, 2024
@ldez
Copy link
Member Author

ldez commented Mar 20, 2024

My worst enemies are lll and the Windows file system: today Windows FS wants to fight with me!
How it's possible to have .\\tmp\foo based on an absolute path (/tmp/foo) ✨ ✨ 💥
This FS should be classified as a neuronal poison.

@ldez
Copy link
Member Author

ldez commented Mar 21, 2024

The answer: the path obtained with filepath.FromSlash("/tmp/foo") is \tmp\foo and on Windows FS this is not an absolute path... 🙈

@ldez ldez added this to the next milestone Mar 21, 2024
@ldez ldez removed this from the next milestone Mar 23, 2024
@ldez ldez force-pushed the feat/aaaaargs branch 2 times, most recently from 3f3059f to 9e8a3f6 Compare March 24, 2024 17:18
@ldez ldez requested a review from bombsimon March 24, 2024 17:55
@ldez ldez added this to the next milestone Mar 28, 2024
@ldez ldez merged commit c5f13ba into golangci:master Mar 28, 2024
13 checks passed
@ldez ldez deleted the feat/aaaaargs branch March 28, 2024 19:48
@ldez ldez modified the milestones: next, v1.58 May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants