summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/file_txt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file_txt.c b/src/file_txt.c
index 371041e..4b69a41 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -135,6 +135,8 @@ static const txt_header_t fasttxt_headers[] = {
"emka"
#endif
},
+ /* Source code in go language */
+ { "package main", 12, "go"},
/* ENVI */
{ "ENVI\r\ndescription", 17, "hdr"},
/* Java Application Descriptor
@@ -1258,6 +1260,10 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
ext="java";
#endif
}
+ else if((str=strstr(buffer_lower, "\nimport ("))!=NULL)
+ {
+ ext="go";
+ }
else if((str=strstr(buffer_lower, "\nimport "))!=NULL)
{
str+=8;