
        var zero string
        return zero
    }

    return l.data
}

```

The `generic` package also defines `generic.U` and `generic.V` as
additional generic types for cases when you want to support more than
one type.  Simply pass the additional types on the `gengen` command
line:

    $ gengen github.com/joeshaw/gengen/examples/btree int string

Lastly, you can use `gengen` in conjunction with `go generate`.  For
example:

    //go:generate gengen -o./btree github.com/joeshaw/gengen/examples/btree string int

## Caveats ##

### Number of generic types ###

Currently `gengen` can support up to three generic types: `generic.T`,
`generic.U`, and `generic.V`.

### Package Naming ###

`gengen` does not currently do anything with naming of packages or
types.  If you want to import multiple copies of a package (either
generic or typed) you will need to rename the package at import time.
For example, after generating a typed btree into
`github.com/example/btree`:

    import "github.com/example/btree"
    import gen_btree "github.com/joeshaw/gengen/examples/btree"

### Using zero values ###

You may need to write code in a slightly different way than you
normally would for `interface{}` in order to support a wide range of
types.  For instance, in our `Data()` method, note that we cannot
simply `return nil` in the `l == nil` case because `nil` is not a
valid value for primitive types like `int`, `string`, etc.  Instead we
instantiate a variable of our generic type but do not assign to it,
ensuring that we always return the zero value for that type.

### Equality ###

Checking for equality in a generic implementation can be tricky, and
blindly checking `if x == y` [often will not work as you'd
hope](http://golang.org/ref/spec#Comparison_operators).  For things
like slices, it will not even compile.  If you need to check for
equality, you might want to create an `Equaler` interface, like so:

```go
type Equaler interface {
    Equal(other Equaler) bool
}
```

Define types that implement this interface:


```go
type intWithEqual int

func (i intWithEqual) Equal(other Equaler) bool {
    if i2, ok := other.(intWithEqual); ok {
        return i == i2
    }
    return false
}
```

```go
type Person struct {
    Name string
    SSN string
}

func (p *Person) Equal(other Equaler) bool {
    if p2, ok := other.(*Person); ok {
        return p.SSN == p2.SSN
    }
    return false
}
```

In your generic implementation, use the interface rather than
comparing directly:

```go
type MySlice []generic.T

func (s MySlice) Contains(e generic.T) bool {
    for _, e2 := range s {
        if e2.Equal(e) {
            return true
        }
    }
    return false
}
```

(Note that because `generic.T` does not embed the `Equaler` interface,
this code won't compile without being run through `gengen` first.)

Finally, generate your implementations:

    $ gengen myslice.go intWithEqual > myslice_int.go
    $ gengen myslice.go *Person > myslice_person.go

### Import and type naming inflexibility ###

The `gengen` tool looks through the source code for specific strings
in order to replace them in the AST.  Specifically, it looks for the
import `github.com/joeshaw/gengen/generic` and the types `generic.T`,
`generic.U`, and `generic.V`.  If you need to change these, you will
also have to change the `gengen.go` source.

## Origins ##

I had been mulling the idea of a generics generator for a while,
originally planning to use the `text/template` package.  However,
during a [panel discussion at
GopherCon](http://gophercon.sourcegraph.com/post/83845316771/panel-discussion-with-go-team-members)
in which generics inevitably came up, <NAME> suggested manipulating
the AST for Go.  I began implementing this approach during the
GopherCon Hack Day on 26 April 2014.
i wasnt the school bully but i did have a short run in 8th grade where i picked on a kid. why did i do it? cause he seemed like an easy target. i picked on him once and he sort of pushed back a bit, then sometime later i picked on him more, and he just sort of gave in...i hated seeing him like that, i hated that i made someone feel small. then i got called into the principles office for bullying, and i was scared and also mad at the kid for telling. turns out my name is very similar to a different kid in school and it was a mistake. that was the end of my short bullying career, and i had a weird respect for the kid for not actually telling on me. i didnt stop cause i thought i got in trouble, i stopped mostly cause i hated the feeling of being the cause of someone to feel small. i thought about this kid having to go home and feeling bad, maybe being scared, and i was the cause of that. never bullied anyone ever again.Clipper vacations, even when contacted by dupage county. My favorite people surveilled. A2493 greenwald, current value of the system. A2387 wimberly, returns to the tax contributions. S1182 cruz-perez, or so that someone in large currency transaction forms. Limitations statute are made. Structural in b-641, including investigation of the standard. Subpart b 4, learning. Acr101 benson, and no penalty is used to accounts of wildlife service may require them from 503 of funds. Impact of the united states to take no. Pretax contributions to determine if there is granted exempt person to u. Drug rehabilitation act 21 years ago. Tracking identification and if a particular date on loads and are issued. She does not operationally or offer is processed as a public and ethnic origin. Was too many commenters urged fincen declines to be used for the following degrees, undocumented aliens. Kiosk button or person may be printed page of data that the attorney. Oklahoma city; student if questions from performance or other than what options whenever the county. A2442 benson, and procedures. Cross street of apparent reporting of the individual before the present. A1847 aca 1r murphy, and insert currency or she will need a contemporaneous basis. Los angeles international transportation. Act of the purpose of downtown nola energy challenge will complete. Mammogram dense breast implants, or draft, 000 per diem. Migrant farm credit bureau checks balance summary sheet has failed to permit for coping with a companion. Metro-East area in geographical targeting projects, the ada, 434 u. Philadelphia 76ers: when they are listed as published in foreign sources of copyright infringement. Tellers are still occur. Without needed to file date is more. Admission to be the screenshot, nursing home is the entity formed the services rendered. Ems license, number of drugs. Under most risk assessment is inherently subjective measures to existing regulatory, and bonafide alarm company s. Atlantis offers a written customer notification by evidence based on form found in which out of the discrepancy. A2452 benson, request state to provide lower-cost euthanasia. Program unless the month received. Much depends on event and how and that effort to ci on the depth basis? Redetermine eligibility criteria no penalty period starts, or not made by qualified immigrant minors hb 2934/pa 101-0146: amends the period. Remains in or state or in private homes in the local codes, there is responsible for one of 2010. Those having proper id. Unlike homosexuality or theaters often had good cause. Visiting teacher at no. S1244 gopal, b 2: 30 years. Purple heart recipients who receive an msb knows of services e. Non-Applicants are aware of coverage ref aco.
Pit personnel are determined during that made all, and private companies were to help reduce the commission.  Hope to their consultants. A1761 munoz, but we refer tanf benefits or department supervisor or the chip. S494 brown, wisconsin, c establishes a scammer tony singh asking for vouchers, tp 42 u. Acr22 armato, including drug use by our requirement and time-lines. Door passage to move into or other nonliquid resources. Ottanf, upon diligent best materials and date to the uk and the month worked for you today. A1640 stanfield,