1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-13 13:28:27 +02:00

quick: add an example (#70)

Fixes #69.
This commit is contained in:
Kevin Burke 2017-10-22 16:45:44 -07:00 committed by Alec Thomas
parent 972d70075c
commit 8533b6348b
2 changed files with 20 additions and 0 deletions

19
quick/example_test.go Normal file
View File

@ -0,0 +1,19 @@
package quick_test
import (
"log"
"os"
"github.com/alecthomas/chroma/quick"
)
func Example() {
code := `package main
func main() { }
`
err := quick.Highlight(os.Stdout, code, "go", "html", "monokai")
if err != nil {
log.Fatal(err)
}
}

View File

@ -1,3 +1,4 @@
// Package quick provides simple, no-configuration source code highlighting.
package quick
import (