go_goutils/logging/funcs.go

20 lines
283 B
Go

package logging
import (
"os"
)
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()
success = true
return
}