chore: update code format. (#628)

This commit is contained in:
Bo-Yi Wu
2021-04-15 19:49:17 +08:00
committed by GitHub
parent 7e087de6e6
commit afd9ff889e
68 changed files with 390 additions and 414 deletions

View File

@@ -95,8 +95,7 @@ func WithStarter(start Starter) Service {
}
type (
stopper struct {
}
stopper struct{}
startOnlyService struct {
start func()

View File

@@ -70,7 +70,7 @@ func TestServiceGroup_WithStart(t *testing.T) {
wait.Add(len(multipliers))
group := NewServiceGroup()
for _, multiplier := range multipliers {
var mul = multiplier
mul := multiplier
group.Add(WithStart(func() {
lock.Lock()
want *= mul
@@ -97,7 +97,7 @@ func TestServiceGroup_WithStarter(t *testing.T) {
wait.Add(len(multipliers))
group := NewServiceGroup()
for _, multiplier := range multipliers {
var mul = multiplier
mul := multiplier
group.Add(WithStarter(mockedStarter{
fn: func() {
lock.Lock()