Help us shape the future of Go! Take the 2026 Go Developer Survey

floatfmt

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package floatfmt writes floats as JSON numbers, by their shortest decimal, as ECMA-262 formats numbers: the format of encoding/json and of encoding/json/jsontext.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFloat

func AppendFloat(dst []byte, f float64, bits int) []byte

AppendFloat appends the finite float f, of the precision bits, 64 or 32, as ECMA-262, 10th edition, section 7.1.12.1 formats a number, except that -0 is -0: as strconv.AppendFloat with the format 'f', or 'e' below 1e-6 and from 1e21, whose exponent has no leading zero, writes it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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