Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

readme, license, tweaks

  • Loading branch information...
commit 94432133402e46f6b86f158d9c53cfd07e394815 1 parent 8d6e33f
Mark McGranaghan authored September 30, 2012
18  LICENSE
... ...
@@ -0,0 +1,18 @@
  1
+Copyright (c) 2012 Mark McGranaghan
  2
+
  3
+Permission is hereby granted, free of charge, to any person obtaining a copy
  4
+of this software and associated documentation files (the "Software"), to
  5
+deal in the Software without restriction, including without limitation the
  6
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  7
+sell copies of the Software, and to permit persons to whom the Software is
  8
+furnished to do so, subject to the following conditions:
  9
+
  10
+The above copyright notice and this permission notice shall be included in
  11
+all copies or substantial portions of the Software.
  12
+
  13
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  16
+THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
  17
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  18
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29  README.md
Source Rendered
... ...
@@ -1,2 +1,31 @@
1 1
 ## golit
2 2
 
  3
+**golit** generates literate-programming-style HTML documentation
  4
+from a Go source file. It produces HTML with comments alongside your
  5
+code.
  6
+
  7
+See the [golit-generated docs](http://mmcgrana.github.com/golit/) for
  8
+more information.
  9
+
  10
+
  11
+### Installation
  12
+
  13
+```console
  14
+$ go get github.com/mmcgrana/golit
  15
+```
  16
+
  17
+### Usage
  18
+
  19
+```console
  20
+$ golit input.go > output.html
  21
+```
  22
+
  23
+
  24
+### Hacking
  25
+
  26
+```console
  27
+$ cd golit
  28
+$ vi ...
  29
+$ go get
  30
+$ golit ...
  31
+```
8  main.go
@@ -23,10 +23,14 @@ import (
23 23
     "strings"
24 24
 )
25 25
 
26  
-// `golit` takes exactly one argument: the path to a Go source file.
  26
+// ### Usage
  27
+
  28
+// golit takes exactly one argument: the path to a Go source file.
27 29
 // It writes the compiled HTML on stdout.
28 30
 var usage = "usage: golit input.go > output.html"
29 31
 
  32
+// ### Helpers
  33
+
30 34
 // Panic on non-nil errors. We'll call this after error-returning
31 35
 // functions.
32 36
 func check(err error) {
@@ -51,6 +55,8 @@ func pipe(bin string, arg []string, src string) string {
51 55
     return string(bytes)
52 56
 }
53 57
 
  58
+// ### Rendering
  59
+
54 60
 // Recognize doc lines, extract their comment prefixes.
55 61
 var docsPat = regexp.MustCompile("^\\s*\\/\\/\\s")
56 62
 

0 notes on commit 9443213

Please sign in to comment.
Something went wrong with that request. Please try again.