read_file_last_line

package module
v0.0.0-...-af293d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

README

read-file-last-line

read-file-last-line

step

  1. open file and get file size

  2. readAt() form file end,

  3. loop

    • read file like pieces, size from 64byte to 128byte to 256byte ...
    • put contents to bytes.Buffer
    • record content length

    until find line break

  4. reassemble contents, like from [e,d,bc,a] to [a,bc,d,e]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadLastLine

func ReadLastLine(fileName string) (data []byte, offset int, err error)

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL