diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb
index <HASH>..<HASH> 100644
--- a/lib/linguist/generated.rb
+++ b/lib/linguist/generated.rb
@@ -302,7 +302,7 @@ module Linguist
       return false unless extname == '.go'
       return false unless lines.count > 1
 
-      return lines.first(10).any? { |l| l.include? "Code generated by" }
+      return lines.first(40).any? { |l| l.include? "Code generated by" }
     end
 
     PROTOBUF_EXTENSIONS = ['.py', '.java', '.h', '.cc', '.cpp', '.m', '.rb', '.php']
Bump line limit for generated_go (#<I>)

In some cases (e.g. the Cilium project) the `Code generated by` comment

appears after a license header. This header might be longer than <I>

lines which generated_go currently searches for this comment.



Bump the limit to <I> lines (roughly corresponding to the length of the

BSD 4-clause header + some slack) to detect these cases.



Suggested by Paul Chaignon in

<URL>