Skip to content

Commit 928d66e

Browse files
committed
remove logs from opts
1 parent f36525f commit 928d66e

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

xmain/opts.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,18 @@ import (
99

1010
"github.com/spf13/pflag"
1111

12-
"oss.terrastruct.com/util-go/cmdlog"
1312
"oss.terrastruct.com/util-go/xos"
1413
)
1514

1615
type Opts struct {
1716
Args []string
1817
Flags *pflag.FlagSet
1918
env *xos.Env
20-
log *cmdlog.Logger
2119

2220
flagEnv map[string]string
2321
}
2422

25-
func NewOpts(env *xos.Env, log *cmdlog.Logger, args []string) *Opts {
23+
func NewOpts(env *xos.Env, args []string) *Opts {
2624
flags := pflag.NewFlagSet("", pflag.ContinueOnError)
2725
flags.SortFlags = false
2826
flags.Usage = func() {}
@@ -31,7 +29,6 @@ func NewOpts(env *xos.Env, log *cmdlog.Logger, args []string) *Opts {
3129
Args: args,
3230
Flags: flags,
3331
env: env,
34-
log: log,
3532
flagEnv: make(map[string]string),
3633
}
3734
}

xmain/xmain.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func Main(run RunFunc) {
3838
Env: xos.NewEnv(os.Environ()),
3939
}
4040
ms.Log = cmdlog.New(ms.Env, ms.Stderr)
41-
ms.Opts = NewOpts(ms.Env, ms.Log, args)
41+
ms.Opts = NewOpts(ms.Env, args)
4242

4343
wd, err := os.Getwd()
4444
if err != nil {

xmain/xmaintest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (ts *TestState) Start(tb testing.TB, ctx context.Context) {
7777

7878
Log: log,
7979
Env: ts.Env,
80-
Opts: NewOpts(ts.Env, log, args),
80+
Opts: NewOpts(ts.Env, args),
8181
PWD: ts.PWD,
8282
}
8383

0 commit comments

Comments
 (0)