gitee.com/quant1x/pkg@v0.2.8/tools/tail/tail_posix.go (about)

     1  // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
     2  //go:build !windows
     3  // +build !windows
     4  
     5  package tail
     6  
     7  import (
     8  	"os"
     9  )
    10  
    11  // Deprecated: this function is only useful internally and, as such,
    12  // it will be removed from the API in a future major release.
    13  //
    14  // OpenFile proxies a os.Open call for a file so it can be correctly tailed
    15  // on POSIX and non-POSIX OSes like MS Windows.
    16  func OpenFile(name string) (file *os.File, err error) {
    17  	return os.Open(name)
    18  }