internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package internal provides shared marshal/unmarshal helpers for opt and opt/zero packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalFloatJSON

func UnmarshalFloatJSON(data []byte) (float64, bool, error)

UnmarshalFloatJSON parses JSON data as a float64, accepting both numbers and strings. Returns (value, valid, error). Empty strings return (0, false, nil).

func UnmarshalFloatText

func UnmarshalFloatText(text []byte) (float64, bool, error)

UnmarshalFloatText parses text as a float64. Returns (value, valid, error). Empty and "null" strings return (0, false, nil).

func UnmarshalIntJSON

func UnmarshalIntJSON(data []byte, bits int) (int64, bool, error)

UnmarshalIntJSON parses JSON data as an integer, accepting both numbers and strings. Returns (value, valid, error). Empty strings return (0, false, nil).

func UnmarshalIntText

func UnmarshalIntText(text []byte, bits int) (int64, bool, error)

UnmarshalIntText parses text as an integer. Returns (value, valid, error). Empty and "null" strings return (0, false, nil).

Types

This section is empty.

Jump to

Keyboard shortcuts

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