mirror of
				https://github.com/KevinMidboe/motdGOi.git
				synced 2025-10-29 17:50:24 +00:00 
			
		
		
		
	add parsers
This commit is contained in:
		
							
								
								
									
										22
									
								
								parser.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								parser.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| package figlet4go | ||||
|  | ||||
| // Parser stores some output specific stuff | ||||
| type Parser struct { | ||||
| 	// Name used for switching in colors.go | ||||
| 	Name     string | ||||
| 	// Parser prefix | ||||
| 	Prefix   string | ||||
| 	// Parser suffix | ||||
| 	Suffix   string | ||||
| 	// Newline representation | ||||
| 	NewLine  string | ||||
| 	// Things to be replaced (f.e. \n to <br>) | ||||
| 	Replaces map[string]string | ||||
| } | ||||
|  | ||||
| var ( | ||||
| 	// Default terminal parser | ||||
| 	ParserTerminal Parser = Parser{"terminal", "", "", "\n", nil} | ||||
| 	// Parser for HTML code | ||||
| 	ParserHTML Parser = Parser{"html", "<code>", "</code>", "<br>", map[string]string{" ": " "}} | ||||
| ) | ||||
		Reference in New Issue
	
	Block a user