Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nasa9084/scangen


https://github.com/nasa9084/scangen

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

        

scangen
=======

scangen generates *sql.Row scan method for given struct.

## Example:

apply scangen for struct below:

``` go
type SomeStruct struct {
Name string
Age int
}
```

then scangen generates:

``` go
func (someStruct *SomeStruct) Scan(sc interface{
Scan(...interface{}) error
} error {
return sc.Scan(&someStruct.Name, &someStruct.Age)
}
```

## KNOWN ISSUE

* when given a filename to arguments, package will be empty