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: default_service.go
    path of file: ./repos/scan4all/vendor/github.com/sijms/go-ora/v2/advanced_nego
    
    the code of the file until where you have to start completion: package advanced_nego

import (
	"errors"
	"fmt"
	"strings"
)

type AdvNegoService interface {
	getServiceDataLength() int
	writeServiceData() error
	readServiceData(subPacketNum int) error
	validateRe
    
func (serv *defaultService) buildServiceList(userList []string, useLevel, useDefault bool) error {
	serv.selectedIndices = make([]int, 0, 10)
	//serv.selectedServ = make(map[string]int)
	if useLevel {
		if serv.level == 1 {
			serv.selectedIndices = append(serv.selectedIndices, 0)
			//serv.selectedServ[""] = 0
			return nil
		}
		if serv.level != 0 && serv.level != 2 && serv.level != 3 {
			return errors.New(fmt.Sprintf("unsupported service level value: %d", serv.level))
		}
	}
	userListLength := len(userList)
	for i := 0; i < userListLength; i++ {
		userList[i] = strings.TrimSpace(userList[i])
	}
	if userListLength > 0 && userList[userListLength-1] == "" {
		userList = userList[:userListLength-1]
	}
	if len(userList) == 0 {
		if useDefault {
			for i := 0; i < len(serv.availableServiceNames); i++ {
				if serv.availableServiceNames[i] == "" {
					if !(useLevel && serv.level == 0) {
						continue
					}
				}
				serv.selectedIndices = append(serv.selectedIndices, i)
			}
			if useLevel && serv.level == 2 {
				serv.selectedIndices = append(serv.selectedIndices, 0)
				//serv.selectedServ[""] = 0
			}
		}
		return nil
	} else if len(userList) == 1 {
		if strings.ToUpper(userList[0]) == "ALL" {
			for i := 0; i < len(serv.availableServiceNames); i++ {
				if serv.availableServiceNames[i] == "" {
					if !(useLevel && serv.level == 0) {
						continue
					}
				}
				serv.selectedIndices = append(serv.selectedIndices, i)
			}
			if useLevel && serv.level == 2 {
				serv.selectedIndices = append(serv.selectedIndices, 0)
				//serv.selectedServ[""] = 0
			}
			return nil
		} else if strings.ToUpper(userList[0]) == "NONE" {
			return nil
		}
	}
	if useLevel && serv.level == 0 {
		serv.selectedIndices = append(serv.selectedIndices, 0)
		//serv.selectedServ[""] = 0
	}
	for _, userItem := range userList {
		if userItem == "" {
			return errors.New("empty authentication service")
		}
		found := false
		for i := 0; i < len(serv.availableServiceNames); i++ {
			if strings.ToUpper(userItem) == serv.availableServiceNames[i] {
				serv.selectedIndices = append(serv.selectedIndices, i)
				found = true
				break
			}
		}
		//for key, value := range serv.avaServs {
		//	if strings.ToUpper(userItem) == key {
		//		serv.selectedServ[key] = value
		//		//output = append(output, userItem)
		//		found = true
		//		break
		//	}
		//}
		if !found {
			return errors.New("unsupported authentication service")
		}
	}
	if useLevel && serv.level == 2 {
		serv.selectedIndices = append(serv.selectedIndices, 0)
	}
	return nil
}