reflect

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(val reflect.Value, value string) error

Bind value converts a string to a reflect.Value based on its kind.

It supports basic types (string, int, uint, float, bool, duration) and slices of strings.

Example:

var x int
err := reflect.Bind(reflect.ValueOf(&x).Elem(), "42")

func ParseBool

func ParseBool(str string) (bool, error)

ParseBool parses a boolean string with support for more formats.

It accepts 1, t, true, yes, y, on as true. It accepts 0, f, false, no, n, off as false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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