mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Fix golint warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
		
							parent
							
								
									ca0a9913c3
								
							
						
					
					
						commit
						270e8cf64d
					
				
					 6 changed files with 11 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -44,10 +44,9 @@ func (graph *Graph) depth(img *image.Image) (int, error) {
 | 
			
		|||
	return count, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Set the max depth to the aufs default that most
 | 
			
		||||
// kernels are compiled with
 | 
			
		||||
// Set the max depth to the aufs default that most kernels are compiled with.
 | 
			
		||||
// For more information see: http://sourceforge.net/p/aufs/aufs3-standalone/ci/aufs3.12/tree/config.mk
 | 
			
		||||
const MaxImageDepth = 127
 | 
			
		||||
const maxImageDepth = 127
 | 
			
		||||
 | 
			
		||||
// CheckDepth returns an error if the depth of an image, as returned
 | 
			
		||||
// by ImageDepth, is too large to support creating a container from it
 | 
			
		||||
| 
						 | 
				
			
			@ -59,8 +58,8 @@ func (graph *Graph) CheckDepth(img *image.Image) error {
 | 
			
		|||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if depth+2 >= MaxImageDepth {
 | 
			
		||||
		return fmt.Errorf("Cannot create container with more than %d parents", MaxImageDepth)
 | 
			
		||||
	if depth+2 >= maxImageDepth {
 | 
			
		||||
		return fmt.Errorf("Cannot create container with more than %d parents", maxImageDepth)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@ package devicemapper
 | 
			
		|||
*/
 | 
			
		||||
import "C"
 | 
			
		||||
 | 
			
		||||
// LibraryDeferredRemovalsupport is supported when statically linked.
 | 
			
		||||
// LibraryDeferredRemovalSupport is supported when statically linked.
 | 
			
		||||
const LibraryDeferredRemovalSupport = true
 | 
			
		||||
 | 
			
		||||
func dmTaskDeferredRemoveFct(task *cdmTask) int {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -589,7 +589,7 @@ var Usage = func() {
 | 
			
		|||
	PrintDefaults()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Usage prints to standard error a usage message documenting the standard command layout
 | 
			
		||||
// ShortUsage prints to standard error a usage message documenting the standard command layout
 | 
			
		||||
// The function is a variable that may be changed to point to a custom function.
 | 
			
		||||
var ShortUsage = func() {
 | 
			
		||||
	fmt.Fprintf(CommandLine.output, "Usage of %s:\n", os.Args[0])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@ func TruncateID(id string) string {
 | 
			
		|||
 | 
			
		||||
func generateID(crypto bool) string {
 | 
			
		||||
	b := make([]byte, 32)
 | 
			
		||||
	var r io.Reader = random.Reader
 | 
			
		||||
	r := random.Reader
 | 
			
		||||
	if crypto {
 | 
			
		||||
		r = rand.Reader
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -146,7 +146,7 @@ var (
 | 
			
		|||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// TarSum default is "sha256"
 | 
			
		||||
// DefaultTHash is default TarSum hashing algoritm - "sha256".
 | 
			
		||||
var DefaultTHash = NewTHash("sha256", sha256.New)
 | 
			
		||||
 | 
			
		||||
type simpleTHash struct {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,8 +47,9 @@ var clientCipherSuites = []uint16{
 | 
			
		|||
	tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// For use by code which already has a crypto/tls options struct but wants to
 | 
			
		||||
// use a commonly accepted set of TLS cipher suites, with known weak algorithms removed
 | 
			
		||||
// DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls
 | 
			
		||||
// options struct but wants to use a commonly accepted set of TLS cipher suites, with
 | 
			
		||||
// known weak algorithms removed.
 | 
			
		||||
var DefaultServerAcceptedCiphers = append(clientCipherSuites, acceptedCBCCiphers...)
 | 
			
		||||
 | 
			
		||||
// ServerDefault is a secure-enough TLS configuration for the server TLS configuration.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue