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: common.go
    path of file: ./repos/ziti/ziti/cmd/edge
    
    the code of the file until where you have to start completion: /*
	Copyright NetFoundry Inc.

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the Li
    
func mapNamesToIDs(entityType string, o api.Options, skipNotFound bool, list ...string) ([]string, error) {
	var result []string
	for _, val := range list {
		if strings.HasPrefix(val, "id:") {
			id := strings.TrimPrefix(val, "id:")
			result = append(result, id)
		} else {
			query := fmt.Sprintf(`id = "%s" or name="%s"`, val, val)
			if strings.HasPrefix(val, "name:") {
				name := strings.TrimPrefix(val, "name:")
				query = fmt.Sprintf(`name="%s"`, name)
			}
			list, _, err := filterEntitiesOfType(entityType, query, false, nil, o.Timeout, o.Verbose)
			if err != nil {
				return nil, err
			}

			if len(list) == 0 {
				fmt.Printf("Found 0 %v with id or name matching %v\n", entityType, val)
				if skipNotFound {
					continue
				}
				return nil, errors.Errorf("no %v with id or name matching %v", entityType, val)
			}

			if len(list) > 1 {
				fmt.Printf("Found multiple %v matching %v. Please specify which you want by prefixing with id: or name:\n", entityType, val)
				return nil, errors.Errorf("ambiguous if %v is id or name", val)
			}

			entityId, _ := list[0].Path("id").Data().(string)
			result = append(result, entityId)
			if val, found := os.LookupEnv("ZITI_CLI_DEBUG"); found && strings.EqualFold("true", val) {
				fmt.Printf("Found %v with id %v for name %v\n", entityType, entityId, val)
			}
		}
	}
	return result, nil
}