utils

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteAttr

func WriteAttr(w io.Writer, name string, value []string) error

func WriteAttrJson

func WriteAttrJson(w io.Writer, name string, value any) error

func WriteBoolAttr

func WriteBoolAttr(w io.Writer, name string) error

func WriteEscapedText

func WriteEscapedText(w io.Writer, text string) error

func WriteRawText

func WriteRawText(w io.Writer, text string) error

func WriteTagClose

func WriteTagClose(w io.Writer, name string) error

func WriteTagOpenBeg

func WriteTagOpenBeg(w io.Writer, name string) error

func WriteTagOpenEnd

func WriteTagOpenEnd(w io.Writer) error

Types

type EscapedWriter

type EscapedWriter struct {
	W           io.Writer
	TrimNewline bool
}

func (*EscapedWriter) Write

func (a *EscapedWriter) Write(b []byte) (int, error)

type ID

type ID = *id

func NewID

func NewID() ID

type Pool

type Pool[T any] struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool[T any](new func() T) *Pool[T]

func NewStructPool

func NewStructPool[T any]() *Pool[*T]

func (*Pool[T]) Get

func (p *Pool[T]) Get() T

func (*Pool[T]) Put

func (p *Pool[T]) Put(v T)

Jump to

Keyboard shortcuts

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