Run all linters per package. It allows unloading package data when it's processed. It dramatically reduces memory (and CPU because of GC) usage. Relates: #337
		
			
				
	
	
		
			20 lines
		
	
	
		
			309 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			309 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// +build go1.12
 | 
						|
 | 
						|
package main
 | 
						|
 | 
						|
import (
 | 
						|
	"fmt"
 | 
						|
	"runtime/debug"
 | 
						|
)
 | 
						|
 | 
						|
//nolint:gochecknoinits
 | 
						|
func init() {
 | 
						|
	if info, available := debug.ReadBuildInfo(); available {
 | 
						|
		if date == "" {
 | 
						|
			version = info.Main.Version
 | 
						|
			commit = fmt.Sprintf("(unknown, mod sum: %q)", info.Main.Sum)
 | 
						|
			date = "(unknown)"
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 |