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/tracee/pkg/pcaps
    
    the code of the file until where you have to start completion: package pcaps

import (
	"fmt"
	"math"
	"os"
	"strings"

	"github.com/google/gopacket/layers"
	"github.com/google/gopacket/pcapgo"

	"github.com/aquasecurity/tracee/pkg/config"
	"github.com/aquasecurity/tracee/pkg/errfmt"
	"github.com/aquasecurity/tracee/pkg/logger"
	"github.com/aquasecurity/tracee/pkg/utils"

    
func mkdirForPcapType(o *os.File, c string, t PcapType) error {
	var e error

	s := "pcap"

	e = utils.MkdirAtExist(o, s, os.ModePerm)
	if e != nil {
		return errfmt.WrapError(e)
	}

	switch t {
	case Single:
		e = utils.MkdirAtExist(o, pcapSingleDir, os.ModePerm)
		if e != nil {
			return errfmt.WrapError(e)
		}
	case Process:
		e = utils.MkdirAtExist(o, pcapProcDir, os.ModePerm)
		if e != nil {
			return errfmt.WrapError(e)
		}
		e = utils.MkdirAtExist(o, pcapProcDir+c, os.ModePerm)
		if e != nil {
			return errfmt.WrapError(e)
		}
	case Container:
		e = utils.MkdirAtExist(o, pcapContDir, os.ModePerm)
		if e != nil {
			return errfmt.WrapError(e)
		}
	case Command:
		e = utils.MkdirAtExist(o, pcapCommDir, os.ModePerm)
		if e != nil {
			return errfmt.WrapError(e)
		}
		e = utils.MkdirAtExist(o, pcapCommDir+c, os.ModePerm)
		if e != nil {
			return errfmt.WrapError(e)
		}
	}

	return nil
}