split

package module
v0.0.0-...-238d840 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-2-Clause Imports: 15 Imported by: 0

README

go-split

Split text files into parts.

Usage: go-split [options] input-file...
  -compress string
        {gzip|other=without compression}
  -parallelism int
        Maximum number of files which read parallely (default 4)
  -prefix string
        Path prefix of outputs (default "out-")
  -split int
        Number of files that splitted (default 8)
  -verbose
        Verbose output
  -version
        Show version

Development

Requirements

  • Go 1.22
  • GNU Make

Prerequisites

  • Install stringer project locally.
    $ make tools
    

Build

$ make
# -> go-split

License

BSD 2-Clause License

SEE LICENSE

My Environment

  • CentOS Stream 9
  • Go 1.22.1
  • GNU Make 4.3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionType

type CompressionType int
const (
	CompressionUnknown CompressionType = iota
	CompressionNone
	CompressionGzip
)

func (CompressionType) String

func (i CompressionType) String() string

type Future

type Future[T any] interface {
	Get() (T, error)
}

type Param

type Param struct {
	Verbose     bool
	Split       int
	Parallelism int
	Prefix      string
	Compress    string
}

type Splitter

type Splitter struct {
	// contains filtered or unexported fields
}

func NewSplitter

func NewSplitter() *Splitter

func (*Splitter) Do

func (s *Splitter) Do(ctx context.Context, files []string, param Param) (retErr error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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