Skip to content
New issue

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

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

Already on GitHub? # to your account

May be we should migrate structopt to clap 4 ? #282

Closed
Liyixin95 opened this issue Sep 1, 2023 · 2 comments
Closed

May be we should migrate structopt to clap 4 ? #282

Liyixin95 opened this issue Sep 1, 2023 · 2 comments

Comments

@Liyixin95
Copy link
Contributor

structopt is in maintenance mode now, and the latest release is 2 years ago.

Migrate to clap4 will cause a little difference in help message:

before:

bandwhich 0.20.0

USAGE:
    bandwhich.exe [FLAGS] [OPTIONS]

FLAGS:
    -a, --addresses            Show remote addresses table only
    -c, --connections          Show connections table only
    -h, --help                 Prints help information
    -n, --no-resolve           Do not attempt to resolve IPs to their hostnames
    -p, --processes            Show processes table only
    -r, --raw                  Machine friendlier output
    -s, --show-dns             Show DNS queries
    -t, --total-utilization    Show total (cumulative) usages
    -V, --version              Prints version information

OPTIONS:
    -d, --dns-server <dns-server>    A dns server ip to use instead of the system default
    -i, --interface <interface>      The network interface to listen on, eg. eth0

after:

Usage: bandwhich.exe [OPTIONS]

Options:
  -i, --interface <INTERFACE>    The network interface to listen on, eg. eth0
  -r, --raw                      Machine friendlier output
  -n, --no-resolve               Do not attempt to resolve IPs to their hostnames
  -p, --processes                Show processes table only
  -c, --connections              Show connections table only
  -a, --addresses                Show remote addresses table only
  -t, --total-utilization        Show total (cumulative) usages
  -s, --show-dns                 Show DNS queries
  -d, --dns-server <DNS_SERVER>  A dns server ip to use instead of the system default
  -h, --help                     Print help

I think this change probably doesn't matters? But it depends on you maintainers. If you think it's ok, I would like to provide a pr.

@tranzystorekk
Copy link
Contributor

No harm in posting a PR anyway, and the change doesn't seem too intrusive.

@cyqsimon
Copy link
Collaborator

Yes please. There are also two security advisories (medium and low) that are caused by out-of-date dependencies of structopt, so this will fix these too.

I was thinking about doing it myself, but as stated in #275, my time is limited. Please go ahead. Much thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants