struct-markdown should keep the same slash direction regardless of Windows or Linux (#8738)
This commit is contained in:
parent
391cea13ed
commit
ff1af40c66
|
@ -60,19 +60,20 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := structDecl.Fields.List
|
fields := structDecl.Fields.List
|
||||||
|
sourcePath := filepath.ToSlash(paths[1])
|
||||||
header := Struct{
|
header := Struct{
|
||||||
SourcePath: paths[1],
|
SourcePath: sourcePath,
|
||||||
Name: typeSpec.Name.Name,
|
Name: typeSpec.Name.Name,
|
||||||
Filename: "_" + typeSpec.Name.Name + ".html.md",
|
Filename: "_" + typeSpec.Name.Name + ".html.md",
|
||||||
Header: typeDecl.Doc.Text(),
|
Header: typeDecl.Doc.Text(),
|
||||||
}
|
}
|
||||||
required := Struct{
|
required := Struct{
|
||||||
SourcePath: paths[1],
|
SourcePath: sourcePath,
|
||||||
Name: typeSpec.Name.Name,
|
Name: typeSpec.Name.Name,
|
||||||
Filename: "_" + typeSpec.Name.Name + "-required.html.md",
|
Filename: "_" + typeSpec.Name.Name + "-required.html.md",
|
||||||
}
|
}
|
||||||
notRequired := Struct{
|
notRequired := Struct{
|
||||||
SourcePath: paths[1],
|
SourcePath: sourcePath,
|
||||||
Name: typeSpec.Name.Name,
|
Name: typeSpec.Name.Name,
|
||||||
Filename: "_" + typeSpec.Name.Name + "-not-required.html.md",
|
Filename: "_" + typeSpec.Name.Name + "-not-required.html.md",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue