Comments (5)
Thanks - I can reproduce now. Should be a simple enough fix.
from unparam.
Thanks. Just to confirm - are you using the latest master version, e6a6d1c? I fixed a few false positives this morning.
from unparam.
Yes, I just downloaded it with go get -u mvdan.cc/unparam
.
from unparam.
I can't reproduce it:
$ cat go.mod
module repro
go 1.12
require github.com/aws/aws-sdk-go-v2 v0.7.0
$ cat f.go
package main
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
)
func main() {
resolver := aws.EndpointResolverFunc(func(string, string) (aws.Endpoint, error) {
return aws.Endpoint{}, nil
})
fmt.Println(resolver)
}
$ unparam .
$
Could you provide the steps to reproduce the problem within a Docker container? That way I'll very likely be able to reproduce it. For example, the following still doesn't show me any unparam warning:
#!/bin/bash
docker run -i golang:1.11.4-stretch <<-SCRIPT
echo "installing unparam"
export GO111MODULE=off # to install unparam properly
go get -u mvdan.cc/unparam
echo "setting up temp module"
export GO111MODULE=on
mkdir temp
cd temp
go mod init temp
cat >f.go <<FILE
package main
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
)
func main() {
resolver := aws.EndpointResolverFunc(func(string, string) (aws.Endpoint, error) {
return aws.Endpoint{}, nil
})
fmt.Println(resolver)
}
FILE
echo "downloading deps"
go mod tidy
echo "running unparam"
unparam .
SCRIPT
from unparam.
Sorry, I just noticed that my example was incomplete and, indeed, didn't reproduce the issue. I fixed it above and simplified the example some more and it should work now to reproduce. I had to add URL: "url"
for it to reproduce the issue. It works fine without that part.
from unparam.
Related Issues (20)
- Is this positive case? HOT 1
- Ignoring leading underscore _parameters HOT 9
- How to suppress the error in this situation? HOT 6
- goreleaser: error: unknown long flag '--snapshot', try --help HOT 2
- mvdan.cc certificate expired HOT 3
- main package has no godoc HOT 1
- Possible to skip directories through flag? HOT 1
- false negative HOT 5
- False positive on implementing interface HOT 4
- Allow setting of tests struct field on the Checker type HOT 1
- Support Go 1.17 slice-to-array conversion HOT 5
- proposal: don't group exported and unexported methods of an interface together?
- fails on itself at tip HOT 1
- panics when encountering generics HOT 2
- panic: interface conversion: ast.Expr is *ast.IndexExpr, not *ast.Ident HOT 3
- disable warnings on funcs which use go:linkname
- An option to ignore parameters starting with the underscore (e.g., `_name`)? HOT 2
- panic analysing generic function with struct param with generic field types HOT 5
- Bump golang.org/x/tools to v0.7.0 (as minimum) and make new tag HOT 2
- Allow enable on constructors like `NewXXX`
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 unparam.