Comments (1)
Hi @amery .
Your code doesn't work the way you think it does. Arguments to deferred function calls are evaluated at the defer
statement. You are always passing false
to undoThingsUnless
. Try passing &ok
instead.
When you went to open this issue, did you see an issue template called "False positive"? Did you ignore it, and why? (E.g., are you not familiar with the term "false positive"?) I ask because I created that issue template for the sake of reducing spurious reports like this one — and yet here we are. Can you think of a better name for the issue template? I'd appreciate your feedback :)
from ineffassign.
Related Issues (20)
- false report for assigining to the receiver pointer HOT 1
- False positive: string concatenation HOT 5
- allow ineffectual assignments to pointers HOT 2
- Unexpected ineffectual assignment after switch HOT 1
- Unexpected ineffectual assignment: type switch HOT 1
- Initialization as nil treated as assignment HOT 2
- What is causing this ineffassign? HOT 2
- False positive or explain: could not import C (no metadata for C) HOT 3
- Not able to detect inherited properties. HOT 5
- Why is this not reported ? HOT 5
- "Ineffectual assignment" false positive when var used in deferred function call HOT 2
- Why the two cases have different results? HOT 2
- false positive in `switch { case... case... }` HOT 1
- Check for reassignment error HOT 6
- [PANIC] Running against large code-base after update HOT 1
- false positive for map variable HOT 1
- false positivie: previously declared variable HOT 1
- false positive: warning: ineffectual assignment to tm HOT 2
- Bump golang.org/x/tools to v0.7.0 (as minimum) and make new tag HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ineffassign.