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.
		
		
		
		
		
			
		
			
				
	
	
		
			36 lines
		
	
	
		
			499 B
		
	
	
	
		
			Plaintext
		
	
			
		
		
	
	
			36 lines
		
	
	
		
			499 B
		
	
	
	
		
			Plaintext
		
	
env GOPRIVATE=test/main
 | 
						|
 | 
						|
garble build
 | 
						|
exec ./main
 | 
						|
cmp stderr main.stderr
 | 
						|
binsubstr main$exe 'privateAdd'
 | 
						|
 | 
						|
[short] stop # no need to verify this with -short
 | 
						|
 | 
						|
garble -tiny build
 | 
						|
exec ./main
 | 
						|
cmp stderr main.stderr
 | 
						|
binsubstr main$exe 'privateAdd'
 | 
						|
 | 
						|
go build
 | 
						|
exec ./main
 | 
						|
cmp stderr main.stderr
 | 
						|
 | 
						|
-- go.mod --
 | 
						|
module test/main
 | 
						|
-- main.go --
 | 
						|
package main
 | 
						|
 | 
						|
/*
 | 
						|
static int privateAdd(int a, int b) {
 | 
						|
	return a + b;
 | 
						|
}
 | 
						|
*/
 | 
						|
import "C"
 | 
						|
 | 
						|
func main() {
 | 
						|
	println(C.privateAdd(C.int(1), C.int(2)))
 | 
						|
}
 | 
						|
-- main.stderr --
 | 
						|
3
 |