readme updates for go 1

This commit is contained in:
Russ Ross 2012-03-07 22:06:07 -07:00
parent a5441fd99f
commit c317affdbc
1 changed files with 29 additions and 12 deletions

View File

@ -16,12 +16,23 @@ It started as a translation from C of [upskirt][3].
Installation Installation
------------ ------------
Assuming you have recent version of Go installed, along with git: Blackfriday is compatible with Go 1. If you are using an older
release of Go, consider using v1.1 of blackfriday, which was based
on the last stable release of Go prior to Go 1. You can find it as a
tagged commit on github.
goinstall github.com/russross/blackfriday With Go 1 and git installed:
will download, compile, and install the package into go get github.com/russross/blackfriday
`$GOROOT/src/pkg/github.com/russross/blackfriday`.
will download, compile, and install the package into your `$GOROOT`
directory hierarchy. Alternatively, you can import it into a
project:
import "github.com/russross/blackfriday"
and when you build that project with `go build`, blackfriday will be
downloaded and installed automatically.
For basic usage, it is as simple as getting your input into a byte For basic usage, it is as simple as getting your input into a byte
slice and calling: slice and calling:
@ -39,16 +50,22 @@ call the more general `Markdown` function. For examples, see the
implementations of `MarkdownBasic` and `MarkdownCommon` in implementations of `MarkdownBasic` and `MarkdownCommon` in
`markdown.go`. `markdown.go`.
You can also check out `example/main.go` for a more complete example You can also check out `blackfriday-tool` for a more complete example
of how to use it. Run `gomake` in that directory to build a simple of how to use it. Download and install it using:
command-line markdown tool:
cd $GOROOT/src/pkg/github.com/russross/blackfriday/example go get github.com/russross/blackfriday-tool
gomake
will build the binary `markdown` in the `example` directory. This is This is a simple command-line tool that allows you to process a
a statically-linked binary that can be copied to wherever you need markdown file using a standalone program. You can also browse the
it without worrying about dependencies and library versions. source directly on github if you are just looking for some example
code.
Note that if you have not already done so, installing
`blackfriday-tool` will be sufficient to download and install
blackfriday in addition to the tool itself. The tool binary will be
installed in `$GOROOT/bin`. This is a statically-linked binary that
can be copied to wherever you need it without worrying about
dependencies and library versions.
Features Features