You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			531 B
		
	
	
	
		
			Plaintext
		
	
			
		
		
	
	
			35 lines
		
	
	
		
			531 B
		
	
	
	
		
			Plaintext
		
	
env GOPRIVATE=test/main
 | 
						|
 | 
						|
garble build
 | 
						|
exec ./main
 | 
						|
cmp stderr main.stderr
 | 
						|
! binsubstr main$exe '(devel)'
 | 
						|
 | 
						|
[short] stop # no need to verify this with -short
 | 
						|
 | 
						|
go build
 | 
						|
exec ./main
 | 
						|
cmp stderr main.stderr-orig
 | 
						|
binsubstr main$exe '(devel)'
 | 
						|
 | 
						|
-- go.mod --
 | 
						|
module test/main
 | 
						|
 | 
						|
go 1.16
 | 
						|
-- main.go --
 | 
						|
package main
 | 
						|
 | 
						|
import "runtime/debug"
 | 
						|
 | 
						|
func main() {
 | 
						|
	if info, ok := debug.ReadBuildInfo(); ok {
 | 
						|
		println("version", info.Main.Version)
 | 
						|
	} else {
 | 
						|
		println("no version")
 | 
						|
	}
 | 
						|
}
 | 
						|
-- main.stderr-orig --
 | 
						|
version (devel)
 | 
						|
-- main.stderr --
 | 
						|
no version
 |