presenter

package module
v0.0.0-...-746b8bd Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

go-presenter

This repo houses a single spot for a presenter abstraction:

type Presenter interface {
    Present(writer io.Writer) error
}

I've tended to use this abstraction in multiple projects, but the abstraction itself isn't conceptually coupled to any one project. This allows for a one-stop-shop to use this abstraction without having to redefine it for each project. Why is this abstraction helpful? This abstraction enables a few things:

  • you can output bytes without the implication that you need a copy of all of the bytes to write at any one point in time
  • separates what is being encoded from the encoding invocation (similar to json.Encoder)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Presenter

type Presenter interface {
	Present(io.Writer) error
}

Jump to

Keyboard shortcuts

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