Finalizing for 1.2.0
This commit is contained in:
@@ -6,13 +6,16 @@ import (
|
||||
|
||||
// testOpen attempts to open a file for writing to test for suitability as a LogFile path.
|
||||
func testOpen(path string) (success bool, err error) {
|
||||
|
||||
var f *os.File
|
||||
|
||||
// Example #2, https://golang.org/pkg/os/#OpenFile
|
||||
if f, err = os.OpenFile(path, appendFlags, logPerm); err != nil {
|
||||
return
|
||||
}
|
||||
defer f.Close()
|
||||
if err = f.Close(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
success = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user