mirror of
https://github.com/sorenisanerd/gotty.git
synced 2025-04-02 17:10:29 +00:00
20 lines
303 B
Go
20 lines
303 B
Go
package docker
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Option func(*DockerExec)
|
|
|
|
func WithDockerContainer(name string) Option {
|
|
return func(lcmd *DockerExec) {
|
|
lcmd.containerName = name
|
|
}
|
|
}
|
|
|
|
func WithCloseTimeout(timeout time.Duration) Option {
|
|
return func(lcmd *DockerExec) {
|
|
lcmd.closeTimeout = timeout
|
|
}
|
|
}
|