aboutsummaryrefslogtreecommitdiffstats
path: root/formats/config/section.go
diff options
context:
space:
mode:
Diffstat (limited to 'formats/config/section.go')
-rw-r--r--formats/config/section.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/formats/config/section.go b/formats/config/section.go
index 6d6a891..552ce74 100644
--- a/formats/config/section.go
+++ b/formats/config/section.go
@@ -74,3 +74,13 @@ func (s *Section) Subsection(name string) *Subsection {
s.Subsections = append(s.Subsections, ss)
return ss
}
+
+func (s *Section) HasSubsection(name string) bool {
+ for _, ss := range s.Subsections {
+ if ss.IsName(name) {
+ return true
+ }
+ }
+
+ return false
+}