Skip to content

Songmu/replaceablewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

replaceablewriter

Build Status Coverage Status MIT License GoDoc

replaceablewriter replace internal io.Writer

Synopsis

f, _ := os.Open("...")
w := replaceablewriter.New(f)
defer w.Close()
w.Write(...)

// replace
f2, _ := os.Open("...")
w.Replace(f2)
w.Write(...)

Description

replaceablewriter is a library that keeps io.Wrter inside, provides io.WriteCloser interface, and allows us to replace internal io.Writer safely.

It is useful for log rotation, etc.

Installation

% go get github.com/Songmu/replaceablewriter

Author

Songmu

About

No description, website, or topics provided.

Resources

License

Stars

13 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors