spf13 / pflag

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
BSD 3-Clause "New" or "Revised" License
2.43k stars 348 forks source link

Feature Request: pflag conversion to flag library. #376

Closed Kush-Saxena closed 1 year ago

Kush-Saxena commented 1 year ago

I can see that we have a backward compatibility of using goflags with the pflag library i.e pflag library can parse goflags also. However Can we have a feature that can convert the pflag flagset to go flag flagset. I ask is because I am trying to make pflag library work with Ginkgo ( which supports go flags internally ref: https://github.com/onsi/ginkgo/issues/1207) .

Maybe there a workaround to this or a hack that could be done to make it compatible with ginkgo.

Thanks.

Refer : https://github.com/onsi/ginkgo/issues/1207