util

package
v0.0.0-...-d66891c Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpeakerByPath

func GetSpeakerByPath(idSpMap map[string]string, path string) string

GetSpeakerByPath searches speaker by path

func ParseSpeakers

func ParseSpeakers(s string) map[string]string

ParseSpeakers parses speakers from string line

Types

type ReadWrapper

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

ReadWrapper wraps file or uses stdin

func NewReadWrapper

func NewReadWrapper(file string) (*ReadWrapper, error)

NewReadWrapper tries open file or uses stdin if file is empty

func (*ReadWrapper) Close

func (rw *ReadWrapper) Close() error

Close closes file if any

func (*ReadWrapper) Read

func (rw *ReadWrapper) Read(p []byte) (int, error)

Read is main reader method

type WriteWrapper

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

WriteWrapper wraps file or uses stdout

func NewWriteWrapper

func NewWriteWrapper(file string) (*WriteWrapper, error)

NewWriteWrapper tries open file or uses stdout if file is empty

func (*WriteWrapper) Close

func (ww *WriteWrapper) Close() error

Close closes file if any

func (*WriteWrapper) Write

func (ww *WriteWrapper) Write(p []byte) (int, error)

Write is main writer method

func (*WriteWrapper) WriteString

func (ww *WriteWrapper) WriteString(s string) (int, error)

WriteString implement StringWritter

Jump to

Keyboard shortcuts

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