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: program.go
    path of file: ./repos/kuma/pkg/transparentproxy/ebpf
    
    the code of the file until where you have to start completion: //go:build linux

package ebpf

import (
	"embed"
	"fmt"
	"io"
	"os"
	"os/exec"
	"path"
	"strings"

	"github.com/moby/sys/mountinfo"
	"golang.org/x/sys/unix"

	"github.com/kumahq/kuma/pkg/transparentproxy/config"
)

const (
	FSTypeCgroup2 = "cgroup2"
	FSTypeBPF     = "bpf"
)

type FlagGenerator = func(
	cfg config.Config,
	cgroup string,
	bpffs string,
) ([]string, error)

type Program struct {
	Name    string
	Flags
    
func getBpffsPath(cfg config.Config) (string, error) {
	bpffsPath := cfg.Ebpf.BPFFSPath

	if bpffsPath != "" {
		mounts, err := mountinfo.GetMounts(mountinfo.SingleEntryFilter(bpffsPath))
		if err != nil {
			return "", fmt.Errorf("getting mount (%s) failed with error: %s",
				bpffsPath, err,
			)
		}

		if len(mounts) == 1 {
			fsType := mounts[0].FSType

			if fsType == FSTypeBPF {
				return bpffsPath, nil
			}

			_, _ = fmt.Fprintf(cfg.RuntimeStderr,
				"warning: found mount %s, but its type (%s) is not %s - ignoring\n",
				bpffsPath, fsType, FSTypeBPF,
			)
		} else {
			_, _ = fmt.Fprintf(cfg.RuntimeStderr,
				"warning: expected %s mount: %s cannot be found - ignoring\n",
				FSTypeBPF, bpffsPath,
			)
		}
	}

	mounts, err := mountinfo.GetMounts(mountinfo.FSTypeFilter(FSTypeBPF))
	if err != nil {
		return "", fmt.Errorf("getting mounts failed with error: %s", err)
	}

	if len(mounts) == 0 {
		_, _ = fmt.Fprintf(cfg.RuntimeStderr,
			"warning: cannot find any %s mounts - will try to manually mount %s\n",
			FSTypeBPF, bpffsPath,
		)

		return bpffsPath, initBPFFSMaybe(bpffsPath)
	}

	if len(mounts) > 1 {
		var mountpoints []string

		for _, mount := range mounts {
			mountpoints = append(mountpoints, mount.Mountpoint)
		}

		_, _ = fmt.Fprintf(cfg.RuntimeStderr,
			"found %d %s mounts, only first one (%s) will be used (ignored: [%s])\n",
			len(mounts), FSTypeBPF, mountpoints[0], strings.Join(mountpoints, ", "),
		)
	}

	return mounts[0].Mountpoint, nil
}