Skip to content
Snippets Groups Projects
Commit cf3080f7 authored by Ophestra's avatar Ophestra
Browse files

truncate

parent 7b9d3fed
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ var (
)
var (
in []byte
in []byte
out io.Writer
)
......@@ -73,7 +73,7 @@ func main() {
c++
}
}
out, err = os.OpenFile("output.png", os.O_WRONLY|os.O_CREATE, 0644)
out, err = os.OpenFile("output.png", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
println("Error while opening output,", err)
os.Exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment