golist

command
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Golist is a tool that generates 'Slice*' type wrappers for a given slice type T.

Typically this process would be run using go generate, like this:

//go:generate golist -type=Foo

running this command

golist -type=Foo

in the same directory will create the file slice_foo.go containing a definition of

type SliceFoo struct {
	data []Foo
}

The default type is SliceT or sliceT (depending on if the type is exported) and output file is slice_t.go. This can be overridden with the -output flag.

Jump to

Keyboard shortcuts

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