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

Method encodeSubsection

plumbing/format/config/encoder.go:54–60  ·  view source on GitHub ↗
(sectionName string, s *Subsection)

Source from the content-addressed store, hash-verified

52}
53
54func (e *Encoder) encodeSubsection(sectionName string, s *Subsection) error {
55 if err := e.printf("[%s \"%s\"]\n", sectionName, subsectionReplacer.Replace(s.Name)); err != nil {
56 return err
57 }
58
59 return e.encodeOptions(s.Options)
60}
61
62func (e *Encoder) encodeOptions(opts Options) error {
63 for _, o := range opts {

Callers 1

encodeSectionMethod · 0.95

Calls 2

printfMethod · 0.95
encodeOptionsMethod · 0.95

Tested by

no test coverage detected