Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestoreSTD ¶
type RestoreSTD struct {
// contains filtered or unexported fields
}
func RedirectStdToFiles ¶
func RedirectStdToFiles() (*RestoreSTD, error)
RedirectStdToFiles replaces stdout and stderr with file writers in the working directory. The returned struct has functions to revert replacement of stdout and err with fs files.
func RedirectStdToFilesIn ¶ added in v0.0.2
func RedirectStdToFilesIn(dir string) (*RestoreSTD, error)
RedirectStdToFilesIn is RedirectStdToFiles writing into dir, which is created if it does not exist. An app that already has a place for its scratch files can keep the logs there instead of dropping them wherever it was started.
func (*RestoreSTD) AddCallback ¶
func (r *RestoreSTD) AddCallback(f func())
func (*RestoreSTD) Restore ¶
func (r *RestoreSTD) Restore()
func (*RestoreSTD) Run ¶
func (r *RestoreSTD) Run(f func())
Click to show internal directories.
Click to hide internal directories.