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: feature.go
    path of file: ./repos/moby/vendor/github.com/containerd/nydus-snapshotter/pkg/converter/tool
    
    the code of the file until where you have to start completion: /*
 * Copyright (c) 2023. Nydus Developers. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

package tool

import (
	"context"
	"fmt"
	"os"
	"os/exec"
	"strings"
	"sync"

	"github.com/sirupsen/logrus"
)

type Feature string
type Features map[Feature]struct{}

const envNydusDisableTar2Rafs string = "NYDUS_DISABLE_TAR2RAFS"

const (
	// The option `--type tar-rafs` enables converting OCI tar blob
	// stream into n
    
func detectFeature(msg []byte, feature Feature) bool {
	if feature == "" {
		return false
	}

	if strings.Contains(string(msg), string(feature)) {
		return true
	}

	if parts := strings.Split(string(feature), " "); len(parts) == 2 {
		// Check each part of the feature.
		// e.g., "--type tar-rafs" -> ["--type", "tar-rafs"]
		if strings.Contains(string(msg), parts[0]) && strings.Contains(string(msg), parts[1]) {
			return true
		}
	}

	return false
}