vitessio/vitess

Rewrite `flagutil.OptionalFlag` to use generics

クローズ

#11,154 opened on 2022/09/01

 (8 件のコメント) (0 件のリアクション) (1 人の担当者)Go (2,383 件のフォーク)batch import
Component: CLIType: Internal Cleanupgood first issue

Repository metrics

Stars
 (21,227 個のスター)
PR merge metrics
 (平均マージ 3d 21h) (30d で 134 merged PRs)

説明

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)

コントリビューターガイド