shared

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRowsReadLimit = 25_000

Variables

View Source
var (
	Dynamic = "dynamic"
	AllText = "alltext"
)
View Source
var (
	CSV   = "csv"
	JSONL = "jsonl"
	Both  = "both"
)

data formats

Functions

func Check

func Check(err error, msg string, v ...any)

func FindColumnTypes

func FindColumnTypes(r io.Reader, rowsReadLimit int, typeSetting string) ([]string, []string, error)

Takes a reader as a parameter where the data inside it is JSONL.

func FormatNumber

func FormatNumber(n int64) string

func GetFileSize

func GetFileSize(path string) (res string)

func GetTableName

func GetTableName(file string) string

func IsCSVFile

func IsCSVFile(name string) bool

func IsGZIPFile

func IsGZIPFile(name string) bool

func IsJSONFile

func IsJSONFile(name string) bool

func PrettyPrintJson

func PrettyPrintJson(data any, w io.Writer)

func RunInParallel

func RunInParallel(numWorkers int, items []string, fn func(item string) error) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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