Commit Graph

4 Commits

Author SHA1 Message Date
Alexander Simmerl bb65f097fd
Simplify WriteFileAtomic
We can make the implementation more robust by adjusting our assumptions
and leverage explicit file modes for syncing. Additionally we going to
assume that we want to clean up and can't really recover if thos
operations (file close and removal) fail.

* utilise file mode for majority of concerns
* improve test coverage by covering more assumptions
* signature parity with ioutil.WriteFile
* always clean up

Replaces #160
2018-03-19 09:38:28 +01:00
Anton Kaliaev bcf15e527d
make GoPath a function
otherwise it could try to execute go binary and panic if no go binary
found. See https://github.com/tendermint/tendermint/issues/782
2017-10-25 11:01:52 +04:00
Anton Kaliaev 35e38e8932
call go env GOPATH if env var is not found (Refs #60) 2017-10-11 12:42:54 +04:00
Anton Kaliaev d1ca2c6f83
[common] add a test for WriteFileAtomic 2017-07-28 11:40:21 -04:00