code: func (m *Modules) Marshal() ([]byte, error) {
  	s := m.raw.Section(submoduleSection)
  	s.Subsections = make(format.Subsections, len(m.Submodules))
  
  	var i int
  	for _, r := range m.Submodules {
  		s.Subsections[i] = r.marshal()
  		i++
  	}
  
  	buf := bytes.NewBuffer(nil)
  	if err := format.NewEncoder(buf).Encode(m.raw); err != nil {
  		return nil, err
  	}
  
  	return buf.Bytes(), nil
  }
docs: // Marshal returns Modules encoded as a git-config file.