Skip to content

Instantly share code, notes, and snippets.

@grv87
Created February 3, 2017 18:04
Show Gist options
  • Save grv87/6be3c9d7e1c795636a65283c5187d724 to your computer and use it in GitHub Desktop.
Save grv87/6be3c9d7e1c795636a65283c5187d724 to your computer and use it in GitHub Desktop.
go-symlink
REM All OK
go run test.go
REM Create link with full path
mklink /J link "\\?\%cd%"
REM Test new link. Gives something like that:
REM <JUNCTION> link [\\?\R:\!spikes\go-symlink]
dir *link*
cd link
REM But under the link it goes wrong...
go run test.go
package main
import (
"fmt"
"path/filepath"
)
func main() {
SourcePath, err := filepath.EvalSymlinks(".")
fmt.Println(SourcePath)
fmt.Println(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment