git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Added syntax highlight support for golang

From
Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Date
Feb 7, 2014, 21:10 UTC
Message-ID
<1391807441-23049-1-git-send-email-pavan.sss1991@gmail.com>
Golang is quickly becoming one of the major programming languages.

This change switches on golang syntax highlight support by default in gitweb rather than asking the users to do it using config files.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
---
 gitweb/gitweb.perl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index bf7fd67..aa6fcfd 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -273,7 +273,7 @@ our %highlight_basename = (
 our %highlight_ext = (
 	# main extensions, defining name of syntax;
 	# see files in /usr/share/highlight/langDefs/ directory
-	(map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql)),
+	(map { $_ => $_ } qw(py rb java go css js tex bib xml awk bat ini spec tcl sql)),
 	# alternate extensions, see /etc/highlight/filetypes.conf
 	(map { $_ => 'c'   } qw(c h)),
 	(map { $_ => 'sh'  } qw(sh bash zsh ksh)),
-- 
1.7.10.4
Next: Junio C Hamano
Message 1 of 6 in “gitweb: Added syntax highlight support for golang”
  1. gitweb: Added syntax highlight support for golangPavan Kumar Sunkara, Feb 7, 2014
  2. Junio C HamanoFeb 7, 2014
  3. Pavan Kumar SunkaraFeb 7, 2014
  4. Pavan Kumar SunkaraFeb 7, 2014
  5. Junio C HamanoFeb 7, 2014
  6. Pavan Kumar SunkaraFeb 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.