Skip to content
This repository was archived by the owner on Jul 29, 2021. It is now read-only.

Commit 6771258

Browse files
committed
wip
1 parent fb3b0cc commit 6771258

File tree

5 files changed

+96
-130
lines changed

5 files changed

+96
-130
lines changed

examples/build/README.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ if set, or else the compiled code's GOARCH, GOOS, and GOROOT.
258258

259259

260260
### func (\*Context) Import
261-
262-
func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Package, error)
263-
261+
``` go
262+
func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Package, error)
263+
```
264264
Import returns details about the Go package named by the import path,
265265
interpreting local import paths relative to the srcDir directory.
266266
If the path is a local import path naming a package that can be imported
@@ -281,18 +281,18 @@ If an error occurs, Import returns a non-nil error and a non-nil
281281

282282

283283
### func (\*Context) ImportDir
284-
285-
func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error)
286-
284+
``` go
285+
func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error)
286+
```
287287
ImportDir is like Import but processes the Go package found in
288288
the named directory.
289289

290290

291291

292292
### func (\*Context) MatchFile
293-
294-
func (ctxt *Context) MatchFile(dir, name string) (match bool, err error)
295-
293+
``` go
294+
func (ctxt *Context) MatchFile(dir, name string) (match bool, err error)
295+
```
296296
MatchFile reports whether the file with the given name in the given directory
297297
matches the context and would be included in a Package created by ImportDir
298298
of that directory.
@@ -303,16 +303,15 @@ read some or all of the file's content.
303303

304304

305305
### func (\*Context) SrcDirs
306-
307-
func (ctxt *Context) SrcDirs() []string
308-
306+
``` go
307+
func (ctxt *Context) SrcDirs() []string
308+
```
309309
SrcDirs returns a list of package source root directories.
310310
It draws from the current Go root and Go path but omits directories
311311
that do not exist.
312312

313313

314314

315-
316315
## type ImportMode
317316
``` go
318317
type ImportMode uint
@@ -341,7 +340,6 @@ const (
341340

342341

343342

344-
345343
## type NoGoError
346344
``` go
347345
type NoGoError struct {
@@ -363,10 +361,9 @@ test files, files hidden by build tags, and so on.)
363361

364362

365363
### func (\*NoGoError) Error
366-
367-
func (e *NoGoError) Error() string
368-
369-
364+
``` go
365+
func (e *NoGoError) Error() string
366+
```
370367

371368

372369
## type Package
@@ -444,9 +441,9 @@ ImportDir is shorthand for Default.ImportDir.
444441

445442

446443
### func (\*Package) IsCommand
447-
448-
func (p *Package) IsCommand() bool
449-
444+
``` go
445+
func (p *Package) IsCommand() bool
446+
```
450447
IsCommand reports whether the package is considered a
451448
command to be installed (not just a library).
452449
Packages named "main" are treated as commands.
@@ -459,7 +456,5 @@ Packages named "main" are treated as commands.
459456

460457

461458

462-
463-
464459
- - -
465460
Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)

examples/fs/README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ FileSystem defines the methods of an abstract filesystem.
4343

4444

4545

