Documentation
¶
Overview ¶
Package otx provides context.Context access methods for xo/ox.
Index ¶
- func Addr(ctx context.Context, name string) *netip.Addr
- func AddrPort(ctx context.Context, name string) *netip.AddrPort
- func Any(ctx context.Context, name string) (ox.Value, bool)
- func BigFloat(ctx context.Context, name string) *big.Float
- func BigInt(ctx context.Context, name string) *big.Int
- func BigRat(ctx context.Context, name string) *big.Rat
- func Bool(ctx context.Context, name string) bool
- func Byte(ctx context.Context, name string) byte
- func Bytes(ctx context.Context, name string) []byte
- func CIDR(ctx context.Context, name string) *netip.Prefix
- func Complex128(ctx context.Context, name string) complex128
- func Complex64(ctx context.Context, name string) complex64
- func Count(ctx context.Context, name string) int
- func Duration(ctx context.Context, name string) time.Duration
- func Float32(ctx context.Context, name string) float32
- func Float64(ctx context.Context, name string) float64
- func Get[T any](ctx context.Context, name string) T
- func Int(ctx context.Context, name string) int
- func Int16(ctx context.Context, name string) int16
- func Int32(ctx context.Context, name string) int32
- func Int64(ctx context.Context, name string) int64
- func Map[K cmp.Ordered, T any](ctx context.Context, name string) map[K]T
- func Path(ctx context.Context, name string) string
- func Rune(ctx context.Context, name string) rune
- func Runes(ctx context.Context, name string) []rune
- func Slice[E any](ctx context.Context, name string) []E
- func String(ctx context.Context, name string) string
- func Time(ctx context.Context, name string) ox.FormattedTime
- func TimeTime(ctx context.Context, name string) time.Time
- func URL(ctx context.Context, name string) *url.URL
- func Uint(ctx context.Context, name string) uint
- func Uint16(ctx context.Context, name string) uint16
- func Uint32(ctx context.Context, name string) uint32
- func Uint64(ctx context.Context, name string) uint64
- func Uint8(ctx context.Context, name string) uint8
- func Vars(ctx context.Context) (ox.Vars, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Addr ¶
Addr returns the netip.Addr variable from the context.
func AddrPort ¶
AddrPort returns the netip.AddrPort variable from the context.
func CIDR ¶
CIDR returns the netip.Prefix variable from the context.
func Complex128 ¶
func Complex128(ctx context.Context, name string) complex128
Complex128 returns the complex128 variable from the context.
func Duration ¶
Duration returns the time.Duration variable from the context.
func Time ¶
func Time(ctx context.Context, name string) ox.FormattedTime
Time returns the ox.Time variable from the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.