Ocean/Log/Array.go
Thorsten Sommer f33f7b5c29 Refactoring, Bugfix & Updates
+ Refactored all imports
+ Fixed a bug for the logging regarding removing \n \t \r
+ Updated to current MGO release
+ Changed the name of ICCC
2014-10-19 19:19:11 +02:00

19 lines
391 B
Go

package Log
import (
"container/list"
"github.com/SommerEngineering/Ocean/Log/Meta"
)
func logEntryListToArray(data *list.List) (result []Meta.Entry) {
count := data.Len()
result = make([]Meta.Entry, count, count)
position := 0
for entry := data.Front(); entry != nil; entry = entry.Next() {
result[position] = entry.Value.(Meta.Entry)
position++
}
return
}