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

Issue 6863058: code review 6863058: go.talks/present: remove presentation logic from data s... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by adg
Modified:
11 years, 4 months ago
Reviewers:
CC:
campoy, dsymonds, golang-dev
Visibility:
Public.

Description

go.talks/present: remove presentation logic from data structures Remove the Template field from Doc, and the Doc field from Section. The new Render method on Doc wraps the Doc in an anonymous struct that also contains the template, before passing it to the template iteslf. The renderElem function wraps Section elements in a similar way.

Patch Set 1 #

Patch Set 2 : diff -r 97a6c23bcdbf https://code.google.com/p/go.talks #

Patch Set 3 : diff -r 4de2599667fd https://code.google.com/p/go.talks #

Patch Set 4 : diff -r 0a84b93f5645 https://code.google.com/p/go.talks #

Total comments: 2

Patch Set 5 : diff -r 0a84b93f5645 https://code.google.com/p/go.talks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -11 lines) Patch
M pkg/present/parse.go View 1 2 3 4 5 chunks +18 lines, -6 lines 0 comments Download
M present/dir.go View 1 2 chunks +2 lines, -4 lines 0 comments Download
M present/templates/action.tmpl View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
adg
Hello campoy@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.talks
11 years, 4 months ago (2012-12-05 03:51:58 UTC) #1
dsymonds
LGTM https://codereview.appspot.com/6863058/diff/6001/pkg/present/parse.go File pkg/present/parse.go (right): https://codereview.appspot.com/6863058/diff/6001/pkg/present/parse.go#newcode34 pkg/present/parse.go:34: var data = struct { could inline this
11 years, 4 months ago (2012-12-05 04:05:29 UTC) #2
adg
11 years, 4 months ago (2012-12-05 04:09:15 UTC) #3
*** Submitted as
https://code.google.com/p/go/source/detail?r=e4ca635112a9&repo=talks ***

go.talks/present: remove presentation logic from data structures

Remove the Template field from Doc, and the Doc field from Section.
The new Render method on Doc wraps the Doc in an anonymous struct that
also contains the template, before passing it to the template iteslf.
The renderElem function wraps Section elements in a similar way.

R=campoy, dsymonds
CC=golang-dev
https://codereview.appspot.com/6863058

https://codereview.appspot.com/6863058/diff/6001/pkg/present/parse.go
File pkg/present/parse.go (right):

https://codereview.appspot.com/6863058/diff/6001/pkg/present/parse.go#newcode34
pkg/present/parse.go:34: var data = struct {
On 2012/12/05 04:05:29, dsymonds wrote:
> could inline this

Done.
Sign in to reply to this message.

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