util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollapseHomedir added in v0.1.1

func CollapseHomedir(in string) string

func ConvertWriter

func ConvertWriter(wr io.Writer, err error) send.Sender

func FileExists added in v0.1.1

func FileExists(path string) bool

func GetHomedir added in v0.1.1

func GetHomedir() string

func GetHostname added in v0.1.1

func GetHostname() string

func TryExpandHomedir added in v0.1.1

func TryExpandHomedir(in string) string

Types

type CloseFunc

type CloseFunc func() error

CloseFunc is a function used to close a service or close the client connection to a service.

type LocalBuffer

type LocalBuffer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewLocalBuffer

func NewLocalBuffer(b bytes.Buffer) *LocalBuffer

NewLocalBuffer provides a synchronized read/Write closer.

func (*LocalBuffer) Close

func (b *LocalBuffer) Close() error

func (*LocalBuffer) Read

func (b *LocalBuffer) Read(p []byte) (n int, err error)

func (*LocalBuffer) String

func (b *LocalBuffer) String() string

func (*LocalBuffer) Write

func (b *LocalBuffer) 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