vitessio/vitess

Rewrite `flagutil.OptionalFlag` to use generics

Chiusa

#11.154 aperta il 1 set 2022

 (8 commenti) (0 reazioni) (1 assegnatario)Go (2383 fork)batch import
Component: CLIType: Internal Cleanupgood first issue

Metriche repository

Star
 (21.227 stelle)
Metriche merge PR
 (Merge medio 3g 21h) (134 PR mergiate in 30 g)

Descrizione

Now that we have generics, we can stop hand-writing each implementation of flagutil.OptionalFlag for each type we want, instead writing a generic OptionalFlag over any type T, providing a parsing function that has the signature func(string) (T, error)

Guida contributor