mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-13 13:28:27 +02:00
parent
972d70075c
commit
8533b6348b
19
quick/example_test.go
Normal file
19
quick/example_test.go
Normal 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)
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
// Package quick provides simple, no-configuration source code highlighting.
|
||||
package quick
|
||||
|
||||
import (
|
||||
|
Loading…
x
Reference in New Issue
Block a user