z

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package z takes lines from stdin, makes them into tasks that get processed and printed. Is uses concurrency to run fast and interfaces and composition to be generic and simple. It is a generalized version of lookup-v1.

To use it implement a Factory and a Task. Then call Run() on your factory. See lookup-v2/lookup.go for an example.

See https://youtu.be/woCg2zaIVzQ for more.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(f Factory)

Types

type Factory

type Factory interface {
	Make(line string) Task
}

type Task

type Task interface {
	Process()
	Print()
}

Directories

Path Synopsis
A faster version of lookup-v0.sh that handles errors and can be generalized.
A faster version of lookup-v0.sh that handles errors and can be generalized.
Lookup version that uses z package.
Lookup version that uses z package.

Jump to

Keyboard shortcuts

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