• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / ark-tools / 13750545749

09 Mar 2025 04:51PM CUT coverage: 98.445%. Remained the same
13750545749

push

github

web-flow
Upgrade to Ark v0.3.0 (#7)

633 of 643 relevant lines covered (98.44%)

140.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/observer/row_to_table.go
1
package observer
2

3
import "github.com/mlange-42/ark/ecs"
4

5
// RowToTable creates an observer that serves as adapter from a [Row] observer to a [Table] observer.
6
func RowToTable(row Row) Table {
2✔
7
        return &rowToTable{
2✔
8
                Observer: row,
2✔
9
        }
2✔
10
}
2✔
11

12
// rowToTable is an observer that serves as adapter from a [Row] observer to a [Table] observer.
13
type rowToTable struct {
14
        Observer Row
15
        values   [1][]float64
16
}
17

18
// Initialize the child observer.
19
func (o *rowToTable) Initialize(w *ecs.World) {
1✔
20
        o.Observer.Initialize(w)
1✔
21
}
1✔
22

23
// Update the child observer.
24
func (o *rowToTable) Update(w *ecs.World) {
1✔
25
        o.Observer.Update(w)
1✔
26
}
1✔
27

28
// Header / column names of the child observer in the same order as data values.
29
func (o *rowToTable) Header() []string {
1✔
30
        return o.Observer.Header()
1✔
31
}
1✔
32

33
// Values for the current model tick in table format.
34
func (o *rowToTable) Values(w *ecs.World) [][]float64 {
1✔
35
        o.values[0] = o.Observer.Values(w)
1✔
36
        return o.values[:]
1✔
37
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc