Adding Go-specific vendor paths

This commit is contained in:
Arfon Smith
2016-10-27 13:59:09 -04:00
parent 4efc6f8c95
commit a29f5b2d46
2 changed files with 6 additions and 3 deletions

View File

@@ -310,9 +310,7 @@ module Linguist
#
# Returns true or false.
def go_vendor?
return false unless extname == '.go'
!!name.match(/\Avendor\//)
!!name.match(/vendor\/((?!-)[-0-9A-Za-z]+(?<!-)\.)+(com|edu|gov|in|me|net|org|fm|io)/)
end
# Internal: Is the blob a generated npm shrinkwrap file.