Skip to content

flags parsing fixes and add examples

Choose a tag to compare

@name212 name212 released this 10 Feb 11:46
· 25 commits to main since this release
3f60072

Fixes:
flags parsing:

  • copy of flag set is not deep, thus we have problems is call multiple parsers with InitFlags. Now we are using internal flag set for parsing flags in parser, but add another fake flag set to passed flag set into InitFlags, for output help and prevent unknown flags error during parsing parent flags
  • filepath.Abs does not resolve ~, we were fixed it
  • add parser to Flags and ExtractConfig method, it improve dx because we can init flags during initialize command and pass only Flags to handler.

AskPassword add new line after prompt. We were fix it.

Add:

  • if ssh connection config set ForceUseSSHAgent force no init new agent in cli-ssh
  • also, add check that hosts were set in DefaultSSHProvider

Chore:

  • add example with working library with cobra packages.
  • some fixes in README