46-
4746
## type Walker
4847
``` go
4948
type Walker struct {
@@ -83,19 +82,19 @@ WalkFS returns a new Walker rooted at root on the FileSystem fs.
8382

8483

8584
### func (\*Walker) Err
86-
87-
func (w *Walker) Err() error
88-
85+
``` go
86+
func (w *Walker) Err() error
87+
```
8988
Err returns the error, if any, for the most recent attempt
9089
by Step to visit a file or directory. If a directory has
9190
an error, w will not descend into that directory.
9291

9392

9493

9594
### func (\*Walker) Path
96-
97-
func (w *Walker) Path() string
98-
95+
``` go
96+
func (w *Walker) Path() string
97+
```
9998
Path returns the path to the most recent file or directory
10099
visited by a call to Step. It contains the argument to Walk
101100
as a prefix; that is, if Walk is called with "dir", which is
@@ -104,27 +103,27 @@ a directory containing the file "a", Path will return "dir/a".
104103

105104

106105
### func (\*Walker) SkipDir
107-
108-
func (w *Walker) SkipDir()
109-
106+
``` go
107+
func (w *Walker) SkipDir()
108+
```
110109
SkipDir causes the currently visited directory to be skipped.
111110
If w is not on a directory, SkipDir has no effect.
112111

113112

114113

115114
### func (\*Walker) Stat
116-
117-
func (w *Walker) Stat() os.FileInfo
118-
115+
``` go
116+
func (w *Walker) Stat() os.FileInfo
117+
```
119118
Stat returns info for the most recent file or directory
120119
visited by a call to Step.
121120

122121

123122

124123
### func (\*Walker) Step
125-
126-
func (w *Walker) Step() bool
127-
124+
``` go
125+
func (w *Walker) Step() bool
126+
```
128127
Step advances the Walker to the next file or directory,
129128
which will then be available through the Path, Stat,
130129
and Err methods.
@@ -138,7 +137,5 @@ It returns false when the walk stops at the end of the tree.
138137

139138

140139

141-
142-
143140
- - -
144141
Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)

examples/martini/README.md

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ BeforeFunc is a function that is called before the ResponseWriter has been writt
5959

6060

6161

62-
6362
## type ClassicMartini
6463
``` go
6564
type ClassicMartini struct {
@@ -86,7 +85,6 @@ Classic creates a classic Martini with some basic default middleware - martini.L
8685

8786

8887

89-
9088
## type Context
9189
``` go
9290
type Context interface {
@@ -110,7 +108,6 @@ Context represents a request context. Services can be mapped on the request leve
110108

111109

112110

113-
114111
## type Handler
115112
``` go
116113
type Handler interface{}
@@ -149,7 +146,6 @@ Static returns a middleware handler that serves static files in the given direct
149146

150147

151148

152-
153149
## type Martini
154150
``` go
155151
type Martini struct {
@@ -177,47 +173,46 @@ New creates a bare bones Martini instance. Use this method if you want to have f
177173

178174

179175
### func (\*Martini) Action
180-
181-
func (m *Martini) Action(handler Handler)
182-
176+
``` go
177+
func (m *Martini) Action(handler Handler)
178+
```
183179
Action sets the handler that will be called after all the middleware has been invoked. This is set to martini.Router in a martini.Classic().
184180

185181

186182

187183
### func (\*Martini) Handlers
188-
189-
func (m *Martini) Handlers(handlers ...Handler)
190-
184+
``` go
185+
func (m *Martini) Handlers(handlers ...Handler)
186+
```
191187
Handlers sets the entire middleware stack with the given Handlers. This will clear any current middleware handlers.
192188
Will panic if any of the handlers is not a callable function
193189

194190

195191

196192
### func (\*Martini) Run
197-
198-
func (m *Martini) Run()
199-
193+
``` go
194+
func (m *Martini) Run()
195+
```
200196
Run the http server. Listening on os.GetEnv("PORT") or 3000 by default.
201197

202198

203199

204200
### func (\*Martini) ServeHTTP
205-
206-
func (m *Martini) ServeHTTP(res http.ResponseWriter, req *http.Request)
207-
201+
``` go
202+
func (m *Martini) ServeHTTP(res http.ResponseWriter, req *http.Request)
203+
```
208204
ServeHTTP is the HTTP Entry point for a Martini instance. Useful if you want to control your own HTTP server.
209205

210206

211207

212208
### func (\*Martini) Use
213-
214-
func (m *Martini) Use(handler Handler)
215-
209+
``` go
210+
func (m *Martini) Use(handler Handler)
211+
```
216212
Use adds a middleware Handler to the stack. Will panic if the handler is not a callable func. Middleware Handlers are invoked in the order that they are added.
217213

218214

219215

220-
221216
## type Params
222217
``` go
223218
type Params map[string]string
@@ -234,7 +229,6 @@ Params is a map of name/value pairs for named routes. An instance of martini.Par
234229

235230

236231

237-
238232
## type ResponseWriter
239233
``` go
240234
type ResponseWriter interface {
@@ -271,7 +265,6 @@ NewResponseWriter creates a ResponseWriter that wraps an http.ResponseWriter
271265

272266

273267

274-
275268
## type ReturnHandler
276269
``` go
277270
type ReturnHandler func(http.ResponseWriter, []reflect.Value)
@@ -291,7 +284,6 @@ that are passed into this function.
291284

292285

293286

294-
295287
## type Route
296288
``` go
297289
type Route interface {
@@ -311,7 +303,6 @@ Route is an interface representing a Route in Martini's routing layer.
311303

312304

313305

314-
315306
## type Router
316307
``` go
317308
type Router interface {
@@ -358,7 +349,6 @@ NewRouter creates a new Router instance.
358349

359350

360351

361-
362352
## type Routes
363353
``` go
364354
type Routes interface {
@@ -384,7 +374,5 @@ Routes is a helper service for Martini's routing layer.
384374

385375

386376

387-
388-
389377
- - -
390378
Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)

0 commit comments

Comments
 (0)