job has multiline formatter
This commit is contained in:
@@ -34,3 +34,16 @@ func (j Job) String() string {
|
||||
func (j JobLocation) String() string {
|
||||
return fmt.Sprintf("%s, %s @ %s", j.City, j.State, j.Date.Format("Monday Jan 02"))
|
||||
}
|
||||
|
||||
func (j Job) FormatMultilineText() string {
|
||||
return fmt.Sprintf(
|
||||
"--- %s => %s ---\nPickup: %s\nDropoff: %s\nNotes: %d lbs, %d miles, %s",
|
||||
j.Pickup.State,
|
||||
j.Dropoff.State,
|
||||
j.Pickup.String(),
|
||||
j.Dropoff.String(),
|
||||
j.Weight,
|
||||
j.Miles,
|
||||
j.Meta,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user