You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: writeconf.go
    path of file: ./repos/juju/service/systemd/testing
    
    the code of the file until where you have to start completion: // Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package testing

import (
	"fmt"
	"sort"
	"strings"

	jc "github.com/juju/testing/checkers"
	gc "gopkg.in/check.v1"

	"github.com/juju/juju/testing"
)

// WriteConfTest is used in tests to verify that the shell commands
// to write a service conf to disk are correct.
type WriteConfTest struct {
	Service  string
	DataDir  strin
    
func parseConfSections(lines []string) map[string][]string {
	sections := make(map[string][]string)

	var section string
	for _, line := range lines {
		line = strings.TrimSpace(line)
		if line == "" {
			continue
		}
		if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") {
			if section != "" {
				sort.Strings(sections[section])
			}
			section = line[1 : len(line)-1]
			sections[section] = nil
		} else {
			sections[section] = append(sections[section], line)
		}
	}
	if section != "" {
		sort.Strings(sections[section])
	}

	return sections
}