Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
snap: show last refresh time #2394
Conversation
zyga
approved these changes
Dec 1, 2016
Looks good to me, a few minor questions. Feel free to merge if irrelevant or fixed.
| @@ -54,7 +54,7 @@ type Snap struct { | ||
| Prices map[string]float64 `json:"prices"` | ||
| Screenshots []Screenshot `json:"screenshots"` | ||
| - Channels map[string]*snap.Ref `json:"channels"` | ||
| + Channels map[string]*snap.ChannelSnapInfo `json:"channels"` |
| + for i, a := range both.Apps { | ||
| + apps[i] = a.Name | ||
| + } | ||
| + fmt.Fprintf(w, "apps:\t[%s]\n", strutil.Quoted(apps)) |
zyga
Dec 1, 2016
Contributor
Since apps cannot have any nasty characters I was wondering why would we be quoting that. I don't mind them quoted, just curious.
| @@ -47,6 +48,18 @@ func MakeRandomString(length int) string { | ||
| return out | ||
| } | ||
| +// Convert the given size in btes to a readable string | ||
| +func SizeToStr(size int64) string { | ||
| + suffixes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} |
zyga
Dec 1, 2016
Contributor
Why kB but MB? 2**10 vs 10 ** 3 aside, shouldn't those be uniformly capitalised?
niemeyer
approved these changes
Dec 1, 2016
LGTM, we should probably just respect the "refresh" terminology here.
|
@mvo5 conflict here. |
mvo5
changed the title from
snap: show last update time
to
snap: show last refresh time
Dec 5, 2016
mvo5
added some commits
Dec 5, 2016
mvo5
merged commit b4456d8
into
snapcore:master
Dec 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mvo5 commentedDec 1, 2016
Build on top of #2384