20 lines
312 B
Go
20 lines
312 B
Go
package runtime
|
|
|
|
import "io"
|
|
|
|
type RuntimeOption func(*Runtime)
|
|
|
|
func WithStdout(stdout io.Writer) RuntimeOption {
|
|
return func(r *Runtime) {
|
|
// Set Stdout
|
|
r.opts.Stdout = stdout
|
|
}
|
|
}
|
|
|
|
func WithStderr(stderr io.Writer) RuntimeOption {
|
|
return func(r *Runtime) {
|
|
// Set Stderr
|
|
r.opts.Stderr = stderr
|
|
}
|
|
}
|