on job no longer in results, delete from matrix;; no backwards compatible
This commit is contained in:
@@ -16,7 +16,8 @@ type Job struct {
|
||||
Weight int
|
||||
Miles int
|
||||
Meta string
|
||||
secrets func() interface{} `json:"-"`
|
||||
Pays string
|
||||
secrets func(j *Job) `json:"-"`
|
||||
}
|
||||
|
||||
type JobLocation struct {
|
||||
@@ -29,12 +30,7 @@ func (j *Job) Secrets() {
|
||||
if j.secrets == nil {
|
||||
return
|
||||
}
|
||||
v := j.secrets()
|
||||
j.secrets = nil
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
j.Meta = fmt.Sprintf("%s %+v", j.Meta, v)
|
||||
j.secrets(j)
|
||||
}
|
||||
|
||||
func (j Job) String() string {
|
||||
@@ -53,6 +49,19 @@ func (j JobLocation) String() string {
|
||||
return fmt.Sprintf("%s, %s @ %s", j.City, j.State, j.Date.Format("Monday Jan 02"))
|
||||
}
|
||||
|
||||
func (j Job) FormatMultilineTextDead() string {
|
||||
return fmt.Sprintf(
|
||||
"no longer available: %s,%s => %s,%s for $%v @%s",
|
||||
j.Pickup.City,
|
||||
j.Pickup.State,
|
||||
j.Dropoff.City,
|
||||
j.Dropoff.State,
|
||||
j.Pays,
|
||||
j.URI,
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
func (j Job) FormatMultilineText() string {
|
||||
foo := func(client string) string {
|
||||
return fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user