From 6aa05b39810bef5b5cf21cb2abd02012ce727574 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 20:34:42 +0100 Subject: Bump github.com/spf13/viper from 1.9.0 to 1.10.1 (#1684) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.9.0 to 1.10.1. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.9.0...v1.10.1) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor/gopkg.in/ini.v1/file.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vendor/gopkg.in/ini.v1/file.go') diff --git a/vendor/gopkg.in/ini.v1/file.go b/vendor/gopkg.in/ini.v1/file.go index 13459181..7b4e560d 100644 --- a/vendor/gopkg.in/ini.v1/file.go +++ b/vendor/gopkg.in/ini.v1/file.go @@ -142,6 +142,12 @@ func (f *File) GetSection(name string) (*Section, error) { return secs[0], err } +// HasSection returns true if the file contains a section with given name. +func (f *File) HasSection(name string) bool { + section, _ := f.GetSection(name) + return section != nil +} + // SectionsByName returns all sections with given name. func (f *File) SectionsByName(name string) ([]*Section, error) { if len(name) == 0 { -- cgit v1.2.3