feat: add main.go
This commit is contained in:
17
main.go
Normal file
17
main.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"example.com/sequence-audit/audit"
|
||||
)
|
||||
|
||||
func main() {
|
||||
tracker := audit.NewTracker()
|
||||
frames := []audit.Frame{
|
||||
{Device: "RX-A", Sequence: 65535}, {Device: "RX-B", Sequence: 8},
|
||||
{Device: "RX-A", Sequence: 0}, {Device: "RX-B", Sequence: 10},
|
||||
{Device: "RX-B", Sequence: 10}, {Device: "RX-B", Sequence: 9},
|
||||
}
|
||||
for _, frame := range frames { fmt.Println(frame.Device, frame.Sequence, tracker.Accept(frame)) }
|
||||
fmt.Println(tracker.Snapshot())
|
||||
}
|
||||
Reference in New Issue
Block a user