2021-02-26 15:52:29 -05:00
|
|
|
package logging
|
|
|
|
|
|
|
|
import (
|
2021-02-27 00:51:58 -05:00
|
|
|
"os"
|
2021-02-26 15:52:29 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
func testOpen(path string) (success bool, err error) {
|
|
|
|
var f *os.File
|
|
|
|
|
|
|
|
// Example #2, https://golang.org/pkg/os/#OpenFile
|
2021-02-26 20:27:35 -05:00
|
|
|
if f, err = os.OpenFile(path, appendFlags, logPerm); err != nil {
|
2021-02-26 15:52:29 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
defer f.Close()
|
|
|
|
|
|
|
|
success = true
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|