Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Remove unused function and struct #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions tracking/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ type Cargo struct {
Events []Event `json:"events"`
}

// Leg is a read model for booking views.
type Leg struct {
VoyageNumber string `json:"voyage_number"`
From string `json:"from"`
To string `json:"to"`
LoadTime time.Time `json:"load_time"`
UnloadTime time.Time `json:"unload_time"`
}

// Event is a read model for tracking views.
type Event struct {
Description string `json:"description"`
Expand All @@ -84,20 +75,6 @@ func assemble(c *cargo.Cargo, events cargo.HandlingEventRepository) Cargo {
}
}

func assembleLegs(c cargo.Cargo) []Leg {
var legs []Leg
for _, l := range c.Itinerary.Legs {
legs = append(legs, Leg{
VoyageNumber: string(l.VoyageNumber),
From: string(l.LoadLocation),
To: string(l.UnloadLocation),
LoadTime: l.LoadTime,
UnloadTime: l.UnloadTime,
})
}
return legs
}

func nextExpectedActivity(c *cargo.Cargo) string {
a := c.Delivery.NextExpectedActivity
prefix := "Next expected activity is to"
Expand Down