Hide some sections from the docs. Private structs shouldn't be shown. Also there's a few sections that are really more implementation details than anything else. Change-Id: Ibc5a23ba818ab0531d9c68e7ce348f1eabbcd19a Reviewed-on: https://boringssl-review.googlesource.com/6313 Reviewed-by: Adam Langley <alangley@gmail.com>
diff --git a/util/doc.go b/util/doc.go index 23cd5f4..48d65eb 100644 --- a/util/doc.go +++ b/util/doc.go
@@ -237,6 +237,10 @@ return strings.Replace(name, " ", "-", -1) } +func isPrivateSection(name string) bool { + return strings.HasPrefix(name, "Private functions") || strings.HasPrefix(name, "Private structures") || strings.Contains(name, "(hidden)") +} + func (config *Config) parseHeader(path string) (*HeaderFile, error) { headerPath := filepath.Join(config.BaseDirectory, path) @@ -341,7 +345,7 @@ } section.Preamble = comment - section.IsPrivate = len(comment) > 0 && strings.HasPrefix(comment[0], "Private functions") + section.IsPrivate = len(comment) > 0 && isPrivateSection(comment[0]) section.Anchor = anchor lines = rest[1:] lineNo = restLineNo + 1