fileserver

package
v0.0.0-...-c24152d Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomString

func CreateRandomString(len int) string

func FileReaderCounter

func FileReaderCounter(fileReader *FileReader, counts chan Count)

func FileWriterCounter

func FileWriterCounter(cpu, filename string, fileWriter *FileWriter, lines <-chan Count, quit chan<- int)

func IsSpace

func IsSpace(b byte) bool

Types

type Chunk

type Chunk struct {
	PrevCharIsSpace bool
	Buffer          []byte
	LineCount       int
}

type Count

type Count struct {
	LineCount int
	WordCount int
	Lines     []string
}

func GetCount

func GetCount(chunk Chunk) Count

type FileReader

type FileReader struct {
	File            *os.File
	LastCharIsSpace bool
	// contains filtered or unexported fields
}

func (*FileReader) ReadChunk

func (fileReader *FileReader) ReadChunk(buffer []byte) (Chunk, error)

func (*FileReader) ReadScan

func (fileReader *FileReader) ReadScan(lines chan<- Count)

type FileWriter

type FileWriter struct {
	File *xlsx.File
	// contains filtered or unexported fields
}

func (*FileWriter) WriteSheet

func (fileWriter *FileWriter) WriteSheet(rows []string, filename string)

Jump to

Keyboard shortcuts

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