mirror of
https://github.com/alecthomas/chroma.git
synced 2025-11-25 22:32:32 +02:00
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user