Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

dep: remove usage of filepath.FromSlash & filepath.ToSlash in context.go #778

Conversation

ibrasho
Copy link
Collaborator

@ibrasho ibrasho commented Jun 20, 2017

Remove the usage of filepath.FromSlash and filepath.ToSlash in GOPATH
detection functions *Ctx.SetPaths and *Ctx.detectGOPATH.

This should ensure the GOPATH returned from *Ctx.DetectProjectGOPATH
uses the filesystem separator instead of slashes.

What does this do / why do we need it?

*Ctx.SetPaths converts GOPATHs to use slashes. This is unnecessary and could cause issues on filesystems that don't use slashes as a separator.

@ibrasho ibrasho changed the title remove usage of filepath.FromSlash & filepath.ToSlash in context.go dep: remove usage of filepath.FromSlash & filepath.ToSlash in context.go Jun 20, 2017
Remove the usage of filepath.FromSlash and filepath.ToSlash in GOPATH
detection functions *Ctx.SetPaths and *Ctx.detectGOPATH.

This should ensure the GOPATH returned from *Ctx.DetectProjectGOPATH
uses the filesystem separator instead of slashes.

Signed-off-by: Ibrahim AshShohail <[email protected]>
@ibrasho ibrasho force-pushed the remove-slashing-in-SetPaths-DetectProjectGOPATH branch from b09dbed to 6e2930f Compare June 21, 2017 00:34
Copy link
Collaborator

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ibrasho ibrasho merged commit ec50ada into golang:master Jun 22, 2017
@ibrasho ibrasho deleted the remove-slashing-in-SetPaths-DetectProjectGOPATH branch July 23, 2017 20:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants