liveBook · Manning

Fmt

fmt is a software library or package that provides formatted text generation and, in some implementations, formatted input and output operations.

How 3 Manning books explain it

Go in Action, Second Edition

The fmt package is a Go standard-library package that provides formatted input and output operations.

How it is used
Handles console output, formatted string construction, simple input, and basic error reporting in Go applications.
How deep it goes
Explains core printing, formatting verbs, string builders, input, and formatted errors, while deferring advanced logging options.
Examples
Uses word-count output, a versioned JSON/XML conversion CLI, interactive JSON input, formatting verbs, and printed key-value-store errors.
What you can do after
Apply it via fmt functions to print, format strings, read simple input, and create or display formatted errors.

Read how Go in Action, Second Edition explains fmt →

Learn Go with Pocket-Sized Projects

fmt is Go's standard library package for formatted I/O operations.

How it is used
Provides formatted output for Go programs, including simple debugging through Println.
How deep it goes
Explains importing fmt, calling Println, standard output, and exported names without detailing the wider formatting family.
Examples
Uses a main.go Hello world program and notes human-readable integer and Boolean output.
What you can do after
Apply it via fmt.Println to write strings and basic values to standard output.

Read how Learn Go with Pocket-Sized Projects explains fmt →

Learn C++ by Example

fmt is an open-source C++ formatting library that provides format-string-based text formatting facilities.

How it is used
Provides portable formatted output when compiler support for std::format is incomplete.
How deep it goes
Explains installation, placeholders, specifiers, type checking, and alignment, but limits usage to commonly supported features.
Examples
Formats integers into a center-justified triangle using fixed and dynamically supplied widths.
What you can do after
Apply it via fmt::format to produce aligned, type-checked C++ output.

Read how Learn C++ by Example explains fmt →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.