Skip to content

Commit

Permalink
fix client templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dropwhile committed Dec 22, 2024
1 parent c481e94 commit ad8b605
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
22 changes: 11 additions & 11 deletions cmd/client/earmarks.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ import (

const earmarkTpl = `
{{- /* whitespace fix */ -}}
- ref_id: {{.RefId}}
event_item_ref_id: {{.EventItemRefId}}
note: {{.Note}}
owner: {{.Owner}}
created: {{.Created.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
- ref_id: {{.GetRefId}}
event_item_ref_id: {{.GetEventItemRefId}}
note: {{.GetNote}}
owner: {{.GetOwner}}
created: {{.GetCreated.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
`

const earmarkDetailTpl = `
{{- /* whitespace fix */ -}}
- ref_id: {{.Earmark.RefId}}
event_item_ref_id: {{.Earmark.EventItemRefId}}
event_ref_id: {{.EventRefId}}
note: {{.Earmark.Note}}
owner: {{.Earmark.Owner}}
created: {{.Earmark.Created.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
- ref_id: {{.GetEarmark.GetRefId}}
event_item_ref_id: {{.GetEarmark.GetEventItemRefId}}
event_ref_id: {{.GetEventRefId}}
note: {{.GetEarmark.GetNote}}
owner: {{.GetEarmark.GetOwner}}
created: {{.GetEarmark.GetCreated.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
`

type EarmarksCreateCmd struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/client/event_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (

const eventItemTpl = `
{{- /* whitespace fix */ -}}
- event_item_ref_id: {{.RefId}}
description: {{.Description}}
created: {{.Created.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
- event_item_ref_id: {{.GetRefId}}
description: {{.GetDescription}}
created: {{.GetCreated.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
`

type EventItemsAddCmd struct {
Expand Down
14 changes: 7 additions & 7 deletions cmd/client/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (

const eventTpl = `
{{- /* whitespace fix */ -}}
- ref_id: {{.RefId}}
name: {{.Name}}
description: {{.Description}}
archived: {{.Archived}}
when: {{.When.Ts.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
tz: {{.When.Tz}}
created: {{.Created.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
- ref_id: {{.GetRefId}}
name: {{.GetName}}
description: {{.GetDescription}}
archived: {{.GetArchived}}
when: {{.GetWhen.GetTs.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
tz: {{.GetWhen.GetTz}}
created: {{.GetCreated.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
`

type EventsListCmd struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/favorites.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

const favoriteTpl = `
{{- /* whitespace fix */ -}}
- event_ref_id: {{.EventRefId}}
created: {{.Created.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
- event_ref_id: {{.GetEventRefId}}
created: {{.GetCreated.AsTime.Format "2006-01-02T15:04:05Z07:00"}}
`

type FavoritesListCmd struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/client/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (

const notifTpl = `
{{- /* whitespace fix */ -}}
- ref_id: {{.RefId}}
message: {{.Message}}
created: {{.Created.AsTime.Format "2006-01-02T15:04:05Z07:00" }}
- ref_id: {{.GetRefId}}
message: {{.GetMessage}}
created: {{.GetCreated.AsTime.Format "2006-01-02T15:04:05Z07:00" }}
`

type NotificationsListCmd struct{}
Expand Down

0 comments on commit ad8b605

Please sign in to comment.