issue with pflag flagset

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • pflag

    Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.

  • Just the bonus question: did I miss some hints when checking the https://github.com/spf13/pflag readme or the use case of FlagSet is indeed to just be used by cobra CLIs in subcommand only and not directly?

  • go-clap

    Lightweight, non intrusive Command Line Argument Parser

  • Cobra has lots of features, but is really complex and intrusive, especially for a newcomer. I would advise you to have a look at clap (https://github.com/fred1268/go-clap) which is very easy to use and absolutely non intrusive. All you need to do is to create a struct containing the fields you want to retrieve from the command line, and annotate it with standard Go tags.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts