2021-05-26
やること宣言
tommy.icon
勉強中メモ
tommy.icon
Fukuoka.goでLTすることにしたので発表が充実するようにtakolabelを育てる dry-runどうやって実装するかね〜と思っていたところこんな記事を見つけたので読んでいく
helps make the entire tool more maintainable: use the --dry-run code path as an input to the “execute” code path.
なるほど
We can use the type system to keep our --dry-run and our “execute” flow in sync, by artificially introducing an API boundary down the middle of our tool: a boundary which the compiler can check.
ふむ?
The --dry-run mode produces a strongly-typed output which is essentially a declaration of what actions we want to carry out. The “execute” mode consumes the --dry-run output as its own input. This way, we’re forced to stay relatively honest.
ふむふむ
F#読むのむずいw
なるほどねー、良さそうなので真似してみよう
さて何から始めるかな
gatherとexecuteに分離
-createオプションを追加
gatherとexecuteに分離からやろう
gatherではrepositoryのlistを作る
まずはdry-runでどういう出力をさせるか決めよう
こういう感じかな
would create these labels: Label 1, Label 2, Label3 in org1/repo1, org1/repo2, org2/repo3
やったこと
tommy.icon
雑談