libs/os: remove unused aliases, add test cases (#5654)

Remove unused ReadFile (unused) and
WriteFile (almost unused, alias of ioutil.WriteFile).

Add testcases for Must{Read,Write}File.
This commit is contained in:
Alessio Treglia
2020-11-13 10:59:45 +00:00
committed by GitHub
parent 95cff1efb4
commit 8bd3d5105f
9 changed files with 71 additions and 85 deletions
+2 -9
View File
@@ -32,16 +32,9 @@ func Fail() {
}
if callIndex == callIndexToFail {
Exit()
fmt.Printf("*** fail-test %d ***\n", callIndex)
os.Exit(1)
}
callIndex++
}
func Exit() {
fmt.Printf("*** fail-test %d ***\n", callIndex)
os.Exit(1)
// proc, _ := os.FindProcess(os.Getpid())
// proc.Signal(os.Interrupt)
// panic(fmt.Sprintf("*** fail-test %d ***", callIndex))
}