This is important for packages (like https://github.com/golang/glog) where the flags are embedded deeply into the code.
I already have this supported in kubernetes here that we can borrow/steal:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/util/plog_import.go
(I typo'd the name of that file and I'll fix it up soon).
This would be a lot easier if the pflag.Value.Type didn't exist or was an extended optional interface. It is unclear why that is there and where it is used.
This is important for packages (like https://github.com/golang/glog) where the flags are embedded deeply into the code.
I already have this supported in kubernetes here that we can borrow/steal:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/util/plog_import.go
(I typo'd the name of that file and I'll fix it up soon).
This would be a lot easier if the
pflag.Value.Typedidn't exist or was an extended optional interface. It is unclear why that is there and where it is used.