go_goutils/logging/funcs.go

20 lines
283 B
Go
Raw Normal View History

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
}