Skip to content

runtime: runtime.Caller returns always '/' separator in file paths on Windows #3335

@gopherbot

Description

@gopherbot

by pkorotkov:

What steps will reproduce the problem?
1. Call function runtime.Caller(...)
2. Take the file path (second argument)

What is the expected output?
On Windows path separator is "\"

What do you see instead?
"/"

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Windows 7, x86

Which revision are you using?  (hg identify)
0b67257c702f tip

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.OS-Windows

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions