mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	staticcheck: SA4001: &*x will be simplified to x. It will not copy x
daemon/volumes_unix_test.go:228:13: SA4001: &*x will be simplified to x. It will not copy x. (staticcheck)
                mp:      &(*c.MountPoints["/jambolan"]), // copy the mountpoint, expect no changes
                         ^
    daemon/logger/local/local_test.go:214:22: SA4001: &*x will be simplified to x. It will not copy x. (staticcheck)
            dst.PLogMetaData = &(*src.PLogMetaData)
                               ^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
			
			
This commit is contained in:
		
							parent
							
								
									b92be7e297
								
							
						
					
					
						commit
						f7433d6190
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -211,7 +211,8 @@ func copyLogMessage(src *logger.Message) *logger.Message {
 | 
			
		|||
	dst.Err = src.Err
 | 
			
		||||
	dst.Line = append(dst.Line, src.Line...)
 | 
			
		||||
	if src.PLogMetaData != nil {
 | 
			
		||||
		dst.PLogMetaData = &(*src.PLogMetaData)
 | 
			
		||||
		lmd := *src.PLogMetaData
 | 
			
		||||
		dst.PLogMetaData = &lmd
 | 
			
		||||
	}
 | 
			
		||||
	return dst
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -96,6 +96,8 @@ func TestBackportMountSpec(t *testing.T) {
 | 
			
		|||
		return string(b)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mpc := *c.MountPoints["/jambolan"]
 | 
			
		||||
 | 
			
		||||
	for _, x := range []expected{
 | 
			
		||||
		{
 | 
			
		||||
			mp: &volumemounts.MountPoint{
 | 
			
		||||
| 
						 | 
				
			
			@ -225,7 +227,7 @@ func TestBackportMountSpec(t *testing.T) {
 | 
			
		|||
			comment: "partially configured named volume caused by #32613",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			mp:      &(*c.MountPoints["/jambolan"]), // copy the mountpoint, expect no changes
 | 
			
		||||
			mp:      &mpc,
 | 
			
		||||
			comment: "volume defined in mounts API",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue