From 3a5e7a894c33bf2e69d8a8f1e0baca6547cff9b2 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sat, 29 Aug 2015 15:41:20 +0300 Subject: [PATCH] Give package a new name --- field.go | 2 +- field_test.go | 8 ++++---- file_ops.go | 2 +- confection.go => secondly.go | 2 +- confection_test.go => secondly_test.go | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) rename confection.go => secondly.go (99%) rename confection_test.go => secondly_test.go (87%) diff --git a/field.go b/field.go index 831186b..373deb9 100644 --- a/field.go +++ b/field.go @@ -1,4 +1,4 @@ -package confection2 +package secondly import ( "log" diff --git a/field_test.go b/field_test.go index d5290e7..ec0c7e3 100644 --- a/field_test.go +++ b/field_test.go @@ -1,4 +1,4 @@ -package confection2 +package secondly import ( "testing" @@ -6,7 +6,7 @@ import ( func TestExtractFields(t *testing.T) { c := testConf{ - AppName: "Confection", + AppName: "Secondly", Version: 1.1, Database: testDatabaseConf{ Adapter: "mysql", @@ -38,7 +38,7 @@ func TestExtractFields(t *testing.T) { func TestDiff(t *testing.T) { c1 := testConf{ - AppName: "Confection", + AppName: "Secondly", Version: 1.3, Database: testDatabaseConf{ Adapter: "mysql", @@ -47,7 +47,7 @@ func TestDiff(t *testing.T) { }, } c2 := testConf{ - AppName: "Confection", + AppName: "Secondly", Version: 2, Database: testDatabaseConf{ Adapter: "postgresql", diff --git a/file_ops.go b/file_ops.go index a078a3d..963e318 100644 --- a/file_ops.go +++ b/file_ops.go @@ -1,4 +1,4 @@ -package confection2 +package secondly import ( "errors" diff --git a/confection.go b/secondly.go similarity index 99% rename from confection.go rename to secondly.go index b141ed8..b0d70ee 100644 --- a/confection.go +++ b/secondly.go @@ -1,4 +1,4 @@ -package confection2 +package secondly import ( "encoding/json" diff --git a/confection_test.go b/secondly_test.go similarity index 87% rename from confection_test.go rename to secondly_test.go index 85092d9..430ec6a 100644 --- a/confection_test.go +++ b/secondly_test.go @@ -1,4 +1,4 @@ -package confection2 +package secondly import ( "encoding/json" @@ -20,7 +20,7 @@ type testDatabaseConf struct { } const ( - goodJSON = `{"app_name": "Confection", "version": 1}` + goodJSON = `{"app_name": "Secondly", "version": 1}` badJSON = `{"app_name": "noooo...` ) @@ -47,8 +47,8 @@ func TestUnmarshal(t *testing.T) { if err := json.Unmarshal([]byte(goodJSON), i); err != nil { t.Error("Unexpected error") } - if conf.AppName != "Confection" { - t.Errorf("Expected Foo to equal %q, got %q", "Confection", conf.AppName) + if conf.AppName != "Secondly" { + t.Errorf("Expected Foo to equal %q, got %q", "Secondly", conf.AppName) } if conf.Version != 1 { t.Errorf("Expected Bar to equal %q, got %q", 1, conf.Version)