tokens

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tokens reads and writes an appetite the way people say it: a number of tokens such as 200k or 1.5m. It does no I/O.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(n int64) string

Format writes an appetite the way people say it: 200k, 1.5m, or the plain number when it is not a round multiple.

func Parse

func Parse(s string) (int64, error)

Parse reads an appetite: an integer, optionally ending in k (thousand) or m (million). Decimals need a suffix (1.5m); commas and underscores separate digits. The result is above zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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