From d4658f22be1d1b0a2e3b3f169489d6533da27ef7 Mon Sep 17 00:00:00 2001 From: timchenxiaoyu <837829664@qq.com> Date: Wed, 7 Jun 2017 04:26:01 +0800 Subject: [PATCH] fix example error (#53) --- .gitignore | 2 ++ examples/stream-decoder.go | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index daf913b..59610b5 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ _testmain.go *.exe *.test *.prof + +.idea \ No newline at end of file diff --git a/examples/stream-decoder.go b/examples/stream-decoder.go index 1766018..1e27183 100644 --- a/examples/stream-decoder.go +++ b/examples/stream-decoder.go @@ -39,7 +39,6 @@ import ( "fmt" "io" "os" - "path/filepath" "github.com/klauspost/reedsolomon" ) @@ -88,10 +87,9 @@ func main() { out := make([]io.Writer, len(shards)) for i := range out { if shards[i] == nil { - dir, _ := filepath.Split(fname) outfn := fmt.Sprintf("%s.%d", fname, i) fmt.Println("Creating", outfn) - out[i], err = os.Create(filepath.Join(dir, outfn)) + out[i], err = os.Create(outfn) checkErr(err) } }