goderive

command module
v0.0.0-...-0ddb18c Latest Latest
Warning

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

Go to latest
Published: May 11, 2016 License: BSD-3-Clause Imports: 11 Imported by: 0

README

This tool extends `go generate` by detecting type and function declarations
preceded by a comment like "[Derive(MyTrait)]", and providing a higher-level
library to generate code for those declarations.

     $ go get github.com/reflexionhealth/goderive

The "github.com/goderive/traits" package provides some example code generators,
which can be used to experiment with goderive.

    package slices

    //go:generate goderive Unique=github.com/reflexion/goderive/traits/unique

    // [deriving(Unique)]
    type Integers []int

    // [deriving(Unique)]
    type Strings []string

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
traits

Jump to

Keyboard shortcuts

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