jobs now include direct link
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
type Job struct {
|
||||
ID string
|
||||
URI string
|
||||
Pickup JobLocation
|
||||
Dropoff JobLocation
|
||||
Weight int
|
||||
@@ -25,12 +26,13 @@ type JobLocation struct {
|
||||
|
||||
func (j Job) String() string {
|
||||
return fmt.Sprintf(
|
||||
`%s => %s (%d miles), Weight:%d, Notes:%s`,
|
||||
`%s => %s (%d miles), Weight:%d, Notes:%s Link:%s`,
|
||||
j.Pickup.String(),
|
||||
j.Dropoff.String(),
|
||||
j.Miles,
|
||||
j.Weight,
|
||||
j.Meta,
|
||||
j.URI,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -41,7 +43,7 @@ func (j JobLocation) String() string {
|
||||
func (j Job) FormatMultilineText() string {
|
||||
foo := func(client string) string {
|
||||
return fmt.Sprintf(
|
||||
"--- %s: %s => %s ---\nPickup: %s\nDropoff: %s\nNotes: %d lbs, %d miles, %s",
|
||||
"--- %s: %s => %s ---\nPickup: %s\nDropoff: %s\nNotes: %d lbs, %d miles, %s\n%s",
|
||||
client,
|
||||
j.Pickup.State,
|
||||
j.Dropoff.State,
|
||||
@@ -50,6 +52,7 @@ func (j Job) FormatMultilineText() string {
|
||||
j.Weight,
|
||||
j.Miles,
|
||||
j.Meta,
|
||||
j.URI,
|
||||
)
|
||||
}
|
||||
out := ""
|
||||
|
||||
Reference in New Issue
Block a user