SetParentCtx(可选)
(parent context.Context)
| 75 | |
| 76 | // SetParentCtx(可选) |
| 77 | func (i *IO) SetParentCtx(parent context.Context) { |
| 78 | i.Context, i.CancelCauseFunc = context.WithCancelCause(parent) |
| 79 | } |
| 80 | |
| 81 | func (i *IO) SetLogger(logger *log.Logger) { |
| 82 | i.Logger = logger |