<commit_before>package fls

import (
	"io"
	"math"
	"os"
)

type File struct {
	*os.File
}

const BufferLength = 32 * 1024

func LineFile(file *os.File) (*File) {
	return &File{file}
}

// seeks through file by line
// positive lines will move forward in file
// 0 lines will move to begining of line
// negative lines will move backwards in file

// -1 lines, 0 whence will return EOF
// 0 lines, 0 whence will return begining line 1
// 1 lines, 0 whence will return begining line 2

// -1 lines, 1 whence will return begining of previous line
// 0 lines, 1 whence will return begining of current line
// 1 lines, 1 whence will return begining of next line

// -1 lines, 2 whence will return begining of second to last line
// 0 lines, 2 whence will return begining of last line
// 1 lines, 2 whence will return EOF
func (file *File) SeekLine(lines int64, whence int) (int64, error) {

	// return error on bad whence
	if whence < 0 || whence > 2 {
		return file.Seek(0, whence)
	}
<commit_msg>go fmt<commit_after>package fls

import (
	"io"
	"math"
	"os"
)

type File struct {
	*os.File
}

const BufferLength = 32 * 1024

func LineFile(file *os.File) *File {
	return &File{file}
}

// seeks through file by line
// positive lines will move forward in file
// 0 lines will move to begining of line
// negative lines will move backwards in file

// -1 lines, 0 whence will return EOF
// 0 lines, 0 whence will return begining line 1
// 1 lines, 0 whence will return begining line 2

// -1 lines, 1 whence will return begining of previous line
// 0 lines, 1 whence will return begining of current line
// 1 lines, 1 whence will return begining of next line

// -1 lines, 2 whence will return begining of second to last line
// 0 lines, 2 whence will return begining of last line
// 1 lines, 2 whence will return EOF
func (file *File) SeekLine(lines int64, whence int) (int64, error) {

	// return error on bad whence
	if whence < 0 || whence > 2 {
		return file.Seek(0, whence)
	}

{'fraction_non_alphanumeric': 0.08893380495199596, 'fraction_numerical': 0.03436078827690753, 'mean_word_length': 3.2127659574468086, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5402657', 'n_tokens_mistral': 697, 'n_tokens_neox': 608, 'n_words': 307}