1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-03-05 06:46:48 +00:00

replaced deprecated os.SEEK_END with op.SeekEnd

This commit is contained in:
postmannen 2023-04-18 06:29:59 +02:00
parent f39f3d73c7
commit 8868a8db64

View file

@ -2,6 +2,7 @@ package steward
import ( import (
"fmt" "fmt"
"io"
"os" "os"
"path/filepath" "path/filepath"
@ -157,7 +158,7 @@ func (m methodREQTailFile) handler(proc process, message Message, node string) (
outCh := make(chan []byte) outCh := make(chan []byte)
t, err := tail.TailFile(fp, tail.Config{Follow: true, Location: &tail.SeekInfo{ t, err := tail.TailFile(fp, tail.Config{Follow: true, Location: &tail.SeekInfo{
Offset: 0, Offset: 0,
Whence: os.SEEK_END, Whence: io.SeekEnd,
}}) }})
if err != nil { if err != nil {
er := fmt.Errorf("error: methodREQToTailFile: tailFile: %v", err) er := fmt.Errorf("error: methodREQToTailFile: tailFile: %v", err)