Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit e65266f

Browse files
ndeloofPacoVK
authored andcommitted
happy shinny linter ☜(⌒▽⌒)☞
Signed-off-by: Nicolas De Loof <[email protected]> Signed-off-by: Pascal Euhus <[email protected]>
1 parent d3eaf15 commit e65266f

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

cli/cmd/compose/start.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ package compose
1818

1919
import (
2020
"context"
21+
2122
"github.com/docker/compose-cli/api/client"
2223
"github.com/docker/compose-cli/api/compose"
2324
"github.com/docker/compose-cli/api/progress"
25+
2426
"github.com/spf13/cobra"
2527
)
2628

cli/cmd/compose/up.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package compose
1919
import (
2020
"context"
2121
"fmt"
22-
"golang.org/x/sync/errgroup"
2322
"os"
2423
"os/signal"
2524
"path/filepath"
@@ -37,6 +36,7 @@ import (
3736
"github.com/compose-spec/compose-go/types"
3837
"github.com/sirupsen/logrus"
3938
"github.com/spf13/cobra"
39+
"golang.org/x/sync/errgroup"
4040
)
4141

4242
// composeOptions hold options common to `up` and `run` to run compose project
@@ -223,7 +223,7 @@ func runCreateStart(ctx context.Context, opts upOptions, services []string) erro
223223
return err
224224
}
225225

226-
eg.Wait()
226+
err = eg.Wait()
227227
if exitCode != 0 {
228228
return cmd.ExitCodeError{ExitCode: exitCode}
229229
}

cli/formatter/logs.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
func NewLogConsumer(ctx context.Context, w io.Writer, color bool, prefix bool) compose.LogConsumer {
3131
return &logConsumer{
3232
ctx: ctx,
33-
presenters: map[string]*Presenter{},
33+
presenters: map[string]*presenter{},
3434
width: 0,
3535
writer: w,
3636
color: color,
@@ -42,12 +42,12 @@ func (l *logConsumer) Register(service string, source string) {
4242
l.register(service, source)
4343
}
4444

45-
func (l *logConsumer) register(service string, source string) *Presenter {
45+
func (l *logConsumer) register(service string, source string) *presenter {
4646
cf := monochrome
4747
if l.color {
4848
cf = <-loop
4949
}
50-
p := &Presenter{
50+
p := &presenter{
5151
colors: cf,
5252
service: service,
5353
container: source,
@@ -98,20 +98,20 @@ func (l *logConsumer) computeWidth() {
9898
// LogConsumer consume logs from services and format them
9999
type logConsumer struct {
100100
ctx context.Context
101-
presenters map[string]*Presenter
101+
presenters map[string]*presenter
102102
width int
103103
writer io.Writer
104104
color bool
105105
prefix bool
106106
}
107107

108-
type Presenter struct {
108+
type presenter struct {
109109
colors colorFunc
110110
service string
111111
container string
112112
prefix string
113113
}
114114

115-
func (p *Presenter) setPrefix(width int) {
115+
func (p *presenter) setPrefix(width int) {
116116
p.prefix = p.colors(fmt.Sprintf("%-"+strconv.Itoa(width)+"s |", p.container))
117117
}

0 commit comments

Comments
 (0)