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: browser.go
    path of file: ./repos/HackBrowserData/browser
    
    the code of the file until where you have to start completion: package browser

import (
	"log/slog"
	"path/filepath"
	"sort"
	"strings"


    
func pickFirefox(name, profile string) []Browser {
	var browsers []Browser
	name = strings.ToLower(name)
	if name == "all" || name == "firefox" {
		for _, v := range firefoxList {
			if profile == "" {
				profile = v.profilePath
			} else {
				profile = fileutil.ParentDir(profile)
			}

			if !fileutil.IsDirExists(filepath.Clean(profile)) {
				slog.Warn("find browser failed, profile folder does not exist", "browser", v.name)
				continue
			}

			if multiFirefox, err := firefox.New(profile, v.items); err == nil {
				for _, b := range multiFirefox {
					slog.Warn("find browser success", "browser", b.Name())
					browsers = append(browsers, b)
				}
			} else {
				slog.Error("new firefox error", "err", err)
			}
		}

		return browsers
	}

	return nil
}