Bump github.com/Djarvur/go-err113 to HEAD (#1760)
This commit is contained in:
		
							parent
							
								
									9e9a814052
								
							
						
					
					
						commit
						a1e3749ac2
					
				
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							| @ -5,7 +5,7 @@ go 1.13 | ||||
| require ( | ||||
| 	4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a | ||||
| 	github.com/BurntSushi/toml v0.3.1 | ||||
| 	github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5 | ||||
| 	github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 | ||||
| 	github.com/OpenPeeDeeP/depguard v1.0.1 | ||||
| 	github.com/alexkohler/prealloc v0.0.0-20210204145425-77a5b5dd9799 | ||||
| 	github.com/ashanbrown/forbidigo v1.1.0 | ||||
|  | ||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
										generated
									
									
									
								
							| @ -16,8 +16,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 | ||||
| github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= | ||||
| github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | ||||
| github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= | ||||
| github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5 h1:XTrzB+F8+SpRmbhAH8HLxhiiG6nYNwaBZjrFps1oWEk= | ||||
| github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= | ||||
| github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= | ||||
| github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= | ||||
| github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= | ||||
| github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= | ||||
| github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= | ||||
|  | ||||
							
								
								
									
										8
									
								
								test/testdata/goerr113.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								test/testdata/goerr113.go
									
									
									
									
										vendored
									
									
								
							| @ -4,18 +4,18 @@ package testdata | ||||
| import "os" | ||||
| 
 | ||||
| func SimpleEqual(e1, e2 error) bool { | ||||
| 	return e1 == e2 // ERROR `err113: do not compare errors directly, use errors.Is\(\) instead: "e1 == e2"` | ||||
| 	return e1 == e2 // ERROR `err113: do not compare errors directly "e1 == e2", use "errors.Is\(e1, e2\)" instead` | ||||
| } | ||||
| 
 | ||||
| func SimpleNotEqual(e1, e2 error) bool { | ||||
| 	return e1 != e2 // ERROR `err113: do not compare errors directly, use errors.Is\(\) instead: "e1 != e2"` | ||||
| 	return e1 != e2 // ERROR `err113: do not compare errors directly "e1 != e2", use "!errors.Is\(e1, e2\)" instead` | ||||
| } | ||||
| 
 | ||||
| func CheckGoerr13Import(e error) bool { | ||||
| 	f, err := os.Create("f.txt") | ||||
| 	if err != nil { | ||||
| 		return err == e  // ERROR `err113: do not compare errors directly, use errors.Is\(\) instead: "err == e"` | ||||
| 		return err == e // ERROR `err113: do not compare errors directly "err == e", use "errors.Is\(err, e\)" instead` | ||||
| 	} | ||||
| 	f.Close() | ||||
| 	return false | ||||
| } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ludovic Fernandez
						Ludovic Fernandez