removed unnecessary params in function call

This commit is contained in:
marco 2016-01-13 11:50:18 +01:00
parent 42a5bdff6f
commit 9e56f9eb23
3 changed files with 5 additions and 2 deletions

View File

@ -54,3 +54,6 @@ For more information please refer to the [Stringer docs](https://godoc.org/golan
## Additional functions of this fork
This fork additionally implements the Scanner and Valuer interface to use a enum seamlessly in a database model.
## TODO
- Add a flag to optionally generate implementation of Scanner und Valuer interface

2
sql.go
View File

@ -25,7 +25,7 @@ const scanner = `func (i %[1]s) Scan(value interface{}) error {
}
`
func (g *Generator) addValuerAndScanner(runs [][]Value, typeName string, runsThreshold int) {
func (g *Generator) addValuerAndScanner(typeName string) {
g.Printf("\n")
g.Printf(valuer, typeName)
g.Printf("\n\n")

View File

@ -315,7 +315,7 @@ func (g *Generator) generate(typeName string) {
g.buildValueToNameMap(runs, typeName, 10)
// SQL
g.addValuerAndScanner(runs, typeName, 0)
g.addValuerAndScanner(typeName)
}
// splitIntoRuns breaks the values into runs of contiguous sequences.