Skip to content
No description, website, or topics provided.
Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore initial implement Sep 22, 2019
.travis.yml
LICENSE
Makefile initial implement Sep 22, 2019
README.md
appveyor.yml initial implement Sep 22, 2019
go.mod
replaceablewriter.go
version.go initial implement Sep 22, 2019

README.md

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

You can’t perform that action at this time.