Skip to content

Commit 375b1c6

Browse files
committed
Use uint instead of int for field
1 parent 65badbc commit 375b1c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ type Options struct {
162162
// value DEFAULT_LINE_BUFFER_SIZE is usually sufficient, but if
163163
// ErrLineBufferOverflow errors occur, try increasing the size with this
164164
// field.
165-
LineBufferSize int
165+
LineBufferSize uint
166166
}
167167

168168
// NewCmdOptions creates a new Cmd with options. The command is not started
@@ -196,11 +196,11 @@ func NewCmdOptions(options Options, name string, args ...string) *Cmd {
196196
if options.Streaming {
197197
c.Stdout = make(chan string, DEFAULT_STREAM_CHAN_SIZE)
198198
c.stdoutStream = NewOutputStream(c.Stdout)
199-
c.stdoutStream.SetLineBufferSize(options.LineBufferSize)
199+
c.stdoutStream.SetLineBufferSize(int(options.LineBufferSize))
200200

201201
c.Stderr = make(chan string, DEFAULT_STREAM_CHAN_SIZE)
202202
c.stderrStream = NewOutputStream(c.Stderr)
203-
c.stderrStream.SetLineBufferSize(options.LineBufferSize)
203+
c.stderrStream.SetLineBufferSize(int(options.LineBufferSize))
204204
}
205205

206206
if len(options.BeforeExec) > 0 {

0 commit comments

Comments
 (0)