package
0.5.0
Repository: https://github.com/vadv/gopher-lua-libs.git
Documentation: pkg.go.dev

# README

tac GoDoc

Usage

local file = io.open("data.txt", "w")
file:write("1", "\n")
file:write("2", "\n")
file:write("3", "\n")

local tac = require("tac")
local scanner, err = tac.open("data.txt")
if err then error(err) end

while true do
    local line = scanner:line()
    if line == nil then break end
    print(line)
end
scanner:close()

-- Output:
-- 3
-- 2
-- 1

# Functions

Close lua tac_ud:close() close current file for tac.
Line lua tac_ud:line() return next upper line: string or nil.
Loader is the module loader function.
Open lua tac.open(filename) open filename for tac scan returns (tac_ud, err).
Preload adds tac to the given Lua state's package.preload table.