utils

package
v0.0.0-...-869b69f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Unlicense Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dereference

func Dereference(value interface{}) interface{}

func FileCopy

func FileCopy(src, destinationPath string, dirPerm, filePerm fs.FileMode) error

func GetFileMode

func GetFileMode(path string) fs.FileMode

func GetFileModeL

func GetFileModeL(path string) fs.FileMode

func IsPointer

func IsPointer(i any) bool

func Mkfile

func Mkfile(file string, dirPerm, filePerm fs.FileMode) (*os.File, error)

Types

type BytesIO

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

func NewBytesIO

func NewBytesIO(str []byte) *BytesIO

func (*BytesIO) Bytes

func (s *BytesIO) Bytes() []byte

func (*BytesIO) Read

func (s *BytesIO) Read(p []byte) (n int, err error)

func (*BytesIO) String

func (s *BytesIO) String() string

func (*BytesIO) Write

func (s *BytesIO) Write(p []byte) (n int, err error)

type String

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

func NewString

func NewString() *String

func (*String) CR

func (s *String) CR() *String

func (*String) CRLF

func (s *String) CRLF() *String

func (*String) LF

func (s *String) LF() *String

func (*String) Pad

func (s *String) Pad(len int) *String

func (*String) Print

func (s *String) Print()

func (*String) Rst

func (s *String) Rst()

func (*String) Rune

func (s *String) Rune(r rune) *String

func (*String) RuneAlt

func (s *String) RuneAlt(cond bool, yes, no rune) *String

func (*String) Str

func (s *String) Str(str string) *String

func (*String) StrAlt

func (s *String) StrAlt(cond bool, yes, no string) *String

func (*String) StrBold

func (s *String) StrBold(str string) *String

func (*String) StrClean

func (s *String) StrClean(clean bool, str string) *String

func (*String) StrItalic

func (s *String) StrItalic(str string) *String

func (*String) StrUnderline

func (s *String) StrUnderline(str string) *String

func (*String) String

func (s *String) String() string

type StringIO

type StringIO struct {
	strings.Builder
}

func NewStringIO

func NewStringIO(str string) *StringIO

func (*StringIO) Read

func (s *StringIO) Read(p []byte) (n int, err error)

func (*StringIO) Write

func (s *StringIO) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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