simplify debug
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
b57c149c7f
commit
7e60b3a789
3
file.go
3
file.go
@ -3,6 +3,7 @@ package file
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@ -57,7 +58,7 @@ func (c *fileConfig) Load(ctx context.Context) error {
|
||||
|
||||
fp, err := os.OpenFile(c.path, os.O_RDONLY, os.FileMode(0400))
|
||||
if err != nil && !c.opts.AllowFail {
|
||||
return ErrPathNotExist
|
||||
return fmt.Errorf("failed to open: %s, error: %w", c.path, ErrPathNotExist)
|
||||
} else if err == nil {
|
||||
defer fp.Close()
|
||||
var buf []byte
|
||||
|
Loading…
Reference in New Issue
Block a user