donegroup.WithCancel
とwait
の関連がわかりやすい。cancel
とwait
でわかりやすい
ctx, cencel wait := donegroup.WithCancel(ctx)
だけをみるととても良い
desc: Example | |
vars: | |
actions: [ | |
{ | |
"type": "first", | |
"value": 1 | |
}, | |
{ | |
"type": "second", | |
"value": 2 |
k1low |
desc: Login and get projects. | |
runners: | |
req: https://example.com/api/v1 | |
db: mysql://root:mypass@localhost:3306/testdb | |
vars: | |
username: alice | |
steps: | |
- | |
db: | |
query: SELECT * FROM users WHERE name = '{{ vars.username }}' |
.each do |f| | |
content = File.read(f) | |
title = content.partition("\n")[0] | |
body = content.partition("\n")[2] | |
next if body.empty? | |
next if title.split(' ').empty? | |
splitted = title.split(' ') |