Skip to content

Commit

Permalink
feat(make): Introduce SyncOutput
Browse files Browse the repository at this point in the history
This option-method enables calling the `-O` flag.

Signed-off-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung committed Nov 23, 2023
1 parent 2e16186 commit 06016ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions make/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type MakeOptions struct {
printDirectory bool `flag:"-w"`
question bool `flag:"-q"`
silent bool `flag:"-s"`
syncOutput bool `flag:"-O"`
touch bool `flag:"-t"`
trace bool `flag:"--trace"`
version bool `flag:"-v"`
Expand Down Expand Up @@ -318,6 +319,14 @@ func WithSilent(silent bool) MakeOption {
}
}

// Synchronize the output.
func WithSyncOutput(sync bool) MakeOption {
return func(mo *MakeOptions) error {
mo.syncOutput = sync
return nil
}
}

// Touch targets instead of remaking them. Equivalent to calling the flags
// -t|--touch
func WithTouch(touch bool) MakeOption {
Expand Down

0 comments on commit 06016ea

Please sign in to comment.