gotty/backend/localcommand/options.go
Iwasaki Yudai a6133f34b7 Refactor
2017-08-11 15:31:11 +09:00

21 lines
332 B
Go

package localcommand
import (
"syscall"
"time"
)
type Option func(*LocalCommand)
func WithCloseSignal(signal syscall.Signal) Option {
return func(lcmd *LocalCommand) {
lcmd.closeSignal = signal
}
}
func WithCloseTimeout(timeout time.Duration) Option {
return func(lcmd *LocalCommand) {
lcmd.closeTimeout = timeout
}
}