Skip to content

Instantly share code, notes, and snippets.

@mschoch
Created October 3, 2014 16:50
Show Gist options
  • Save mschoch/6d974ef1cb0e0874164a to your computer and use it in GitHub Desktop.
Save mschoch/6d974ef1cb0e0874164a to your computer and use it in GitHub Desktop.
golang present tool show line numbers?
$ go get -u code.google.com/p/go.tools/cmd/present
$ present -orighost=localhost
2014/10/03 09:49:52 Open your web browser and visit http://localhost:3999
2014/10/03 09:49:57 accepting connection from: 127.0.0.1:50701
package main
import (
"fmt"
)
func main() {
fmt.Println("hello")
}
Title
Sub-title
7 Oct 2014
Marty Schoch
[email protected]
* Show code with line numbers
.code -numbers x.go
@mschoch
Copy link
Author

mschoch commented Oct 3, 2014

I worked around this by modifying styles.css to include:

.numbers span:before {
  content: attr(num);
  color: gray;
  display: block;
  float: left;
  width: 2em;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment