1
0
Fork 0

Give package a new name

This commit is contained in:
Gregory Eremin 2015-08-29 15:41:20 +03:00
parent d4ec68d29e
commit 3a5e7a894c
5 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
package confection2 package secondly
import ( import (
"log" "log"

View File

@ -1,4 +1,4 @@
package confection2 package secondly
import ( import (
"testing" "testing"
@ -6,7 +6,7 @@ import (
func TestExtractFields(t *testing.T) { func TestExtractFields(t *testing.T) {
c := testConf{ c := testConf{
AppName: "Confection", AppName: "Secondly",
Version: 1.1, Version: 1.1,
Database: testDatabaseConf{ Database: testDatabaseConf{
Adapter: "mysql", Adapter: "mysql",
@ -38,7 +38,7 @@ func TestExtractFields(t *testing.T) {
func TestDiff(t *testing.T) { func TestDiff(t *testing.T) {
c1 := testConf{ c1 := testConf{
AppName: "Confection", AppName: "Secondly",
Version: 1.3, Version: 1.3,
Database: testDatabaseConf{ Database: testDatabaseConf{
Adapter: "mysql", Adapter: "mysql",
@ -47,7 +47,7 @@ func TestDiff(t *testing.T) {
}, },
} }
c2 := testConf{ c2 := testConf{
AppName: "Confection", AppName: "Secondly",
Version: 2, Version: 2,
Database: testDatabaseConf{ Database: testDatabaseConf{
Adapter: "postgresql", Adapter: "postgresql",

View File

@ -1,4 +1,4 @@
package confection2 package secondly
import ( import (
"errors" "errors"

View File

@ -1,4 +1,4 @@
package confection2 package secondly
import ( import (
"encoding/json" "encoding/json"

View File

@ -1,4 +1,4 @@
package confection2 package secondly
import ( import (
"encoding/json" "encoding/json"
@ -20,7 +20,7 @@ type testDatabaseConf struct {
} }
const ( const (
goodJSON = `{"app_name": "Confection", "version": 1}` goodJSON = `{"app_name": "Secondly", "version": 1}`
badJSON = `{"app_name": "noooo...` badJSON = `{"app_name": "noooo...`
) )
@ -47,8 +47,8 @@ func TestUnmarshal(t *testing.T) {
if err := json.Unmarshal([]byte(goodJSON), i); err != nil { if err := json.Unmarshal([]byte(goodJSON), i); err != nil {
t.Error("Unexpected error") t.Error("Unexpected error")
} }
if conf.AppName != "Confection" { if conf.AppName != "Secondly" {
t.Errorf("Expected Foo to equal %q, got %q", "Confection", conf.AppName) t.Errorf("Expected Foo to equal %q, got %q", "Secondly", conf.AppName)
} }
if conf.Version != 1 { if conf.Version != 1 {
t.Errorf("Expected Bar to equal %q, got %q", 1, conf.Version) t.Errorf("Expected Bar to equal %q, got %q", 1, conf.Version)