minor change
This commit is contained in:
parent
ebe1360dc0
commit
d26e17dba7
@ -9,7 +9,7 @@ import (
|
||||
const (
|
||||
databaseDefault = "wiki"
|
||||
termCollectionDefault = "term"
|
||||
RevisionCollectionDefault = "revision"
|
||||
revisionCollectionDefault = "revision"
|
||||
)
|
||||
|
||||
type mongoStorage struct {
|
||||
@ -33,7 +33,7 @@ func New(ms *mgo.Session, config Config) mongoStorage {
|
||||
config.TermCollection = termCollectionDefault
|
||||
}
|
||||
if config.RevisionCollection == "" {
|
||||
config.RevisionCollection = RevisionCollectionDefault
|
||||
config.RevisionCollection = revisionCollectionDefault
|
||||
}
|
||||
|
||||
return mongoStorage{
|
||||
|
@ -45,7 +45,9 @@ func (r *Renderer) Render(w io.Writer, name string, data interface{}) error {
|
||||
}
|
||||
ctx, ok := data.(map[string]interface{})
|
||||
if !ok {
|
||||
return errors.New("data is compatible with map[string]interface{}")
|
||||
if data != nil {
|
||||
return errors.New("data is not compatible with map[string]interface{}")
|
||||
}
|
||||
}
|
||||
return t.ExecuteWriter(ctx, w)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user