Categorygithub.com/246859/tail
repositorypackage
1.0.0
Repository: https://github.com/246859/tail.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

tail

tail returns last n lines of file

Install

go get github.com/246859/tail@latest

Usage

package main

import (
	"fmt"
	"github.com/246859/tail"
	"log"
	"os"
)

func main() {
	file, err := os.Open("hello.txt")
	if err != nil {
		log.Fatal(err)
	}
	bytes, err := tail.Tail(file, 10)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(bytes)
}