mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	 3f36c83c68
			
		
	
	3f36c83c68
	
	
	
		
			
			testify is used throughout the codebase; this switches mocks from gomock to testify with the help of mockery for code generation. Handlers and mocks in test/utils/oidc are moved to a new package: mockery operates package by package, and requires packages to build correctly; test/utils/oidc/testserver.go relies on the mocks and fails to build when they are removed. Moving the interface and mocks to a different package allows mockery to process that package without having to build testserver.go. Signed-off-by: Stephen Kitt <skitt@redhat.com>
		
			
				
	
	
		
			18 lines
		
	
	
		
			362 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			362 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package objx
 | |
| 
 | |
| // Has gets whether there is something at the specified selector
 | |
| // or not.
 | |
| //
 | |
| // If m is nil, Has will always return false.
 | |
| func (m Map) Has(selector string) bool {
 | |
| 	if m == nil {
 | |
| 		return false
 | |
| 	}
 | |
| 	return !m.Get(selector).IsNil()
 | |
| }
 | |
| 
 | |
| // IsNil gets whether the data is nil or not.
 | |
| func (v *Value) IsNil() bool {
 | |
| 	return v == nil || v.data == nil
 | |
| }
 |