initial commit
This commit is contained in:
19
internal/runtime/options.go
Normal file
19
internal/runtime/options.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user