From 67b9e2a9adca3171c496b8b863dd61cadec561f2 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 25 Jul 2014 15:49:10 +0800 Subject: [PATCH] Fix typo --- field.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/field.go b/field.go index 7b2cd4d3..1d20e4d9 100644 --- a/field.go +++ b/field.go @@ -32,7 +32,7 @@ func (f *Field) IsTime() bool { return is_time } -func parseSqlTag(str string) (typ string, addational_typ string, size int) { +func parseSqlTag(str string) (typ string, additionalType string, size int) { if str == "-" { typ = str } else if str != "" { @@ -56,10 +56,10 @@ func parseSqlTag(str string) (typ string, addational_typ string, size int) { typ = m["TYPE"] } - addational_typ = m["NOT NULL"] + " " + m["UNIQUE"] + additionalType = m["NOT NULL"] + " " + m["UNIQUE"] if len(m["DEFAULT"]) > 0 { - addational_typ = addational_typ + "DEFAULT " + m["DEFAULT"] + additionalType = additionalType + "DEFAULT " + m["DEFAULT"] } }