Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
seroukhov committed Apr 3, 2021
1 parent fa5efc3 commit ebed0e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions persistence/MemoryPersistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type MemoryPersistence struct {
// a MemoryPersistence
func NewMemoryPersistence(prototype reflect.Type) *MemoryPersistence {
if prototype == nil {
return nil
panic("Prototype cannot be nil")
}
c := &MemoryPersistence{}
c.Prototype = prototype
Expand Down Expand Up @@ -370,12 +370,9 @@ func (c *MemoryPersistence) Create(correlationId string, item interface{}) (resu
c.Lock.Lock()

newItem := CloneObject(item)
//GenerateObjectId(&newItem)
//id := GetObjectId(newItem)
c.Items = append(c.Items, newItem)

c.Lock.Unlock()
//c.Logger.Trace(correlationId, "Created item %s", id)
c.Logger.Trace(correlationId, "Created item")

errsave := c.Save(correlationId)
Expand Down

0 comments on commit ebed0e8

Please sign in to comment.