go-wrap

command module
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

go-wrap

probably it's just some sort of brainfuck, but still pretty funny concept imho.

So, the concept is to use Out[T] for each func within the project, or to use Wrap[T](val T, err error) (yet another function in this package to wrap common touples return val, err), or just OK[T](v T) / Err[T](err error) to convert any value to it.

Togeather with the list of handlers such as And (also AndXN where N is a number up to 9), Join, Proof, Range, Each, ReadChan, Sliced (plus **Async versions of those functions) and also Just,DisJoin, Flat to reach some kind of declarative style.

go generate

U can go install this package and later use it via //go:generate go-wrap togeather with flags:

  • exclude: list of coma-separated functions' names

  • mode: pub(default), priv, all, priv-rcv, pub-rcv, all-rcv, priv-fun, pub-fun and all-fun to generate wrappers for regular funcs and methods which can return few values like:

    • ()
    • (V)
    • (error)
    • (V, error)

where V is value of any type

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
generator
Code generated by "go-wrap"; DO NOT EDIT.
Code generated by "go-wrap"; DO NOT EDIT.
parser
Code generated by "go-wrap"; DO NOT EDIT.
Code generated by "go-wrap"; DO NOT EDIT.
pkg

Jump to

Keyboard shortcuts

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