From 963e46ca63afa6292066984df3acaea4e7072ab9 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Tue, 27 Dec 2016 17:03:02 -0700 Subject: [PATCH] locking: add `json:""` tags to Lock fields for `--json` support --- locking/locks.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/locking/locks.go b/locking/locks.go index e1dd8ac2..a8fb30bb 100644 --- a/locking/locks.go +++ b/locking/locks.go @@ -126,16 +126,16 @@ func (c *Client) UnlockFileById(id string, force bool) error { type Lock struct { // Id is the unique identifier corresponding to this particular Lock. It // must be consistent with the local copy, and the server's copy. - Id string + Id string `json:"id"` // Path is an absolute path to the file that is locked as a part of this // lock. - Path string + Path string `json:"path"` // Name is the name of the person holding this lock - Name string + Name string `json:"name"` // Email address of the person holding this lock - Email string + Email string `json:"email"` // LockedAt is the time at which this lock was acquired. - LockedAt time.Time + LockedAt time.Time `json:"locked_at"` } func (c *Client) newLockFromApi(a api.Lock) Lock {