Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(504)

Side by Side Diff: 2014/readability/if-switch-bad.go

Issue 176660043: code review 176660043: x/talks/2014/readability: talk for GoCon 2014 autumn in...
Patch Set: diff -r 05bdda42259e https://code.google.com/p/go.talks/ Created 9 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « 2014/readability/if-else-good.go ('k') | 2014/readability/if-switch-good.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 package sample // OMIT
2
3 func BrowserHeightBucket(s *session.Event) string {
4 browserSize := sizeFromSession(s)
5 if h := browserSize.GetHeight(); h > 0 { // HL
6 browserHeight := int(h)
7 if browserHeight <= 480 { // HL
8 return "small"
9 } else if browserHeight <= 640 { // HL
10 return "medium"
11 } else {
12 return "large"
13 }
14 } else {
15 return "null"
16 }
17 }
OLDNEW
« no previous file with comments | « 2014/readability/if-else-good.go ('k') | 2014/readability/if-switch-good.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b