Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-10-18 07:10:28 +0300
committerAdam Langley <alangley@gmail.com>2015-10-26 21:44:27 +0300
commit5ef619ef2add2183fc2a471e933d0277dc1f59e9 (patch)
tree01ecc31bf202d4131def5a43b0a22172e1d78e25 /util
parent63006a913b772d48a364915c3155d51744a8f704 (diff)
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>
Diffstat (limited to 'util')
-rw-r--r--util/doc.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/doc.go b/util/doc.go
index 23cd5f46..48d65eb3 100644
--- a/util/doc.go
+++ b/util/doc.go
@@ -237,6 +237,10 @@ func sanitizeAnchor(name string) string {
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 @@ func (config *Config) parseHeader(path string) (*HeaderFile, error) {
}
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