Golang path/filepath.EvalSymlinks() function example

package path/filepath

Golang path/filepath.EvalSymlinks() function usage example

 tmpDir, err = filepath.EvalSymlinks(tmpDir)
 if err != nil {
 panic("eval symlink for tmp dir failed :", err)
 }
 tmpDirCleaned := filepath.Clean(tmpDir)

Reference :

http://golang.org/pkg/path/filepath/#EvalSymlinks

Advertisement