Comments (4)
I am on a Mac, and for me the definition in GOROOT/src/os/file.go
opens.
@rakyll What is the expectation here?
from godef.
From @zignd on April 15, 2017 23:6
Oh, it's not the os.Rename
function, it's the os.rename
function. os.rename
is called from within os.Rename
to perform the rename according to a specific operating system. I just tried it on Linux and the same occurs, GOROOT/src/os/file_plan9.go
opens.
// Rename renames (moves) oldpath to newpath.
// If newpath already exists and is not a directory, Rename replaces it.
// OS-specific restrictions may apply when oldpath and newpath are in different directories.
// If there is an error, it will be of type *LinkError.
func Rename(oldpath, newpath string) error {
return rename(oldpath, newpath)
}
Here's a snippet containing the os.Rename
definition, as you can see it is calling os.rename
.
from godef.
@zignd Ah, got it.
I tried on my Mac again, and the definition in file_unix.go
opened for me.
But on Windows, I can repro what you are seeing i.e file_plan9.go
opens.
If I update my settings to use the gogetdoc
tool instead (set "go.docsTool": "gogetdoc"
), then I get navigated to the right file.
Can you try using gogetdoc
and see if that helps?
If it does, then this issue should be moved to the repo for godef
from godef.
From @zignd on April 16, 2017 15:12
@ramya-rao-a It works when I set "go.docsTool": "gogetdoc"
. It seems to be an issue with godef
as you said. Should I open an issue there?
from godef.
Related Issues (20)
- Cannot find modules in $GOPATH/pkg/mod/cache/download
- godef might be extremly slow in Go packages using cgo when using go/packages
- godef by expression not working with go/packages HOT 3
- Allow a way to print the version of the godef tool
- Struct tips not pretty with go modules HOT 7
- go get github.com/rogpeppe/godef not working
- godef can't work for go while using import . ""
- godef takes ~2 seconds when used with go modules HOT 8
- godef can't work HOT 1
- When export GO111MODULE=on, the godef can not work. HOT 2
- internal error: nil Pkg importing "errors" from "mypkg" HOT 3
- godef: could not parse GOARCH and Go compiler HOT 2
- "no declaration found" when a package uses a binary literal
- include methods in members list HOT 1
- Godef fails in dependency module directories where no go.mod is present HOT 1
- Does godef support build tags?
- godef not work in go mod HOT 4
- Printing the receiver for methods when printing types
- go mod project search github.com/coreos/etcd very slow and fail HOT 1
- Support showing variable initialization values when printing types
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 godef.