Skip to content

Commit c67b85c

Browse files
author
Philipp Möhler
committed
removed external log package
1 parent b2badf3 commit c67b85c

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

mongodm.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ import (
8484

8585
"github.com/nicksnyder/go-i18n/i18n"
8686

87-
"git.zebresel.com/signum/lib/log"
88-
8987
"gopkg.in/mgo.v2"
9088
"gopkg.in/mgo.v2/bson"
9189
)
@@ -238,10 +236,10 @@ func (self *Connection) Register(document IDocumentBase, collectionName string)
238236
self.modelRegistry[typeName] = model
239237
self.typeRegistry[typeName] = reflectType.Elem()
240238

241-
log.I("Registered type '%v' for collection '%v'", typeName, collectionName)
239+
fmt.Println("Registered type '%v' for collection '%v'", typeName, collectionName)
242240

243241
} else {
244-
log.W("Tried to register type '%v' twice", typeName)
242+
fmt.Println("Tried to register type '%v' twice", typeName)
245243
}
246244
}
247245

mongodm_test.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
package mongodm
22

33
import (
4+
"fmt"
45
"testing"
56

67
"github.com/nicksnyder/go-i18n/i18n"
78

89
"gopkg.in/mgo.v2/bson"
910
)
1011

11-
import (
12-
"git.zebresel.com/signum/lib/log"
13-
"git.zebresel.com/signum/lib/mongodb"
14-
)
12+
import "git.zebresel.com/signum/lib/mongodb"
1513

1614
const (
1715
DBHost string = "127.0.0.1"
@@ -52,7 +50,7 @@ func init() {
5250
err := i18n.LoadTranslationFile("../../app/localisation/en-US.webserver.errors.json")
5351

5452
if err != nil {
55-
log.E("%v", err)
53+
fmt.Println("%v", err)
5654
}
5755

5856
//get localisation

validation.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package mongodm
22

33
import (
4+
"fmt"
45
"regexp"
5-
6-
"git.zebresel.com/signum/lib/log"
76
)
87

98
func validateEmail(email string) bool {
@@ -18,7 +17,7 @@ func validateRegexp(regex string, target string) bool {
1817
match, err := regexp.MatchString(regex, target)
1918

2019
if err != nil {
21-
log.E("%v", err)
20+
fmt.Println("%v", err)
2221
}
2322

2423
return match

0 commit comments

Comments
 (0)