Giter Club home page Giter Club logo

Comments (4)

ramya-rao-a avatar ramya-rao-a commented on June 15, 2024

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.

ramya-rao-a avatar ramya-rao-a commented on June 15, 2024

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.

ramya-rao-a avatar ramya-rao-a commented on June 15, 2024

@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.

ramya-rao-a avatar ramya-rao-a commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.