go-lazy

command
v0.0.0-...-30fd898 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

go-lazy generates implementations of lazy evaluation for types.

When no types are given, it generates implementations of all builtin types and for interface{} (for use in merovius.de/go-misc/lazy). The output should go in a separate file. The created code will contain a function per type that can be used to generate a lazily evaluated version of that type. See merovius.de/go-misc/lazy for details on the usage of this function.

The generated implementations are concurrency-safe and have a reasonably low overhead.

The CLI is still not entirely finalized, it may be subject to change for now.

Usage:

go-lazy [flags] [<name> <type> ...]

You must pass an even number of arguments. For each wrapped type you need to give the name of the function and the type you want to wrap it.

The flags are:

-package pkg
	what package the generated file should reside in. Defaults to "lazy".

-out file
	output file, defaults to stdout.

Jump to

Keyboard shortcuts

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