From ff1af40c661f7094ee70b7ed411a439509205b27 Mon Sep 17 00:00:00 2001 From: jhawk28 Date: Fri, 14 Feb 2020 02:50:03 -0500 Subject: [PATCH] struct-markdown should keep the same slash direction regardless of Windows or Linux (#8738) --- cmd/struct-markdown/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/struct-markdown/main.go b/cmd/struct-markdown/main.go index 77ba2cd9f..1474be1a9 100644 --- a/cmd/struct-markdown/main.go +++ b/cmd/struct-markdown/main.go @@ -60,19 +60,20 @@ func main() { } fields := structDecl.Fields.List + sourcePath := filepath.ToSlash(paths[1]) header := Struct{ - SourcePath: paths[1], + SourcePath: sourcePath, Name: typeSpec.Name.Name, Filename: "_" + typeSpec.Name.Name + ".html.md", Header: typeDecl.Doc.Text(), } required := Struct{ - SourcePath: paths[1], + SourcePath: sourcePath, Name: typeSpec.Name.Name, Filename: "_" + typeSpec.Name.Name + "-required.html.md", } notRequired := Struct{ - SourcePath: paths[1], + SourcePath: sourcePath, Name: typeSpec.Name.Name, Filename: "_" + typeSpec.Name.Name + "-not-required.html.md", }