Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(49)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 7312072: code review 7312072: go.talks/pkg/present: replace direct file system access...

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by gburd
Modified:
12 years, 5 months ago
Reviewers:
adg
CC:
adg, golang-dev
Visibility:
Public.
go.talks/pkg/present: replace direct file system access with access through a ParserContext.

Patch Set 1 #

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

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

Total comments: 4

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

Total comments: 3

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

Total comments: 2

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

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

Created: 12 years, 11 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -21 lines) Patch
M pkg/present/code.go View 1 2 3 5 chunks +6 lines, -7 lines 0 comments Download
M pkg/present/html.go View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M pkg/present/iframe.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M pkg/present/image.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M pkg/present/link.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M pkg/present/parse.go View 1 2 3 4 5 8 chunks +21 lines, -8 lines 0 comments Download
Total messages: 14
|
gburd
Hello adg@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.talks
12 years, 11 months ago (2013年02月10日 22:45:30 UTC) #1
Hello adg@golang.org (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go.talks 
Sign in to reply to this message.
adg
https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go File pkg/present/parse.go (right): https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go#newcode216 pkg/present/parse.go:216: type ParseContext struct { I would prefer the name ...
12 years, 11 months ago (2013年02月11日 00:51:41 UTC) #2
https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go
File pkg/present/parse.go (right):
https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go#newcode216
pkg/present/parse.go:216: type ParseContext struct {
I would prefer the name Context.
https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go#newcode221
pkg/present/parse.go:221: var DefaultParseContext = &ParseContext{
DefaultContext
https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go#newcode233
pkg/present/parse.go:233: // Parse parses the document in the file specified by
name.
using DefaultContext
https://codereview.appspot.com/7312072/diff/5001/pkg/present/parse.go#newcode234
pkg/present/parse.go:234: func Parse(pc *ParseContext, r io.Reader, name string,
mode ParseMode) (*Doc, error) {
Let's keep this function signature as-is, add a method
func (*Context) Parse(r io.Reader, name string, mode ParseMode) (*Doc, error)
and then make this function defer directly to
DefaultContext.Parse(r, name, mode)
Sign in to reply to this message.
gburd
I chose the name ParseContext because I think a rendering context is also needed. I ...
12 years, 11 months ago (2013年02月11日 01:59:20 UTC) #3
I chose the name ParseContext because I think a rendering context is also
needed. I will start a new thread to discuss rendering and come back to this
after rendering is sorted out.
Sign in to reply to this message.
adg
On 11 February 2013 12:59, <gary.burd@gmail.com> wrote: > I chose the name ParseContext because I ...
12 years, 11 months ago (2013年02月11日 02:00:48 UTC) #4
On 11 February 2013 12:59, <gary.burd@gmail.com> wrote:
> I chose the name ParseContext because I think a rendering context is
> also needed. I will start a new thread to discuss rendering and come
> back to this after rendering is sorted out.
>
Sounds good.
Sign in to reply to this message.
gburd
Hello adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 11 months ago (2013年02月11日 20:28:42 UTC) #5
Hello adg@golang.org (cc: golang-dev@googlegroups.com),
Please take another look.
Sign in to reply to this message.
adg
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go File pkg/present/parse.go (right): https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode254 pkg/present/parse.go:254: func Parse(r io.Reader, name string, mode ParseMode) (*Doc, error) ...
12 years, 11 months ago (2013年02月12日 04:01:22 UTC) #6
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go
File pkg/present/parse.go (right):
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode254
pkg/present/parse.go:254: func Parse(r io.Reader, name string, mode ParseMode)
(*Doc, error) {
doc comment
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode255
pkg/present/parse.go:255: ctx := Context{ReadFile: ioutil.ReadFile}
no more DefaultContext? I kinda liked that. It has precedence in go/build
Sign in to reply to this message.
gburd
Hello adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 11 months ago (2013年02月12日 16:34:36 UTC) #7
Hello adg@golang.org (cc: golang-dev@googlegroups.com),
Please take another look.
Sign in to reply to this message.
adg
https://codereview.appspot.com/7312072/diff/7008/pkg/present/parse.go File pkg/present/parse.go (right): https://codereview.appspot.com/7312072/diff/7008/pkg/present/parse.go#newcode254 pkg/present/parse.go:254: // DefaultContext is the Context used by Parse. These ...
12 years, 11 months ago (2013年02月12日 21:32:48 UTC) #8
https://codereview.appspot.com/7312072/diff/7008/pkg/present/parse.go
File pkg/present/parse.go (right):
https://codereview.appspot.com/7312072/diff/7008/pkg/present/parse.go#newcode254
pkg/present/parse.go:254: // DefaultContext is the Context used by Parse.
These two comments are circular.
DefaultContext is a Context that uses the local file system.
https://codereview.appspot.com/7312072/diff/7008/pkg/present/parse.go#newcode255
pkg/present/parse.go:255: var DefaultContext = Context{ReadFile:
ioutil.ReadFile}
&Context
Sign in to reply to this message.
gburd
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go File pkg/present/parse.go (right): https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode255 pkg/present/parse.go:255: ctx := Context{ReadFile: ioutil.ReadFile} On 2013年02月12日 04:01:22, adg wrote: ...
12 years, 11 months ago (2013年02月12日 22:59:03 UTC) #9
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go
File pkg/present/parse.go (right):
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode255
pkg/present/parse.go:255: ctx := Context{ReadFile: ioutil.ReadFile}
On 2013年02月12日 04:01:22, adg wrote:
> no more DefaultContext? I kinda liked that. It has precedence in go/build
Does a DefaultContext make sense when rendering options are added? Different
contexts are needed for slides and articles.
Sign in to reply to this message.
adg
On 2013年02月12日 22:59:03, gburd wrote: > https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go > File pkg/present/parse.go (right): > > https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode255 > ...
12 years, 11 months ago (2013年02月12日 23:46:03 UTC) #10
On 2013年02月12日 22:59:03, gburd wrote:
> https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go
> File pkg/present/parse.go (right):
> 
>
https://codereview.appspot.com/7312072/diff/5009/pkg/present/parse.go#newcode255
> pkg/present/parse.go:255: ctx := Context{ReadFile: ioutil.ReadFile}
> On 2013年02月12日 04:01:22, adg wrote:
> > no more DefaultContext? I kinda liked that. It has precedence in go/build
> 
> Does a DefaultContext make sense when rendering options are added? Different
> contexts are needed for slides and articles.
Good point. Let's leave the DefaultContext out, for now.
Sign in to reply to this message.
gburd
Hello adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 11 months ago (2013年02月13日 02:53:31 UTC) #11
Hello adg@golang.org (cc: golang-dev@googlegroups.com),
Please take another look.
Sign in to reply to this message.
adg
LGTM
12 years, 11 months ago (2013年02月13日 03:44:24 UTC) #12
LGTM
Sign in to reply to this message.
adg
*** Submitted as https://code.google.com/p/go/source/detail?r=2202e5a97fc5&repo=talks *** go.talks/pkg/present: access files through new Context type R=adg CC=golang-dev https://codereview.appspot.com/7312072 ...
12 years, 11 months ago (2013年02月13日 03:45:48 UTC) #13
*** Submitted as
https://code.google.com/p/go/source/detail?r=2202e5a97fc5&repo=talks ***
go.talks/pkg/present: access files through new Context type
R=adg
CC=golang-dev
https://codereview.appspot.com/7312072
Committer: Andrew Gerrand <adg@golang.org>
Sign in to reply to this message.
remyoudompheng
R=close
12 years, 5 months ago (2013年07月20日 20:02:00 UTC) #14
R=close
Sign in to reply to this message.
|
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /