fprintf

package
v0.0.0-...-71be670 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFileHandler

func RegisterFileHandler(name string, f FileHandler)

RegisterFileHandler a new file handler. This will panic if the name is already registered.

func RegisterTemplater

func RegisterTemplater(name string, f Templater)

RegisterTemplater a new templater. This will panic if the name is already registered.

Types

type FileHandler

type FileHandler func(ctx context.Context, filename string) (io.WriteCloser, error)

FileHandler returns an io.WriteCloser that will handle the details of writing to the given filename. The filename could respresent a resource, such as a database, or a file.

type Templater

type Templater func(io.Writer, string, ...interface{}) (int, error)

Templater is a function that will write the formatted string to the writer. The templater is responsible for handling the templating.

Jump to

Keyboard shortcuts

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