Skip to content

refactor and fix some lint issue - #54

Merged
kazeburo merged 1 commit into
mainfrom
feat/refactor-and-check-lint
Oct 4, 2026
Merged

kazeburo merged 1 commit into
mainfrom
feat/refactor-and-check-lint

Conversation

@kazeburo

@kazeburo kazeburo commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

PR Type

Bug fix, Enhancement


Description

  • Move option validation into flagrun.Validator.

  • Preserve connection errors with %w wrapping.

  • Remove obsolete dialer and build settings.


Diagram Walkthrough

flowchart LR
  cli["CLI options"]
  validator["flagrun.Validator"]
  run["Opt.Run"]
  connection["FTP connection"]
  cli -- "validate" --> validator
  validator -- "valid options" --> run
  run -- "connect" --> connection
Loading

File Walkthrough

Relevant files
Enhancement
main.go
Integrate option validation and modernize connection handling

main.go

  • Register verifyOptions with flagrun.Validator instead of calling it in
    Run.
  • Update method signatures for the validator and runner interfaces.
  • Wrap connection errors with %w and remove DualStack from the dialer.
+5/-9     
Tests
main_test.go
Adapt validation tests to updated method signature             

main_test.go

  • Pass an argument slice to verifyOptions in existing tests.
+1/-1     
Configuration changes
Makefile
Simplify build linker flags to version only                           

Makefile

  • Remove Git commit detection and commit injection from linker flags.
+1/-2     

@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@kazeburo
kazeburo merged commit 8d03adc into main Oct 4, 2026
3 checks passed
@kazeburo
kazeburo deleted the feat/refactor-and-check-lint branch October 4, 2026 13:16
@github-actions github-actions Bot mentioned this pull request Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant