MCPcopy Create free account
hub / github.com/go-git/go-git / AddOption

Method AddOption

plumbing/format/config/section.go:124–127  ·  view source on GitHub ↗

AddOption adds a new Option to the Section. The updated Section is returned.

(key string, value string)

Source from the content-addressed store, hash-verified

122
123// AddOption adds a new Option to the Section. The updated Section is returned.
124func (s *Section) AddOption(key string, value string) *Section {
125 s.Options = s.Options.withAddedOption(key, value)
126 return s
127}
128
129// SetOption adds a new Option to the Section. If the option already exists, is replaced.
130// The updated Section is returned.

Callers 1

TestSection_AddOptionMethod · 0.95

Calls 1

withAddedOptionMethod · 0.80

Tested by 1

TestSection_AddOptionMethod · 0.76