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

formats

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package formats picks the format of a package type. It is apart from internal/format so a format package can implement that contract without an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func For

For returns the format of a package type with its default settings.

Types

type Settings

type Settings struct {
	// NPM is the npm format's (decision 0034).
	NPM npm.Settings
}

Settings are the server-wide options of the formats that take any, from the configuration (decision 0009), each format's in a field of its own. The zero value is every format's default, which is 7.x's. A format's handler carries its settings, so every write that reaches it through an item service built with Settings.For applies them, whichever route the write came by.

func (Settings) For

For returns the format of a package type with s applied. A type is generic until its format lands: generic keeps no package index.

Jump to

Keyboard shortcuts

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