From 9e56f9eb2350663791a885a37cb42b53da5587a2 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 13 Jan 2016 11:50:18 +0100 Subject: [PATCH] removed unnecessary params in function call --- README.md | 3 +++ sql.go | 2 +- stringer.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6b2ca7..53022d0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/sql.go b/sql.go index 4851fae..5adf318 100644 --- a/sql.go +++ b/sql.go @@ -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") diff --git a/stringer.go b/stringer.go index 0944bc0..7e721bb 100644 --- a/stringer.go +++ b/stringer.go @@ -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.