util

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMimeType = "application/octet-stream"
)

Variables

This section is empty.

Functions

func Base64Encode added in v0.3.2

func Base64Encode(src string) string

func ConsumeReader added in v0.2.1

func ConsumeReader(r io.ReadCloser)

func DetermineMimeType added in v0.2.1

func DetermineMimeType(name string) string

func GuessSize added in v0.2.1

func GuessSize(r io.Reader) (size int64)

func MarshalCookies added in v0.5.1

func MarshalCookies(cookies map[string]string) string

func QuietlyClose

func QuietlyClose(c io.Closer)

func SecretUrl added in v0.2.1

func SecretUrl(url string) string

Types

type WriterEx added in v0.2.1

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

func UpgradeWriter added in v0.2.1

func UpgradeWriter(w io.Writer) *WriterEx

UpgradeWriter gives you a powerful Writer than the original one!

func (*WriterEx) MustWriteString added in v0.2.1

func (w *WriterEx) MustWriteString(s ...string)

func (*WriterEx) Write added in v0.2.1

func (w *WriterEx) Write(p []byte) (n int, err error)

func (*WriterEx) WriteByte added in v0.2.1

func (w *WriterEx) WriteByte(b byte) (err error)

func (*WriterEx) WriteString added in v0.2.1

func (w *WriterEx) WriteString(s string) (n int, err error)

Jump to

Keyboard shortcuts

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