mirror of
				https://github.com/alecthomas/chroma.git
				synced 2025-10-30 23:57:49 +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) | ||||
| 	} | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| // Package quick provides simple, no-configuration source code highlighting. | ||||
| package quick | ||||
|  | ||||
| import ( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user