Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-fuzz-build: parenthesize imports #307

Merged
merged 2 commits into from
Nov 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion go-fuzz-build/cover.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,12 @@ func (f *File) addImport(path, name, anyIdent string) {
},
}
impDecl := &ast.GenDecl{
Tok: token.IMPORT,
Lparen: f.astFile.Name.End(),
Tok: token.IMPORT,
Specs: []ast.Spec{
newImport,
},
Rparen: f.astFile.Name.End(),
}
// Make the new import the first Decl in the file.
astFile := f.astFile
Expand Down
4 changes: 2 additions & 2 deletions go-fuzz-build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func basePackagesConfig() *packages.Config {
cfg := new(packages.Config)

// Note that we do not set GO111MODULE here in order to respect any GO111MODULE
// setting by the user as we are finding dependencies. Note, however, that
// we are still setting up a GOPATH to build, so we later will force
// setting by the user as we are finding dependencies. Note, however, that
// we are still setting up a GOPATH to build, so we later will force
// GO111MODULE to be off when building so that we are in GOPATH mode.
// If the user has not set GO111MODULE, the meaning here is
// left up to cmd/go (defaulting to 'auto' in Go 1.11-1.13,
Expand Down