diff --git a/camelize.go b/camelize.go index 8a9928e..d8851c8 100644 --- a/camelize.go +++ b/camelize.go @@ -22,10 +22,6 @@ func (i Ident) Camelize() Ident { for i, part := range i.Parts { var x string var capped bool - if strings.ToLower(part) == "id" { - out = append(out, "ID") - continue - } for _, c := range part { if unicode.IsLetter(c) || unicode.IsDigit(c) { if i == 0 { diff --git a/camelize_test.go b/camelize_test.go index 435ae62..8f546ed 100644 --- a/camelize_test.go +++ b/camelize_test.go @@ -10,6 +10,8 @@ func Test_Camelize(t *testing.T) { table := []tt{ {"", ""}, {"bob dylan", "bobDylan"}, + {"id", "id"}, + {"ID", "id"}, {"widgetID", "widgetID"}, {"widget_ID", "widgetID"}, {"Widget_ID", "widgetID"}, diff --git a/pascalize_test.go b/pascalize_test.go index 0225313..9a3a5b7 100644 --- a/pascalize_test.go +++ b/pascalize_test.go @@ -10,6 +10,8 @@ func Test_Pascalize(t *testing.T) { table := []tt{ {"", ""}, {"bob dylan", "BobDylan"}, + {"ID", "ID"}, + {"id", "ID"}, {"widgetID", "WidgetID"}, {"widget_ID", "WidgetID"}, {"Widget_ID", "WidgetID"},