mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-19 15:30:17 +00:00
lib/filestream: remove logging redundant path values in a single error message
This commit is contained in:
parent
81400c80f0
commit
82f64072d2
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ func OpenReaderAt(path string, offset int64, nocache bool) (*Reader, error) {
|
||||||
func Open(path string, nocache bool) (*Reader, error) {
|
func Open(path string, nocache bool) (*Reader, error) {
|
||||||
f, err := os.Open(path)
|
f, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot open file %q: %w", path, err)
|
return nil, err
|
||||||
}
|
}
|
||||||
r := &Reader{
|
r := &Reader{
|
||||||
f: f,
|
f: f,
|
||||||
|
@ -179,7 +179,7 @@ type Writer struct {
|
||||||
func OpenWriterAt(path string, offset int64, nocache bool) (*Writer, error) {
|
func OpenWriterAt(path string, offset int64, nocache bool) (*Writer, error) {
|
||||||
f, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0600)
|
f, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot open %q: %w", path, err)
|
return nil, err
|
||||||
}
|
}
|
||||||
n, err := f.Seek(offset, io.SeekStart)
|
n, err := f.Seek(offset, io.SeekStart)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue